Closed Cray-1 closed 1 year ago
Thank you for reporting this. I am looking into the issue. It might be a regression when I switched from using 'set' to 'unordered_set'. I should have a resolution in one or two days.
Is there still a chance that this will be fixed soon? I just wanted to ask so I know if it is worth waiting or if I should better look for another solution.
The regression occurred in Delaunay2 when I switched from 'set' to 'unordered_set'. The ProcessedVertex Hash(...) and operator==(...) functions incorrectly used the 'location' member function. I also modified ConstrainedDelaunay2::InsertEdge to replace the incoming edge by the equivalence-class vertex indices (via mDuplicates) in case InsertEdge is called with a duplicated vertex. The Delaunay2D sample has another test case added to it. The fixed code has been pushed.
I have created a ConstrainedDelaunay2 and added the following 7 vertices: (-1, -1), (-1, 1), (1, -1), (0, 0), (0, -1), (-1, 0), (0, 0).
When I insert the edge (3, 4) I get the error "Failed to find vertex in graph." in GetLinkEdges. I assume this has something to do with the duplicated vertex. The vmap in GetLinkEdges contains only 6 vertices. But GetNumVertices() and GetNumUniqueVertices() of ConstrainedDelaunay2 both return 7. Might this be a bug or isn't it allowed to add duplicated vertices or am I doing something else wrong? I would very appreciate any help.