From 92ac7986937c14b224a24aa483d668557ee8ba53 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Sun, 28 Jan 2024 08:48:44 +0100 Subject: add zigzag option to meander (#2699) --- lib/elements/fill_stitch.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'lib/elements/fill_stitch.py') diff --git a/lib/elements/fill_stitch.py b/lib/elements/fill_stitch.py index 593791e5..267dbbd5 100644 --- a/lib/elements/fill_stitch.py +++ b/lib/elements/fill_stitch.py @@ -422,6 +422,32 @@ class FillStitch(EmbroideryElement): def bean_stitch_repeats(self): return self.get_multiple_int_param("bean_stitch_repeats", "0") + @property + @param('zigzag_spacing_mm', + _('Zig-zag spacing (peak-to-peak)'), + tooltip=_('Length of stitches in zig-zag mode.'), + unit='mm', + type='float', + select_items=[('fill_method', 'meander_fill')], + default=0, + sort_index=35) + @cache + def zigzag_spacing(self): + return self.get_float_param("zigzag_spacing_mm", 0) + + @property + @param('zigzag_width_mm', + _('Zigzag width'), + tooltip=_('Width of the zigzag line.'), + unit='mm', + type='float', + select_items=[('fill_method', 'meander_fill')], + default=3, + sort_index=36) + @cache + def zigzag_width(self): + return self.get_float_param("zigzag_width_mm", 0) + @property def color(self): # SVG spec says the default fill is black -- cgit v1.2.3