Help Needed with CGAL Constrained Delaunay Triangulation (CDT) for Complex 2D Shapes #8541
|
Hello, I'm a beginner with CGAL. I'm currently updating legacy code and replacing the triangle.c library, as it no longer works in an x64 environment. My goal is to triangulate complex 2D shapes (including concave, convex, and those with holes). In the code below, I am using CDT (Constrained Delaunay Triangulation) to sequentially add vertices and impose constraints with edge information. However, unwanted triangles are still being generated. Could you help me understand what might be missing or what additional steps are required? Thank you for your help! Shape with Vertics: Log Result: |
Replies: 1 comment
|
The triangulation is a partition of the convex hull of the points, which is why you have the triangle Check out the function CGAL::mark_domain_in_triangulation(), which can be used to tag connected components bounded by constrained edges. You can find an example of usage in this example: https://doc.cgal.org/latest/Triangulation_2/Triangulation_2_2polygon_triangulation_8cpp-example.html#a8. |

The triangulation is a partition of the convex hull of the points, which is why you have the triangle
0 3 4in the finite faces. See https://doc.cgal.org/latest/Triangulation_2/index.html#Chapter_2D_Triangulations.Check out the function CGAL::mark_domain_in_triangulation(), which can be used to tag connected components bounded by constrained edges. You can find an example of usage in this example: https://doc.cgal.org/latest/Triangulation_2/Triangulation_2_2polygon_triangulation_8cpp-example.html#a8.