From e9278c55c34b72bb0beccf0d9b8bfe300aacac70 Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Sun, 27 Nov 2022 08:37:59 +0100 Subject: This and that (#1727) * dont fail on satin with fill * fill stitch error message * convert to satin mac issue * auto_satin: add rung for two node old style satins * avoid divide by zero in intersect_region_with_grating * fix for incorrect stagger in guided fill * better rail sectioning algorithm * fix #1780 * fix #1816 Co-authored-by: Lex Neva --- lib/elements/fill_stitch.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'lib/elements/fill_stitch.py') diff --git a/lib/elements/fill_stitch.py b/lib/elements/fill_stitch.py index a5248952..173868d4 100644 --- a/lib/elements/fill_stitch.py +++ b/lib/elements/fill_stitch.py @@ -272,6 +272,8 @@ class FillStitch(EmbroideryElement): return shgeo.MultiPolygon([valid_shape]) if isinstance(valid_shape, shgeo.LineString): return shgeo.MultiPolygon([]) + if shape.area == 0: + return shgeo.MultiPolygon([]) polygons = [] for polygon in valid_shape.geoms: @@ -713,12 +715,17 @@ class FillStitch(EmbroideryElement): # for an uncaught exception, give a little more info so that they can create a bug report message = "" - message += _("Error during autofill! This means that there is a problem with Ink/Stitch.") + message += _("Error during autofill! This means it is a bug in Ink/Stitch.") message += "\n\n" # L10N this message is followed by a URL: https://github.com/inkstitch/inkstitch/issues/new - message += _("If you'd like to help us make Ink/Stitch better, please paste this whole message into a new issue at: ") - message += "https://github.com/inkstitch/inkstitch/issues/new\n\n" - message += version.get_inkstitch_version() + "\n\n" + message += _("If you'd like to help please\n" + "- copy the entire error message below\n" + "- save your SVG file and\n" + "- create a new issue at") + message += " https://github.com/inkstitch/inkstitch/issues/new\n\n" + message += _("Include the error description and also (if possible) the svg file.") + message += '\n\n\n' + message += version.get_inkstitch_version() + '\n' message += traceback.format_exc() self.fatal(message) -- cgit v1.2.3 From b8161a97c3d279265cb322697f5e2e824b666fbc Mon Sep 17 00:00:00 2001 From: Kaalleen Date: Sun, 27 Nov 2022 10:17:43 +0100 Subject: satin offset_points --- lib/elements/fill_stitch.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/elements/fill_stitch.py') diff --git a/lib/elements/fill_stitch.py b/lib/elements/fill_stitch.py index 173868d4..f4a21f90 100644 --- a/lib/elements/fill_stitch.py +++ b/lib/elements/fill_stitch.py @@ -113,8 +113,8 @@ class FillStitch(EmbroideryElement): @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.' + + 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) @@ -216,7 +216,7 @@ class FillStitch(EmbroideryElement): @property @param('staggers', _('Stagger rows this many times before repeating'), - tooltip=_('Length of the cycle by which successive stitch rows are staggered.' + tooltip=_('Length of the cycle by which successive stitch rows are staggered. ' 'Fractional values are allowed and can have less visible diagonals than integer values.'), type='int', sort_index=6, -- cgit v1.2.3