jscad / io

DEPRECATED : Input Output handling for JSCAD (see the link below)
https://github.com/jscad/OpenJSCAD.org/tree/V2/packages
34 stars 13 forks source link

fixed svg-deserializer to work with inkscape file #70

Closed pentacular closed 6 years ago

pentacular commented 6 years ago

Changes added to allow the deserialization of an actual svg produced by inkscape. Manually verified that the jscad output works with the test example.

The problems seem to have been due to a bunch of code that expected that undefined and null are interchangeable, and a faulty assumption that css styles contain at least one space.

It looks like this should also fix https://github.com/jscad/io/issues/57

z3dev commented 6 years ago

@pentacular BIG thanks for the fix. And the new test case as well!

We will review, and integrate for the next release.

pentacular commented 6 years ago

Depends on https://github.com/jscad/csg.js/pull/116 for Path.getTurn().

pentacular commented 6 years ago

jscad/csg.js#116 was merged into the master branch a little while ago.

Does something need to happen on this end for that to take effect?

z3dev commented 6 years ago

Nope. I believe this will also be merged when @kaosat-dev has time.

pentacular commented 6 years ago

Sounds good -- thanks. :)

kaosat-dev commented 6 years ago

haha no it is not quite that automated ! the csg dependency version needs to be updated in the PR. exceptionally I will do that myself & merge this PR btw @pentacular I just realized that we should have told you to add a function rather than a method (so not attached to the prototype) for getTurn, but our bad, we will change that for V2 :)

kaosat-dev commented 6 years ago

@pentacular closing this one as the other is merged, thanks for the nice upgrades !