Hello,
I'm trying to expand on Dov started to translate SVGs to 3D files.
https://groups.google.com/g/cadquery/c/AQCm40ong9c/m/SbisvrOvAwAJBezier Curves and Lines work fine. Arcs are more difficult because the SVG parameters are different than those needed for CadQuery (Ellipse Arc).
I have seen some issues with Dov's code and have tried implementing different libraries to aid in the conversion. All three generally give the same values.
Any SVG
without an arc translates into 3D without any errors.
A simple SVG with an arc (arc.svg) works fine with any of the translation methods (Dov, svgpathtool, or svg.path).
Any "complex" SVG (noun-pig-3851380.svg)
always fails when closing the path.
Can you provide any guidance on what this error message means? I assumed it's was a gap in the wire, but looking at the "last EndPoint" and "Start", they always match. See below.
Paths Found: 8
Path Index: 0
path is continuous? False
Start Path
Setting path_start
Arc 1 - Last EndPoint: None - Start: (364+293j) - End: (372.36+295.68j)
Arc 2 - Last EndPoint: (372.36+295.68j) - Start: (372.36+295.68j) - End: (377.68+294.82j)
Arc 3 - Last EndPoint: (377.68+294.82j) - Start: (377.68+294.82j) - End: (394.47+272.44j)
Cubic Bezier - Last EndPoint: (394.47+272.44j) - Start: (394.47+272.44j) - End: (388.91+259.81j)
Cubic Bezier - Last EndPoint: (388.91+259.81j) - Start: (388.91+259.81j) - End: (363.49+266.68j)
Cubic Bezier - Last EndPoint: (363.49+266.68j) - Start: (363.49+266.68j) - End: (364+293j)
Closing - End Point: (364+293j) - startPoint:(364+293j)