summaryrefslogtreecommitdiff
path: root/lib/elements/fill.py
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2018-12-12 20:26:22 -0500
committerLex Neva <github.com@lexneva.name>2018-12-12 20:55:04 -0500
commit9ae97154d689b188c796e5d11820e026ed1f9326 (patch)
treed372594adc55e88492f3d9b43c363f833ae2bb34 /lib/elements/fill.py
parent7a73b201159bec1c45ad483251264baf872f6952 (diff)
add option to skip last stitch in fill rows
Diffstat (limited to 'lib/elements/fill.py')
-rw-r--r--lib/elements/fill.py21
1 files changed, 17 insertions, 4 deletions
diff --git a/lib/elements/fill.py b/lib/elements/fill.py
index 4156a24b..357adf4b 100644
--- a/lib/elements/fill.py
+++ b/lib/elements/fill.py
@@ -1,11 +1,12 @@
-from shapely import geometry as shgeo
import math
-from .element import param, EmbroideryElement, Patch
+from shapely import geometry as shgeo
+
from ..i18n import _
+from ..stitches import legacy_fill
from ..svg import PIXELS_PER_MM
from ..utils import cache
-from ..stitches import legacy_fill
+from .element import param, EmbroideryElement, Patch
class Fill(EmbroideryElement):
@@ -42,6 +43,17 @@ class Fill(EmbroideryElement):
@property
@param(
+ 'skip_last',
+ _('Skip last stitch in each row'),
+ tooltip=_('The last stitch in each row is quite close to the first stitch in the next row. '
+ 'Skipping it decreases stitch count and density.'),
+ type='boolean',
+ default=False)
+ def skip_last(self):
+ return self.get_boolean_param("skip_last", False)
+
+ @property
+ @param(
'flip',
_('Flip fill (start right-to-left)'),
tooltip=_('The flip option can help you with routing your stitch path. '
@@ -133,5 +145,6 @@ class Fill(EmbroideryElement):
self.end_row_spacing,
self.max_stitch_length,
self.flip,
- self.staggers)
+ self.staggers,
+ self.skip_last)
return [Patch(stitches=stitch_list, color=self.color) for stitch_list in stitch_lists]