summaryrefslogtreecommitdiff
path: root/lib/elements
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2022-05-02 15:00:52 -0400
committerKaalleen <reni@allenka.de>2022-05-04 19:18:33 +0200
commit76ab3197317f258ede1bd98195535f33b856b3fd (patch)
tree9e0b61107d6f37ef81a279088797fa6d4578b235 /lib/elements
parent60fb7d0a9efa43d3b58867927ecede6cfdc5ab21 (diff)
add avoid_self_Crossing option
Diffstat (limited to 'lib/elements')
-rw-r--r--lib/elements/fill_stitch.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/elements/fill_stitch.py b/lib/elements/fill_stitch.py
index 4157d3fb..bc022ab3 100644
--- a/lib/elements/fill_stitch.py
+++ b/lib/elements/fill_stitch.py
@@ -119,6 +119,11 @@ class FillStitch(EmbroideryElement):
return self.get_boolean_param('interlaced', True)
@property
+ @param('avoid_self_crossing', _('Avoid self-crossing'), type='boolean', default=False, select_items=[('fill_method', 1)], sort_index=2)
+ def avoid_self_crossing(self):
+ return self.get_boolean_param('avoid_self_crossing', False)
+
+ @property
@param('angle',
_('Angle of lines of stitches'),
tooltip=_('The angle increases in a counter-clockwise direction. 0 is horizontal. Negative angles are allowed.'),
@@ -569,12 +574,14 @@ class FillStitch(EmbroideryElement):
connectedLine, _ = tangential_fill_stitch_line_creator.offset_poly(
poly,
-self.row_spacing,
- self.join_style+1,
+ self.join_style + 1,
self.max_stitch_length,
min(self.min_stitch_length, self.max_stitch_length),
self.interlaced,
self.tangential_strategy,
- shgeo.Point(starting_point))
+ shgeo.Point(starting_point),
+ self.avoid_self_crossing
+ )
path = [InkstitchPoint(*p) for p in connectedLine]
stitch_group = StitchGroup(
color=self.color,