discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

triangulation of a multi point, non planar faces polygon

B
BenZ
Fri, Jun 5, 2015 1:24 PM

Hi
I use a polyhedron to create an object like this;

polyhedron(points = points_3Dvec,
faces =my_faces);

In my_faces there is a multipoint face like so [23,3,4,5,6,7,44,66].
My math says its planar, but OpenScad (or CGAL or someone else) thinks it is
not. To be honest, I rotate the thing.

In short, is it possible to triangulate the thing?  The texts on Wikipedia
looked like a lot of work.
Perhaps someone has code for that?
Thanks for any tips
BenZ

--
View this message in context: http://forum.openscad.org/triangulation-of-a-multi-point-non-planar-faces-polygon-tp12793.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Hi I use a polyhedron to create an object like this; polyhedron(points = points_3Dvec, faces =my_faces); In my_faces there is a multipoint face like so [23,3,4,5,6,7,44,66]. My math says its planar, but OpenScad (or CGAL or someone else) thinks it is not. To be honest, I rotate the thing. In short, is it possible to triangulate the thing? The texts on Wikipedia looked like a lot of work. Perhaps someone has code for that? Thanks for any tips BenZ -- View this message in context: http://forum.openscad.org/triangulation-of-a-multi-point-non-planar-faces-polygon-tp12793.html Sent from the OpenSCAD mailing list archive at Nabble.com.
TP
Torsten Paul
Fri, Jun 5, 2015 3:11 PM

Hi!

On 06/05/2015 03:24 PM, BenZ wrote:

In my_faces there is a multipoint face like so [23,3,4,5,6,7,44,66].
My math says its planar, but OpenScad (or CGAL or someone else) thinks it is
not. To be honest, I rotate the thing.

What's the actual issue? And what version of OpenSCAD is it about?

In short, is it possible to triangulate the thing?  The texts on Wikipedia
looked like a lot of work.
Perhaps someone has code for that?

Possible yes. One option could be to find a file format that supports polygons
(I think OBJ supports that) and try some tools to convert to STL or AMF that
do only support triangles and extract the points/faces again.
Not sure if that helps though, as most programs will use floating point
calculations which are not always matching what math says.

ciao,
Torsten.

Hi! On 06/05/2015 03:24 PM, BenZ wrote: > In my_faces there is a multipoint face like so [23,3,4,5,6,7,44,66]. > My math says its planar, but OpenScad (or CGAL or someone else) thinks it is > not. To be honest, I rotate the thing. > What's the actual issue? And what version of OpenSCAD is it about? > In short, is it possible to triangulate the thing? The texts on Wikipedia > looked like a lot of work. > Perhaps someone has code for that? > Possible yes. One option could be to find a file format that supports polygons (I think OBJ supports that) and try some tools to convert to STL or AMF that do only support triangles and extract the points/faces again. Not sure if that helps though, as most programs will use floating point calculations which are not always matching what math says. ciao, Torsten.
B
BenZ
Fri, Jun 5, 2015 4:28 PM

tp3 wrote

In my_faces there is a multipoint face like so [23,3,4,5,6,7,44,66].
My math says its planar, but OpenScad (or CGAL or someone else) thinks it
is
not. To be honest, I rotate the thing.

What's the actual issue? And what version of OpenSCAD is it about?

The issue is, that I must close a hole on a complex polyhedron. The opening
has the described multipoint face [23,3,4,5,6,7,44,66] (a.k. the
hole...insert dramatic sound). So i need a function to insert the multipoint
face and as a result something like this appears : [[23,3,4],[3,4,5],....]

OpenScad version 2015.04.25, git 2b33922

tp3 wrote

In short, is it possible to triangulate the thing?  The texts on
Wikipedia
looked like a lot of work.
Perhaps someone has code for that?

Possible yes. One option could be to find a file format that supports
polygons
(I think OBJ supports that) and try some tools to convert to STL or AMF
that
do only support triangles and extract the points/faces again.
Not sure if that helps though, as most programs will use floating point
calculations which are not always matching what math says.

Good idea, why overkill, I could precalculate it and hardcode it! Face
Sometimes discussing helps.
Well of course an algorithm would be more professional...anyone else?

--
View this message in context: http://forum.openscad.org/triangulation-of-a-multi-point-non-planar-faces-polygon-tp12793p12796.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

tp3 wrote >> In my_faces there is a multipoint face like so [23,3,4,5,6,7,44,66]. >> My math says its planar, but OpenScad (or CGAL or someone else) thinks it >> is >> not. To be honest, I rotate the thing. >> > What's the actual issue? And what version of OpenSCAD is it about? The issue is, that I must close a hole on a complex polyhedron. The opening has the described multipoint face [23,3,4,5,6,7,44,66] (a.k. the hole...insert dramatic sound). So i need a function to insert the multipoint face and as a result something like this appears : [[23,3,4],[3,4,5],....] OpenScad version 2015.04.25, git 2b33922 tp3 wrote >> In short, is it possible to triangulate the thing? The texts on >> Wikipedia >> looked like a lot of work. >> Perhaps someone has code for that? > > > Possible yes. One option could be to find a file format that supports > polygons > (I think OBJ supports that) and try some tools to convert to STL or AMF > that > do only support triangles and extract the points/faces again. > Not sure if that helps though, as most programs will use floating point > calculations which are not always matching what math says. Good idea, why overkill, I could precalculate it and hardcode it! Face Sometimes discussing helps. Well of course an algorithm would be more professional...anyone else? -- View this message in context: http://forum.openscad.org/triangulation-of-a-multi-point-non-planar-faces-polygon-tp12793p12796.html Sent from the OpenSCAD mailing list archive at Nabble.com.