Search code examples
cgal

In CGAL, can I disallow the splitting of constrained edges during "refine_Delaunay_mesh_2" or a similar algorithm


I have a region bounded by a set of edges. I took those edges and added them as constraints to a Constrained_Delaunay_triangulation_2. I then performed a refinement step using refine_Delaunay_mesh_2(...). My understanding from

http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Mesh_2_ref/Class_Triangulation_conformer_2.html

is that this may cause my original constraint segments to be split. That document mentions that I can instead use CGAL::Constrained_triangulation_plus_2 which allows my finding the relationship between the original constraints and the final edges. While this path is probably workable for my needs, I would prefer to refine the mesh such that the original boundary constraints are not split at all. Is there a setting for refine_Delaunay_mesh_2 that will disallow the splitting of these edges, or is there a related mesher that will accomplish this?

Thanks for any help.


Solution

  • Usually the constraints have to be split to enhance the quality of triangles in the mesh.

    The 2d meshes can be modified not to split edges, though.

    You can use classes or functions in the header <CGAL/Delaunay_mesher_no_edge_refinement_2.h>. That is not documented, but that is exactly the CGAL 2D mesher modified not to refine on constrained edges.