From f3ed7249ebafdb140ee5479288a0ee73a9ec8eb3 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Fri, 7 Jun 2024 14:33:20 -0700 Subject: auto fill gap fix (#2884) * first try * fill gaps * fix style * add parameter * loops can only be made of non-segments --- lib/elements/fill_stitch.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/elements/fill_stitch.py') diff --git a/lib/elements/fill_stitch.py b/lib/elements/fill_stitch.py index 7b0ced92..f65c9c2b 100644 --- a/lib/elements/fill_stitch.py +++ b/lib/elements/fill_stitch.py @@ -275,6 +275,19 @@ class FillStitch(EmbroideryElement): def expand(self): return self.get_float_param('expand_mm', 0) + @property + @param('gap_fill_rows', + _('Gap Filling'), + tooltip=_('Add extra rows to compensate for gaps between sections caused by distortion.' + 'Rows are always added in pairs, so this number will be rounded up to the nearest multiple of 2.'), + unit='rows', + type='int', + default=0, + sort_index=21, + select_items=[('fill_method', 'auto_fill')]) + def gap_fill_rows(self): + return self.get_int_param('gap_fill_rows', 0) + @property @param('angle', _('Angle of lines of stitches'), @@ -1009,6 +1022,7 @@ class FillStitch(EmbroideryElement): starting_point, ending_point, self.underpath, + self.gap_fill_rows, self.enable_random_stitches, self.random_stitch_length_jitter, self.random_seed, -- cgit v1.2.3