Sébastien Loriot, Mael Rouxel-Labbé, Jane Tournois, and Ilker O. Yaz
This package provides a collection of methods and classes for polygon mesh processing, ranging from basic operations on simplices, to complex geometry processing algorithms such as Boolean operations, remeshing, repairing, collision and intersection detection, and more.
Two faces are in the same connected component if there is a path of adjacent faces such that all edges between two consecutive faces of the path are not marked as constrained.
Functions to corefine triangulated surface meshes and compute triangulated surface meshes of the union, difference and intersection of the bounded volumes.
This class can be used to check if a query point, segment, or triangle is inside or outside a polyhedral envelope of a set of triangles, constructed for a given \( \epsilon \) distance tolerance. More...
This class provides methods to perform some intersection tests between triangle meshes that undergo affine transformations (rotation, translation, and scaling). More...
detects the corners on the boundary of almost planar regions by applying the region growing algorithm fitting lines on segment edges of a partition of a mesh. More...
an optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
a property map associating points to the vertices of pmesh
Type: a class model of ReadablePropertyMap with boost::graph_traits<PolygonMesh>::vertex_descriptor as key type and Point_3 as value type
Default: boost::get(CGAL::vertex_point, pmesh)
Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in PolygonMesh.
an instance of a geometric traits class providing the functor Construct_bbox_3 and the function Construct_bbox_3 construct_bbox_3_object(). Construct_bbox_3 must provide the functor Bbox_3 operator()(Point_3) where Point_3 is the value type of the vertex point map.
detects the corners on the boundary of almost planar regions by applying the region growing algorithm fitting lines on segment edges of a partition of a mesh.
More precisely, a corner on the boundary of a region is a vertex that is either shared by at least three regions (two if it is also a vertex on the boundary of the mesh), or that is incident to two segments edges assigned to different lines. See Section Region Growing for more details on the method.
property map providing the region index of each face, values must be in [0, nb_regions-1].
corner_id_map
property map storing the corner index of each vertex. Values start at 0 up to the value returned minus 1. std::size_t(-1) is put for vertices that are not corners.
nb_regions
the number of patches in the partition of mesh defined by region_map
np
an optional sequence of Named Parameters among the ones listed below
Returns
the number of corners detected
Optional Named Parameters
a property map filled by this function such that an edge is marked as constrained if it is at the interface of two different regions or on the boundary of the mesh
Type: a class model of ReadWritePropertyMap with boost::graph_traits<PolygonMesh>::edge_descriptor as key type and bool as value type
Default: Unused if not provided
Extra: The value for each edge must be initialized to false.
the maximum distance from a segment to a line such that it is considered part of the region of the line
Type: GeomTraits::FT with GeomTraits being the type of the parameter geom_traits
Default: 1
the maximum angle in degrees between two adjacent segments such that they are considered part of the same region
Type: GeomTraits::FT with GeomTraits being the type of the parameter geom_traits
Default: 25 degrees
Extra: this parameter and cosine_of_maximum_angle are exclusive
The maximum angle, given as a cosine, for the smallest angle between the supporting line of a segment and an adjacent segment such that they are considered part of the same region
Type: GeomTraits::FT with GeomTraits being the type of the parameter geom_traits
Default: cos(25 * PI / 180)
Extra: this parameter and maximum_angle are exclusive
a property map associating points to the vertices of mesh
Type: a class model of ReadablePropertyMap with boost::graph_traits<PolygonMesh>::vertex_descriptor as key type and Point_3 as value type
Default: boost::get(CGAL::vertex_point, mesh)
Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in PolygonMesh.
an optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
a property map associating points to the vertices of pmesh
Type: a class model of ReadablePropertyMap with boost::graph_traits<PolygonMesh>::vertex_descriptor as key type and Point_3 as value type
Default: boost::get(CGAL::vertex_point, pmesh)
Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in PolygonMesh.
an instance of a geometric traits class providing the functor Construct_bbox_3 and the function Construct_bbox_3 construct_bbox_3_object(). Construct_bbox_3 must provide Bbox_3 operator()(Point_3) where Point_3 is the value type of the vertex point map.
an optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
a property map associating points to the vertices of pmesh
Type: a class model of ReadablePropertyMap with boost::graph_traits<PolygonMesh>::vertex_descriptor as key type and Point_3 as value type
Default: boost::get(CGAL::vertex_point, pmesh)
Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in PolygonMesh.
an instance of a geometric traits class providing the functor Construct_bbox_3 and the function Construct_bbox_3 construct_bbox_3_object(). Construct_bbox_3 must provide Bbox_3 operator()(Point_3) where Point_3 is the value type of the vertex point map.
the polygon mesh whose faces are used for region growing
region_map
a property map storing the region index of each face. Values start at 0 up to the value returned minus 1. std::size_t(-1) is put for faces with no region assigned (it can happen if minimum_region_size > 1 or for a non-triangular face having a fitting plane not satisfying the maximum distance criterium).
np
an optional sequence of Named Parameters among the ones listed below
Returns
the number of regions detected
Optional Named Parameters
the maximum distance from a face to a plane such that it is considered part of the region of the plane
Type: GeomTraits::FT with GeomTraits being the type of the parameter geom_traits
Default: 1
the maximum angle (in degrees) between the normals of the supporting planes of two adjacent faces such that they are considered part of the same region
Type: GeomTraits::FT with GeomTraits being the type of the parameter geom_traits
Default: 25 degrees
Extra: this parameter and cosine_of_maximum_angle are exclusive
Apply a post-processing step to the output of the region growing algorithm.
Type: bool
Default: false
The maximum angle, given as a cosine, between the normals of the supporting planes of adjacent faces such that they are considered part of the same region
Type: GeomTraits::FT with GeomTraits being the type of the parameter geom_traits
Default: cos(25 * PI / 180)
Extra: this parameter and maximum_angle are exclusive
the minimum number of faces such that a new region can be created from a set of faces
Type: std::size_t
Default: 1
a property map associating points to the vertices of mesh
Type: a class model of ReadablePropertyMap with boost::graph_traits<PolygonMesh>::vertex_descriptor as key type and Point_3 as value type
Default: boost::get(CGAL::vertex_point, mesh)
Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in PolygonMesh.
Extra: The geometric traits class must be compatible with the vertex point type.
a property map filled by this function and that will contain for each region the plane (or only its orthognonal vector) estimated that approximates it.
Type: a class model of WritablePropertyMap with the value type of RegionMap as key and GeomTraits::Plane_3 or GeomTraits::Vector_3 as value type, GeomTraits being the type of the parameter geom_traits
applies a transformation to every vertex of a PolygonMesh.
Template Parameters
Transformation
a functor that has an operator()(Point_3), with Point_3 the value_type of vertex_point_map (see below). Such a functor can be CGAL::Aff_transformation_3 for example.
an optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
a property map associating points to the vertices of pmesh
Type: a class model of ReadablePropertyMap with boost::graph_traits<PolygonMesh>::vertex_descriptor as key type and Point_3 as value type
Default: boost::get(CGAL::vertex_point, pmesh)
Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in PolygonMesh.
an instance of a geometric traits class providing the functor Construct_bbox_3 and the function Construct_bbox_3 construct_bbox_3_object(). Construct_bbox_3 must provide Bbox_3 operator()(Point_3) where Point_3 is the value type of the vertex point map.