I am using Triangle (http://www.cs.cmu.ed...e/triangle.html), and I ran into a problem that, even after reading and rereading the documentation, debug-stepping through the code, and trying different examples, I am unable solve. So if anyone has done this before, I would very much appreciate your advice.
I compiled Triangle as a dll, and I am using it from VB.net (but that is pretty much irrelevant). I have polygons defined as sets of vertices (clockwise oriented; I also tried counter-clockwise, I obviously get the same result). I want Triangle to triangulate these polygons. I am calling it with the following switches:
and I am passing in input.pointlist, input.segmentlist, input.edgelist, input.segmentmarkerlist, input.edgemarkerlist (segment, edge and marker lists are my attempt to fix the problem).
So basically I am calling it with a set of points defining the polygon. I only need the triangles and new points back (no markers, attributes, or any of that stuff).
What is happening is that for concave polygons, Triangle creates a convex hull and triangulates it (as if there were no boundaries defined even though I pass edges/segments). Is there a way to avoid this (I want the concave polygon to stay the way it is, just triangulated)? (I cannot create poly or any input files, I have to pass parameters in as variables, and I have to use Triangle as a library)
I am already considering splitting concave polygons into convex and then passing them to Triangle, but I would rather not have to do this.
FrozenHamsterMember Since 17 Feb 2012
Offline Last Active Mar 05 2012 03:22 PM