DesignEngrLab / MIConvexHull

A .Net fast convex hull library for 2, 3, and higher dimensions.
http://designengrlab.github.io/MIConvexHull/
MIT License
338 stars 60 forks source link

Constrained Delunay Triangulation #6

Closed HappyFolk closed 7 years ago

HappyFolk commented 7 years ago

Hi,

Is it possible to use this library for constrainted delunay triangulation? I've tried MIConvexHull and it is generating just the convex hull by default. Looking at the code it doesn't seem to have support for that.

Is it be possible to add that functionality to this library? If so, how hard would it be? Could you provide any suggestions where to look for that logic or how can i implement that?

I've looked at Triangle, Triangle.NET and they seems to be much more comlex compared to what i need. My input is a set of points that never contain any holes, but they have concavities. (basically shapes represented by their boundaries) My understanding about doing this so far is, that i need to convert my vertices to a PSGL somehow, then it could be given as an input for the constrainted triangulation. I pretty much need the output as a list of triangles, which you already provide. (always 2D) I need to maintain the code, therefore i would prefer to avoid the usage of any complex libraries if possible.

Thanks in advance. Cheers, Kristof

micampbell commented 7 years ago

I've looked at how to create constrained Delaunay triangulation before and the methods to do this are significantly more complicated than using the ones created here. Granted many methods would start with the Delaunay triangulation that MIConvexHull would provide, but then they would use additional methods to: remove tetrahedrons (not too difficult), add in the faces and edges of the original model (a little tricky), fix the intersecting tetrahedrons, faces, and edges in the triangulation (okay, thats hard), and even introduce new vertices into the model (hard and potentially unwanted). I would like to build this in to my TVGL library at some point (https://github.com/DesignEngrLab/TVGL). Interested in helping out?