discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] polyhedron no top level geometry to render

K
kitwallace
Sun, Apr 5, 2015 3:13 PM

Oh I know, I often get the winding order wrong = 'Thrown together' is your
friend.

I find a reverse function useful in cases where the natural ordering of
points is anti-clockwise.

I meant that faces don't have to be triangles so in this case they could be

faces=[
[0,2,3,1],[4,5,7,6],[0,1,5,4],[2,6,7,3],[0,4,6,2],[1,3,7,5]
]

Chris

--
View this message in context: http://forum.openscad.org/polyhedron-no-top-level-geometry-to-render-tp12310p12314.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Oh I know, I often get the winding order wrong = 'Thrown together' is your friend. I find a reverse function useful in cases where the natural ordering of points is anti-clockwise. I meant that faces don't have to be triangles so in this case they could be faces=[ [0,2,3,1],[4,5,7,6],[0,1,5,4],[2,6,7,3],[0,4,6,2],[1,3,7,5] ] Chris -- View this message in context: http://forum.openscad.org/polyhedron-no-top-level-geometry-to-render-tp12310p12314.html Sent from the OpenSCAD mailing list archive at Nabble.com.
W
whosawhatsis
Sun, Apr 5, 2015 7:04 PM

CGAL doesn't seem to allow you to have negative closed spaces, and "helpfully" reverses them if it finds one. This prevents exporting objects with hollow spaces, but it should also allow you to fix a polyhedron with all of its faces in the reverse winding order (though not a mix of clockwise and counter-clockwise) by using render().

Note, I haven't tried this, and it's possible (though unlikely, because it probably would have been fixed by now if it were the case) that this check happens right before export, and wouldn't affect render().

On Sunday, April 5, 2015 at 08:13, kitwallace wrote:

Oh I know, I often get the winding order wrong = 'Thrown together' is your
friend.

I find a reverse function useful in cases where the natural ordering of
points is anti-clockwise.

I meant that faces don't have to be triangles so in this case they could be

faces=[
[0,2,3,1],[4,5,7,6],[0,1,5,4],[2,6,7,3],[0,4,6,2],[1,3,7,5]
]

Chris

--
View this message in context: http://forum.openscad.org/polyhedron-no-top-level-geometry-to-render-tp12310p12314.html
Sent from the OpenSCAD mailing list archive at Nabble.com (http://Nabble.com).


OpenSCAD mailing list
Discuss@lists.openscad.org (mailto:Discuss@lists.openscad.org)
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

CGAL doesn't seem to allow you to have negative closed spaces, and "helpfully" reverses them if it finds one. This prevents exporting objects with hollow spaces, but it should also allow you to fix a polyhedron with all of its faces in the reverse winding order (though not a mix of clockwise and counter-clockwise) by using render(). Note, I haven't tried this, and it's possible (though unlikely, because it probably would have been fixed by now if it were the case) that this check happens right before export, and wouldn't affect render(). On Sunday, April 5, 2015 at 08:13, kitwallace wrote: > Oh I know, I often get the winding order wrong = 'Thrown together' is your > friend. > > I find a reverse function useful in cases where the natural ordering of > points is anti-clockwise. > > I meant that faces don't have to be triangles so in this case they could be > > faces=[ > [0,2,3,1],[4,5,7,6],[0,1,5,4],[2,6,7,3],[0,4,6,2],[1,3,7,5] > ] > > Chris > > > > -- > View this message in context: http://forum.openscad.org/polyhedron-no-top-level-geometry-to-render-tp12310p12314.html > Sent from the OpenSCAD mailing list archive at Nabble.com (http://Nabble.com). > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org (mailto:Discuss@lists.openscad.org) > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >