fel88 / DeepNestPort

DeepNest C# Port
MIT License
79 stars 35 forks source link

Support of path elements #15

Closed DavidLeonardWenzel closed 2 years ago

DavidLeonardWenzel commented 3 years ago

https://github.com/fel88/DeepNestPort/blob/50dad9f91fcd0f8474cf5c0632a5d35c0bc4cbeb/DeepNestLib/SvgParser.cs#L25

The file SvgParser suggests that path and rect elements are supported (lines 25-74) , but when loading svg's that contain path elements, no shape gets recognized. I am only able to nest the example svg's that consist of polygon points, using the examples included in this repo. I'm attaching an example SVG with paths to this comment (renamed to .CSV so that github let's me upload it here), that does not work for me.

I have not found an easy way to transform complex paths to polygons, so this route is not an easy work-around. If you have an idea what the problem is, I would like to contribute/help! example_path.csv

fel88 commented 3 years ago

Unfortunately, Svg 'paths' are not supported at the moment. Actually, it is better to use the DXF format. SvgParser was used just for debugging purposes.