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, 4 insertions, 2 deletions
diff --git a/lib/stitch_plan/stitch_plan.py b/lib/stitch_plan/stitch_plan.py
index 47e8b203..01463aba 100644
--- a/lib/stitch_plan/stitch_plan.py
+++ b/lib/stitch_plan/stitch_plan.py
@@ -19,7 +19,9 @@ def patches_to_stitch_plan(patches, collapse_len=None, disable_ties=False):
* adds jump-stitches between patches if necessary
"""
- collapse_len = (collapse_len or 3.0) * PIXELS_PER_MM
+ if collapse_len is None:
+ collapse_len = 3.0
+ collapse_len = collapse_len * PIXELS_PER_MM
stitch_plan = StitchPlan()
color_block = stitch_plan.new_color_block(color=patches[0].color)
@@ -45,7 +47,7 @@ def patches_to_stitch_plan(patches, collapse_len=None, disable_ties=False):
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)
+ color_block.add_stitches(stitches=patch.stitches, tie_modus=patch.tie_modus, no_ties=patch.stitch_as_is)
if patch.trim_after:
color_block.add_stitch(trim=True)