diff options
Diffstat (limited to 'lib/elements')
| -rw-r--r-- | lib/elements/fill_stitch.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/elements/fill_stitch.py b/lib/elements/fill_stitch.py index 980103a4..7b146a36 100644 --- a/lib/elements/fill_stitch.py +++ b/lib/elements/fill_stitch.py @@ -554,6 +554,16 @@ class FillStitch(EmbroideryElement): return self.get_float_param('expand_mm', 0) @property + @param('clip', _('Clip path'), + tooltip=_('Constrain stitching to the shape. Useful when smoothing and expand are used.'), + type='boolean', + default=False, + select_items=[('fill_method', 'meander_fill')], + sort_index=6) + def clip(self): + return self.get_boolean_param('clip', False) + + @property @param('underpath', _('Underpath'), tooltip=_('Travel inside the shape when moving from section to section. Underpath ' @@ -648,7 +658,7 @@ class FillStitch(EmbroideryElement): elif self.fill_method == 'guided_fill': stitch_groups.extend(self.do_guided_fill(fill_shape, previous_stitch_group, start, end)) elif self.fill_method == 'meander_fill': - stitch_groups.extend(self.do_meander_fill(fill_shape, i, start, end)) + stitch_groups.extend(self.do_meander_fill(fill_shape, shape, i, start, end)) elif self.fill_method == 'circular_fill': stitch_groups.extend(self.do_circular_fill(fill_shape, previous_stitch_group, start, end)) except ExitThread: @@ -792,11 +802,11 @@ class FillStitch(EmbroideryElement): )) return [stitch_group] - def do_meander_fill(self, shape, i, starting_point, ending_point): + def do_meander_fill(self, shape, original_shape, i, starting_point, ending_point): stitch_group = StitchGroup( color=self.color, tags=("meander_fill", "meander_fill_top"), - stitches=meander_fill(self, shape, i, starting_point, ending_point)) + stitches=meander_fill(self, shape, original_shape, i, starting_point, ending_point)) return [stitch_group] @cache |
