artem-ogre / CDT

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

how to call RemoveDuplicatesAndRemapEdges? #82

Closed Meldryt closed 2 years ago

Meldryt commented 2 years ago

how should we call RemoveDuplicatesAndRemapEdges() ? second parameter accepts only type std::vector& but there is no such member. We only have EdgeUSet fixedEdges.

artem-ogre commented 2 years ago

Hi, @Meldryt,

RemoveDuplicatesAndRemapEdges is a helper utility for preprocessing input data before it is passed to CDT. The reason is CDT does not support inputs with duplicates or crossing edges.

So you are not supposed to call it with fixedEdges, instead you are supposed to call it with vertices and edges that you intend to later pass to insertVertices and insertEdges.

Meldryt commented 2 years ago

Hi, @artem-ogre Thx for quick answer. I guessed so. I had to change my datatype before passing it. Is not as flexible as insertVertices, insertEdges

artem-ogre commented 2 years ago

Oh, I see. I could rewrite it with iterators-with-getters similar to insertXXX when there is time. Pull requests are very welcome too!

artem-ogre commented 2 years ago

@Meldryt Added generic versions of RemapEdges and RemoveDuplicatesAndRemapEdges. Could you check them out and report if it works for your case? I'm closing the issue for now.