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.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/stitch_plan/stitch_plan.py b/lib/stitch_plan/stitch_plan.py
index fc725371..f3827f54 100644
--- a/lib/stitch_plan/stitch_plan.py
+++ b/lib/stitch_plan/stitch_plan.py
@@ -14,7 +14,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)