Skip to content

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

Description

@mwebb759

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'.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions