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.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/stitch_plan/stitch_plan.py b/lib/stitch_plan/stitch_plan.py
index 4593781a..04d587c2 100644
--- a/lib/stitch_plan/stitch_plan.py
+++ b/lib/stitch_plan/stitch_plan.py
@@ -13,7 +13,7 @@ from .color_block import ColorBlock
from .ties import add_ties
-def stitch_groups_to_stitch_plan(stitch_groups, collapse_len=None, disable_ties=False): # noqa: C901
+def stitch_groups_to_stitch_plan(stitch_groups, collapse_len=None, min_stitch_len=0.1, disable_ties=False): # noqa: C901
"""Convert a collection of StitchGroups to a StitchPlan.
@@ -71,7 +71,7 @@ def stitch_groups_to_stitch_plan(stitch_groups, collapse_len=None, disable_ties=
# last block ended in a stop, so now we have an empty block
del stitch_plan.color_blocks[-1]
- stitch_plan.filter_duplicate_stitches()
+ stitch_plan.filter_duplicate_stitches(min_stitch_len)
if not disable_ties:
stitch_plan.add_ties()
@@ -101,9 +101,9 @@ class StitchPlan(object):
def add_color_block(self, color_block):
self.color_blocks.append(color_block)
- def filter_duplicate_stitches(self):
+ def filter_duplicate_stitches(self, min_stitch_len):
for color_block in self:
- color_block.filter_duplicate_stitches()
+ color_block.filter_duplicate_stitches(min_stitch_len)
def add_ties(self):
# see ties.py