scad-utils
scad-utils copied to clipboard
shapes.scad: Winding order is inconsistent
In shapes.scad, the winding order of the shapes are inconsistent.
- square(): clockwise
- circle(): anti-clockwise
- regular(): anti-clockwise (as it uses circle())
- rectangle_profile(): anti-clockwise
This causes trouble when sweep()-ing (as in https://github.com/openscad/list-comprehension-demos/blob/master/sweep.scad) circle(), as the normals of the resulting polygon end up pointing inwards instead of outwards.
It would probably make sense to make all of the shapes have anti-clockwise winding order, to match the OpenSCAD polyhedron expectations.
(btw, I'm happy to submit a pull request to fix it if you agree)