diff options
| author | Lex Neva <github.com@lexneva.name> | 2018-09-12 20:51:16 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2018-09-12 20:51:16 -0400 |
| commit | d30507171b04f37871db74609c0a521325bddbd1 (patch) | |
| tree | ac06f38cde84e676f8aa8e91f08b71d45b9f2642 /lib/stitch_plan/stitch_plan.py | |
| parent | d398e10b853840261ddf04dc5fca20a05ad74b51 (diff) | |
| parent | 3fd741a1a4218b6559184aaadcde8abca178bde2 (diff) | |
Merge remote-tracking branch 'origin/master' into lexelby/bug-fixes
Diffstat (limited to 'lib/stitch_plan/stitch_plan.py')
| -rw-r--r-- | lib/stitch_plan/stitch_plan.py | 6 |
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: |
