Advertisement Jump to content
Sign in to follow this  

Using Triangle mesher

This topic is 2532 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 (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.

Thank you.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!