diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2021-12-09 15:05:21 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-09 15:05:21 +0100 |
| commit | 36f7610cc0844a034ba068b549332cab3ef7b033 (patch) | |
| tree | e63e66d8313df795d26efb42833f103f3554971a /lib/stitch_plan/stitch_plan.py | |
| parent | 41ace3a9e53b52b4271554d7aedd88d533ee5f5e (diff) | |
Force lock stitches option/extension and some typos (#1471)
Diffstat (limited to 'lib/stitch_plan/stitch_plan.py')
| -rw-r--r-- | lib/stitch_plan/stitch_plan.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/stitch_plan/stitch_plan.py b/lib/stitch_plan/stitch_plan.py index 7e7621c1..f6895197 100644 --- a/lib/stitch_plan/stitch_plan.py +++ b/lib/stitch_plan/stitch_plan.py @@ -42,10 +42,13 @@ def stitch_groups_to_stitch_plan(stitch_groups, collapse_len=None, disable_ties= # always start a color with a JUMP to the first stitch position color_block.add_stitch(stitch_group.stitches[0], jump=True) else: - if len(color_block) and (stitch_group.stitches[0] - color_block.stitches[-1]).length() > collapse_len: + if (len(color_block) and + ((stitch_group.stitches[0] - color_block.stitches[-1]).length() > collapse_len or + color_block.stitches[-1].force_lock_stitches)): color_block.add_stitch(stitch_group.stitches[0], jump=True) - color_block.add_stitches(stitches=stitch_group.stitches, tie_modus=stitch_group.tie_modus, no_ties=stitch_group.stitch_as_is) + color_block.add_stitches(stitches=stitch_group.stitches, tie_modus=stitch_group.tie_modus, + force_lock_stitches=stitch_group.force_lock_stitches, no_ties=stitch_group.stitch_as_is) if stitch_group.trim_after: color_block.add_stitch(trim=True) |
