summaryrefslogtreecommitdiff
path: root/lib/stitch_plan/stitch_plan.py
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2019-04-30 19:46:12 -0400
committerLex Neva <github.com@lexneva.name>2019-04-30 19:46:12 -0400
commitfebf98a2d30fb74a1c2f6b35f0932be5664161f6 (patch)
tree6cacc62d6578287aa50b91c0ded98387db1bd00a /lib/stitch_plan/stitch_plan.py
parent5b6923fe9d8d5f3afb0ef298ad34708e735fc5e5 (diff)
add grbl laser options for g-code output
Diffstat (limited to 'lib/stitch_plan/stitch_plan.py')
-rw-r--r--lib/stitch_plan/stitch_plan.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/stitch_plan/stitch_plan.py b/lib/stitch_plan/stitch_plan.py
index 808fa626..b55ccc1f 100644
--- a/lib/stitch_plan/stitch_plan.py
+++ b/lib/stitch_plan/stitch_plan.py
@@ -1,11 +1,11 @@
-from .stitch import Stitch
-from .ties import add_ties
from ..svg import PIXELS_PER_MM
-from ..utils.geometry import Point
from ..threads import ThreadColor
+from ..utils.geometry import Point
+from .stitch import Stitch
+from .ties import add_ties
-def patches_to_stitch_plan(patches, collapse_len=3.0 * PIXELS_PER_MM):
+def patches_to_stitch_plan(patches, collapse_len=3.0 * PIXELS_PER_MM, disable_ties=False):
"""Convert a collection of inkstitch.element.Patch objects to a StitchPlan.
* applies instructions embedded in the Patch such as trim_after and stop_after
@@ -56,7 +56,9 @@ def patches_to_stitch_plan(patches, collapse_len=3.0 * PIXELS_PER_MM):
del stitch_plan.color_blocks[-1]
stitch_plan.filter_duplicate_stitches()
- stitch_plan.add_ties()
+
+ if not disable_ties:
+ stitch_plan.add_ties()
return stitch_plan