artem-ogre / CDT

Constrained Delaunay Triangulation (C++)
https://artem-ogre.github.io/CDT/
Mozilla Public License 2.0
947 stars 125 forks source link

Could not find vertex triangle intersected by edge #134

Closed qtbui159 closed 10 months ago

qtbui159 commented 10 months ago

I try to use tri.txt to get triangles:

  1. cdt.insertVertices
  2. cdt.insertEdges

But when it comes to 2,prompting "Could not find vertex triangle intersected by edge",could you pls advise what should I do next?

artem-ogre commented 10 months ago

Did you check the input for duplicates with CDT::FindDuplicates?

artem-ogre commented 10 months ago

It does have duplicates, you can try opening it in the CDT visualizer, it detects and fixes the duplicates. The result looks like this: cdt_screenshot

artem-ogre commented 10 months ago

CDT does not support duplicates but provides functionality for detecting and fixing them.

qtbui159 commented 10 months ago

CDT does not support duplicates but provides functionality for detecting and fixing them.

Thx for replying @artem-ogre . It works well with CDT::RemoveDuplicatesAndRemapEdges.