pathbuilder icon indicating copy to clipboard operation
pathbuilder copied to clipboard

Incorrect path parsing with multiple-valued h and v commands.

Open mwebb759 opened this issue 9 months ago • 0 comments

When multiple values are given for an 'h' or 'v' command, only the first is used, all others are ignored.

The following openscad script

include <./include/pathbuilder/pathbuilder.scad>
path = svgPoints("m 0,0 l 10,10 h -5 -5 z");
echo(path);
polygon(path[0]);

produces this preview: Image and emits:

ECHO: [[[0, 0], [10, 10], [5, 10], [0, 0]]]

whereas, the same path in inkscape shows as: Image

Inkscape will also produce paths written in this way.

I haven't checked if this is an issue for commands other than 'h' and 'v'.

mwebb759 avatar Jul 27 '25 14:07 mwebb759