summaryrefslogtreecommitdiff
path: root/lib/stitch_plan/stitch_plan.py
diff options
context:
space:
mode:
authorLex Neva <lexelby@users.noreply.github.com>2018-09-12 20:49:31 -0400
committerGitHub <noreply@github.com>2018-09-12 20:49:31 -0400
commit3fd741a1a4218b6559184aaadcde8abca178bde2 (patch)
tree638a96776f6deecb82150b2b97efb372084e464c /lib/stitch_plan/stitch_plan.py
parenteff7c8d8ce7c9c1f8396c99bcf5fc15078ff99b7 (diff)
parenta876066c75eafc20547b055c5dffe8e89e4c327f (diff)
Merge pull request #284 from inkstitch/simulator-timeline
simulator timeline
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: