summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/stitch_plan/stitch_plan.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/stitch_plan/stitch_plan.py b/lib/stitch_plan/stitch_plan.py
index 2a35f9aa..93bcd195 100644
--- a/lib/stitch_plan/stitch_plan.py
+++ b/lib/stitch_plan/stitch_plan.py
@@ -59,11 +59,21 @@ def patches_to_stitch_plan(patches, collapse_len=3.0 * PIXELS_PER_MM):
if patch.stop_after:
process_stop(color_block)
+ add_jumps(stitch_plan)
add_ties(stitch_plan)
return stitch_plan
+def add_jumps(stitch_plan):
+ """Add a JUMP stitch at the start of each color block."""
+
+ for color_block in stitch_plan:
+ stitch = color_block.stitches[0].copy()
+ stitch.jump = True
+ color_block.stitches.insert(0, stitch)
+
+
class StitchPlan(object):
"""Holds a set of color blocks, each containing stitches."""