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

Is there a situation where `fixedEdges` is useful? #77

Closed stla closed 2 years ago

stla commented 2 years ago

Hello,

As I understand, the constraint edges are given in cdt.fixedEdges. But the constraint edges are those that the user inserts in cdt, so he already knows them. Am I missing a case where fixedEdges is useful?

artem-ogre commented 2 years ago

Yes, it is useful in some corner cases. There are cases when fixed edges overlap (but don’t cross): imagine input points 0:(0,0) 1:(1,0) 2:(2,0) 3:(3,0) and constraint edges (0,2) (1,3).

CDT will handle this case properly and fixedEdges will contain (0,1) (1,2) (2,3)

stla commented 2 years ago

Ok, thank you for the reply.