Closed Michael2109 closed 2 years ago
Hi, Michael,
Thanks for creating the issue. The reason could be:
CDT::FindDuplicates
method to check for duplicates in your input.points
?Provided code looks good to me at a quick glance. Except unless you have some other usages of CustomPoint2D
you could use CDT::V2d
without providing the getters. Also do you experience this issue on the latest master?
Thank you for the quick reply! I'll check for duplicates and if not I'll look into creating some data to reproduce the bug.
Yes I'm using master. I cloned it yesterday.
@artem-ogre It was duplicates! My algorithm that generated my polygon includes the end point which is the same as the start point.
Got to say that this library is amazing! Extremely fast and much easier to use then others I've seen.
Thank you for the quick response!
Great! I'm happy that it works and you like it. :)
I've noticed that sometimes an infinite loop can occur in
insertVertex
. If I print out thetriStack
size it increases indefinitely. It seems that `isFlipNeeded is returning true and constantly pushing new elements.I'm using your library for my game and it's procedurally generated so this occurs every now and again so I'm struggling to create test data for this. Is this likely something to do with me inserting incorrect data or a bug?
Here is my code for triangulation. The calculated polygon is a vector containing doubles.