summaryrefslogtreecommitdiff
path: root/lib/stitch_plan/stitch_plan.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stitch_plan/stitch_plan.py')
-rw-r--r--lib/stitch_plan/stitch_plan.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/stitch_plan/stitch_plan.py b/lib/stitch_plan/stitch_plan.py
index c713b42e..808fa626 100644
--- a/lib/stitch_plan/stitch_plan.py
+++ b/lib/stitch_plan/stitch_plan.py
@@ -36,6 +36,12 @@ def patches_to_stitch_plan(patches, collapse_len=3.0 * PIXELS_PER_MM):
# make a new block of our color
color_block = stitch_plan.new_color_block(color=patch.color)
+ # always start a color with a JUMP to the first stitch position
+ color_block.add_stitch(patch.stitches[0], jump=True)
+ else:
+ if len(color_block) and (patch.stitches[0] - color_block.stitches[-1]).length() > collapse_len:
+ color_block.add_stitch(patch.stitches[0], jump=True)
+
color_block.add_stitches(patch.stitches, no_ties=patch.stitch_as_is)
if patch.trim_after: