Open PechenTreski opened 3 years ago
I see, this path data is using the C
curve command to create smooth curves with multiple Bezier control points (more than 4).
https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#curve_commands
We currently don't have code to create the smoothed control points. As a workaround, do you have any option of creating separate curves?
Hi again, Dan! :) You are partly right, there are curves with multiple control points in the first svg path. Sorry that I did not mention it, but there is another svg path that stays on the next line and is commented out. It is actually the same shape (only written in absolute coordinates and a bit simplified in it's structure), and there are no curves with >4 control points in it. And this second path gives the same result. I tried to play a bit with the shape in Inkscape, and I found out that the problem disappears when I change the Arc "A179.9415 179.9415 0 0 0 8891.5352 3834.6895", that's why I assumed that the problem is rather with arcs than with curves.
Thanks for the clarification. BTW I am using this great tool to analyze SVG paths: https://yqnn.github.io/svg-path-editor/
Pasting in your path data, we can see that there are some arcs which are degenerate - they have 0 0
as their dx, dy
, which means zero radius.
I suppose Maker.js could catch this, and drop the incoming command. Until then, perhaps you can use svgo (command line) or svgomg (gui) which removes these non-contributing commands.
Dan, simply wow, thank you for the great tool! :) Yes, it'd be wonderful if makerjs would ignore such incorrect commands (with warnings?), then one'd not be so surprised seeing Inkscape drawing such paths normally. Thanks for help!
Hello, I found a path that can not be imported, because it contains arcs that makerjs somehow does not understand, failing to find intersections. The exact error is:
the code