inkstitch / inkstitch

Ink/Stitch: an Inkscape extension for machine embroidery design
https://inkstitch.org
GNU General Public License v3.0
956 stars 172 forks source link

Fill to Stroke failing on certain filled strokes #2675

Closed BearOfTheSeas closed 7 months ago

BearOfTheSeas commented 8 months ago

Hi, I'm attempting to use the fill to stroke on a number of linear fills in a file I found online, most are working perfectly but a minority are failing with the following error even though they are not discernibly different in width, complexity, etc from the objects that are working. The attached file contains two of these objects, attempting fill to stroke on either with the settings in the screenshot should reproduce the error.

Ink/Stitch Version: remove-old-troubleshoot-layer (osx)

Traceback (most recent call last): File "inkstitch.py", line 85, in File "inkex/base.py", line 250, in run File "lib/extensions/fill_to_stroke.py", line 70, in effect File "lib/extensions/fill_to_stroke.py", line 128, in _get_centerline File "lib/extensions/fill_to_stroke.py", line 148, in _get_voronoi_centerline File "shapely/ops.py", line 218, in voronoi_diagram AttributeError: 'NoneType' object has no attribute 'geom_type'

petal 5

Screen Shot 2024-01-07 at 7 00 20 PM
kaalleen commented 8 months ago

Oh nice. Thank you so much for posting this issue. Definitely a bug we need to fix. In the meantime you can utilize Tools: Fill > Break apart fill objects to fix the issue on your side.

BearOfTheSeas commented 8 months ago

Thanks so much! While we're on the subject of fill to stroke, it would be really useful if the original object name was inherited by the resulting path (for one to one conversions, which should ideally not create a group at all) or by the resulting group (for one to many conversions.) Ideally this should be inherited as "objectname centerline" or similar when keep original is selected and simply "objectname" when it is not. I realize this is a bit picky but I think it would make the tool much more user friendly, especially when operating on large numbers of objects.