Search code examples
c++meshcgalsurfacetriangulation

CGAL: How can I create a surface mesh that fills a bordering curve?


I have a vector of segments which is a result of a 2D alpha shape and I'm looking to first create a triangulation of a 2D surface enclosing that shape. Ultimately I'd then like to extrude the resulting surface.

Are there any examples or functions built for this purpose?


Solution

  • If you have 2D contours that you would like to triangulate, you can use a constrained Delaunay triangulation to triangulate it. See this example that is used to triangulate polygons (with holes).

    About the extrusion, you'll need to convert your point to 3D points and then you can use the function extrude_mesh().