scad-utils icon indicating copy to clipboard operation
scad-utils copied to clipboard

shapes.scad: Winding order is inconsistent

Open usedbytes opened this issue 7 years ago • 0 comments

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)

usedbytes avatar Jan 06 '18 16:01 usedbytes