Search code examples
c++meshcgaltriangulation

How can I mesh a 2D domain with cannot-be-split line segments by using CGAL?


I want to use CGAL lib in C++ to mesh a polygonal domain as follows,

enter image description here

The red line segments should not be split but the black can be split.

What kind of function should I use ? Can you raise a C++ example?


Solution

  • There is a tradeoff. If the inside line segments are small enough, just add them as constraints without disallowing the splitting. Then, let the min element edge length larger than the length of small segments, before meshing. Generally, the small constraints will not be split.