QThund / ConstrainedDelaunayTriangulation

My implementation of the Delaunay triangulation with constrained edges, according to Sloan's papers
MIT License
61 stars 16 forks source link

Fix delaunay constraint fulfillment in some edge cases #3

Closed picolino0 closed 1 year ago

picolino0 commented 1 year ago

In some cases you may have to go through multiple adjacent triangles when checking for the constraint. You can't assume in this case that you only need to check the adjacent triangles of the opposite triangle nor can you assume that the index of the vertex outside of the triangle is always 0.

This was causing some issues with simple shapes like a 10x10 grid.

QThund commented 1 year ago

Thank you picolino for detecting and fixing the bug. I've merged your code to the main branch. It also fixes some freezing issues (infinite looping).