Open brucedjones opened 3 years ago
SVG paths don’t have a concept of rotation. So, yeah. Some paths with definitely be going clockwise about Z. You’ll have to do some calculations to determine if the path needs to be reversed before extruding, or converting to 2D geometry.
Hm I'm going to have to do some reading on this... Fwiw the svg in the example is a filled polygon, there must be some convention to that for it to work and I think a user would intuitively expect the svg deserializer to figure it out
The results are paths… which can be any order of points.
If the path is closed then it’s easy to convert to 2D geometry (geom2). The area of a 2D geometry will be positive (CCW rotation) or negative (CW rotation).
@brucedjones #889 isCCW willl probably be useful
@brucedjones taking another look at the given example, using target: "geom2" should produce valid useful geometries, so this is probably something that should be fixed.
Expected Behavior
Geometries have correct normals when extruded from svg
Actual Behavior
Geometry normals are flipped.
Steps to Reproduce the Problem
Run the code below. Note you must be using the fixes described here: https://github.com/jscad/OpenJSCAD.org/pull/887
Specifications