CreativeInquiry / PEmbroider

Embroidery Library for Processing
Other
443 stars 28 forks source link

SVG Export leave connecting lines between shapes #107

Closed danzeeeman closed 2 years ago

danzeeeman commented 2 years ago

SVG Export leave connecting lines between shapes

Screen Shot 2021-08-24 at 3 17 43 PM Screen Shot 2021-08-24 at 3 00 18 PM
golanlevin commented 2 years ago

@danzeeeman, I had recalled there being a solution for this, and there is; it's just currently undocumented. @LingDong- says:

_To make SVG output skip the connecting lines, you can either pass noConnect to PEmbroider.write(), or set NO_CONNECT to true._

This is implemented here:

An equivalent, user-centric solution to achieve this is to add E.toggleConnectingLines(false); as described in this issue, https://github.com/CreativeInquiry/PEmbroider/issues/103.

If you're exporting SVGs for a plotter or cutting device, you may also be interested in the NO_RESAMPLE property or the toggleResample() function. This will make it so that long straight lines will be output as a single line segment, as opposed to being needlessly divided into "stitches".