Jump to content
  • Advertisement
Sign in to follow this  
FrozenHamster

Using Triangle mesher

This topic is 2468 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

Hello,
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:
"zBYa30.0S80PCV"
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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!