Search code examples
c++2dcgaldelaunay

CGAL triangulation with constraints changes points coords


I'm using Constrained_triangulation_2 and Constrained_Delaunay_triangulation_2 for triangulating my point set with constraints. In some cases I've got negative indieces (f_it->vertex(0)->info()) in some neighbor faces for both methods. After checking triangulation results it was clear, that some points have changed their 2d coords (f_it->vertex(0)->point()). is the problem in my input data, or there is well known bug in CGAL? Without these constraints (poly without self intersections) it works fine, but on my mind they are absolutely correct.


Solution

  • No point coordinate can be changed. The only thing I can see that can happen is that your constraints intersects and the intersection point is added into the triangulation (and is mistaken for an input point). Of course this is only plausible is the intersection tag is not No_intersection_tag.