JSCAD is an open source set of modular, browser and command line tools for creating parametric 2D and 3D designs with JavaScript code. It provides a quick, precise and reproducible method for generating 3D models, and is especially useful for 3D printing applications.
Fix a bunch of bugs in the svg-deserializer. Specifically we were not computing quadratic bezier paths correctly.
To convert a quadratic bezier curve to a cubic curve requires generating the following control points:
But the code was previously doing:
Visually this means we were using the green dot twice, instead of computing the red dots:
Fixes #1222
Also found a bug where we were not converting svg unit for
[cx, cy]
on the svgt
command.Cleaned up the code style to make more readable. Changes to functionality were only in
q
,Q
,t
, andT
svg commands.All Submissions: