Search code examples
c++geometrycgal

how to refine mesh in cgal in area of interest


I cannot seem to understand how can I refine mesh in some part of the domain. Namely, I can refine mesh in domain using the following function:

CGAL::refine_Delaunay_mesh_2(
    cdt,
    list_of_seeds.begin(),
    list_of_seeds.end(),
    Criteria(0.125,2)
);

How can I further refine mesh in some area of interest, for example near holes in domain, or around boundaries? Hope my question makes sense...


Solution

  • The domain is something defined purely by constraint edges. What you need is a sizing field that depends on an xy coordinate. You might have a look at demo/Triangulation_2/include/CGAL/*.h