thomasreiser
thomasreiser

Reputation: 190

CGAL 2D Triangulation: Get only inner triangles

I am using CGAL 4.13 to do some 2D triangulation of an outline. In my case some random data originally read from GeoJSON:

GeoJSON outline

The triangulation is done exactly like mentioned in the CGAL user manual: https://doc.cgal.org/latest/Mesh_2/index.html#title14

But when I fetch the triangles out of the Mesher (via mesher.triangulation()), is do not only get the inner triangles but also some "outer" triangles:

OpenGL renderer triangles

Is there a way to get only the triangles matching to the outlines? Like this: Desired rendering

Upvotes: 0

Views: 182

Answers (1)

Andreas Fabri
Andreas Fabri

Reputation: 1235

The face type of the triangultation has a member function is_in_domain()

Upvotes: 2

Related Questions