summaryrefslogtreecommitdiff
path: root/lib/elements
diff options
context:
space:
mode:
Diffstat (limited to 'lib/elements')
-rw-r--r--lib/elements/fill_stitch.py19
1 files changed, 16 insertions, 3 deletions
diff --git a/lib/elements/fill_stitch.py b/lib/elements/fill_stitch.py
index dbd94fb4..157169ab 100644
--- a/lib/elements/fill_stitch.py
+++ b/lib/elements/fill_stitch.py
@@ -111,6 +111,15 @@ class FillStitch(EmbroideryElement):
return self.get_int_param('fill_method', 0)
@property
+ @param('guided_fill_strategy', _('Guided Fill Strategy'), type='dropdown', default=0,
+ options=[_("Copy"), _("Parallel Offset")], select_items=[('fill_method', 2)], sort_index=3,
+ tooltip=_('Copy (the default) will fill the shape with shifted copies of the line.' +
+ 'Parallel offset will ensure that each line is always a consistent distance from its neighbor.' +
+ 'Sharp corners may be introduced.'))
+ def guided_fill_strategy(self):
+ return self.get_int_param('guided_fill_strategy', 0)
+
+ @property
@param('contour_strategy', _('Contour Fill Strategy'), type='dropdown', default=0,
options=[_("Inner to Outer"), _("Single spiral"), _("Double spiral")], select_items=[('fill_method', 1)], sort_index=3)
def contour_strategy(self):
@@ -210,7 +219,7 @@ class FillStitch(EmbroideryElement):
tooltip=_('Setting this dictates how many rows apart the stitches will be before they fall in the same column position.'),
type='int',
sort_index=6,
- select_items=[('fill_method', 0), ('fill_method', 3)],
+ select_items=[('fill_method', 0), ('fill_method', 2), ('fill_method', 3)],
default=4)
def staggers(self):
return max(self.get_int_param("staggers", 4), 1)
@@ -648,7 +657,7 @@ class FillStitch(EmbroideryElement):
# No guide line: fallback to normal autofill
if not guide_line:
- return self.do_auto_fill(last_patch, starting_point, ending_point)
+ return self.do_auto_fill(shape, last_patch, starting_point, ending_point)
stitch_group = StitchGroup(
color=self.color,
@@ -658,12 +667,16 @@ class FillStitch(EmbroideryElement):
guide_line.geoms[0],
self.angle,
self.row_spacing,
+ self.staggers,
self.max_stitch_length,
self.running_stitch_length,
+ self.running_stitch_tolerance,
self.skip_last,
starting_point,
ending_point,
- self.underpath))
+ self.underpath,
+ self.guided_fill_strategy,
+ ))
return [stitch_group]
@cache