\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.14.1 - Polygon Mesh Processing
Polygon Mesh Processing Reference

hole_filling_ico.png
Sébastien Loriot, Jane Tournois, 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.
Introduced in: CGAL 4.7
Depends on: documented for each function; CGAL and Solvers
BibTeX: cgal:lty-pmp-19b
License: GPL
Windows Demo: Polyhedron demo
Common Demo Dlls: dlls

Classified Reference Pages

Parameters

Optional parameters of the functions of this package are implemented as Named Parameters. The page Named Parameters describes their usage and provides a list of the parameters that are used in this package.

Meshing Functions

Hole Filling Functions

Predicate Functions

Orientation Functions

Combinatorial Repairing Functions

Normal Computation Functions

Connected Components

Corefinement and Boolean Operation Functions

Geometric Measure Functions

Distance Functions

Feature Detection Functions

Collision Detection

Miscellaneous

Modules

 Named Parameters for Polygon Mesh Processing
 In this package, all functions optional parameters are implemented as BGL optional named parameters (see Named Parameters for more information on how to use them).
 
 Concepts
 
 Connected Components
 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.
 
 Hole Filling
 Functions to fill holes given as a range of halfedges or as range of points.
 
 Meshing
 Functions to triangulate faces, and to refine and fair regions of a polygon mesh.
 
 Normal Computation
 Functions to compute unit normals for individual/all vertices or faces.
 
 Geometric Measure Functions
 Functions to compute lengths of edges and borders, areas of faces and patches, as well as volumes of closed meshes.
 
 Orientation Functions
 Functions to compute or change the orientation of faces and surfaces.
 
 Intersection Functions
 Functions to test if there are self intersections, and to report faces that do intersect.
 
 Combinatorial Repairing
 Functions to repair polygon soups and polygon meshes.
 
 Distance Functions
 Functions to compute the distance between meshes, between a mesh and a point set and between a point set and a mesh.
 
 Corefinement and Boolean Operations
 Functions to corefine triangulated surface meshes and compute triangulated surface meshes of the union, difference and intersection of the bounded volumes.
 
 Feature Detection Functions
 Functions to detect sharp edges and surface patches of polygon meshes.
 
 Intersection Detection Functions
 Functions to detect intersections.
 

Files

file  polygon_mesh_processing.h
 Convenience header file including the headers for all the free functions of this package.
 

Classes

class  CGAL::Polygon_mesh_slicer< TriangleMesh, Traits, VertexPointMap, AABBTree, UseParallelPlaneOptimization >
 Function object that computes the intersection of a plane with a triangulated surface mesh. More...
 
class  CGAL::Side_of_triangle_mesh< TriangleMesh, GeomTraits, VertexPointMap >
 This class provides an efficient point location functionality with respect to a domain bounded by one or several disjoint closed triangle meshes. More...
 

Functions

template<typename PolygonMesh , typename CGAL_PMP_NP_TEMPLATE_PARAMETERS >
CGAL::Bbox_3 CGAL::Polygon_mesh_processing::bbox (const PolygonMesh &pmesh, const CGAL_PMP_NP_CLASS &np)
 computes a bounding box of a polygon mesh. More...
 
template<typename PolygonMesh , typename NamedParameters >
CGAL::Bbox_3 CGAL::Polygon_mesh_processing::vertex_bbox (typename boost::graph_traits< PolygonMesh >::vertex_descriptor vd, const PolygonMesh &pmesh, const NamedParameters &np)
 computes a bounding box of a vertex of a polygon mesh. More...
 
template<typename PolygonMesh , typename NamedParameters >
CGAL::Bbox_3 CGAL::Polygon_mesh_processing::edge_bbox (typename boost::graph_traits< PolygonMesh >::edge_descriptor ed, const PolygonMesh &pmesh, const NamedParameters &np)
 computes a bounding box of an edge of a polygon mesh. More...
 
template<typename PolygonMesh , typename NamedParameters >
CGAL::Bbox_3 CGAL::Polygon_mesh_processing::face_bbox (typename boost::graph_traits< PolygonMesh >::face_descriptor fd, const PolygonMesh &pmesh, const NamedParameters &np)
 computes a bounding box of a face of a polygon mesh. More...
 
template<typename PolygonMesh , typename CGAL_PMP_NP_TEMPLATE_PARAMETERS >
CGAL_DEPRECATED CGAL::Bbox_3 CGAL::Polygon_mesh_processing::bbox_3 (const PolygonMesh &pmesh, const CGAL_PMP_NP_CLASS &np)
 
template<typename PolygonMesh , typename FaceRange , typename HalfedgeOutputIterator , typename NamedParameters >
HalfedgeOutputIterator CGAL::Polygon_mesh_processing::border_halfedges (const FaceRange &faces, const PolygonMesh &pmesh, HalfedgeOutputIterator out, const NamedParameters &np)
 collects the border halfedges of a surface patch defined as a face range. More...
 
template<typename PolygonMesh , typename OutputIterator >
OutputIterator CGAL::Polygon_mesh_processing::extract_boundary_cycles (PolygonMesh &pm, OutputIterator out)
 extracts boundary cycles as a list of halfedges, with one halfedge per border. More...
 
template<class Transformation , class PolygonMesh , class NamedParameters >
void CGAL::Polygon_mesh_processing::transform (const Transformation &transformation, PolygonMesh &mesh, const NamedParameters &np)
 applies a transformation to every vertex of a PolygonMesh. More...
 

Function Documentation

◆ bbox()

template<typename PolygonMesh , typename CGAL_PMP_NP_TEMPLATE_PARAMETERS >
CGAL::Bbox_3 CGAL::Polygon_mesh_processing::bbox ( const PolygonMesh &  pmesh,
const CGAL_PMP_NP_CLASS &  np 
)

#include <CGAL/Polygon_mesh_processing/bbox.h>

computes a bounding box of a polygon mesh.

Template Parameters
PolygonMesha model of HalfedgeListGraph
NamedParametersa sequence of Named Parameters
Parameters
pmesha polygon mesh
npoptional sequence of Named Parameters among the ones listed below
Named Parameters
vertex_point_mapthe property map with the points associated to the vertices of pmesh. If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in PolygonMesh
geom_traitsan 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.
Returns
a bounding box of pmesh

◆ bbox_3()

template<typename PolygonMesh , typename CGAL_PMP_NP_TEMPLATE_PARAMETERS >
CGAL_DEPRECATED CGAL::Bbox_3 CGAL::Polygon_mesh_processing::bbox_3 ( const PolygonMesh &  pmesh,
const CGAL_PMP_NP_CLASS &  np 
)

#include <CGAL/Polygon_mesh_processing/bbox.h>

Deprecated:
This function is deprecated since CGAL 4.10, CGAL::Polygon_mesh_processing::bbox() should be used instead.

◆ border_halfedges()

template<typename PolygonMesh , typename FaceRange , typename HalfedgeOutputIterator , typename NamedParameters >
HalfedgeOutputIterator CGAL::Polygon_mesh_processing::border_halfedges ( const FaceRange &  faces,
const PolygonMesh &  pmesh,
HalfedgeOutputIterator  out,
const NamedParameters &  np 
)

#include <CGAL/Polygon_mesh_processing/border.h>

collects the border halfedges of a surface patch defined as a face range.

For each returned halfedge h, opposite(h, pmesh) belongs to a face of the patch, but face(h, pmesh) does not belong to the patch.

Template Parameters
PolygonMeshmodel of HalfedgeGraph. If PolygonMesh has an internal property map for CGAL::face_index_t and no face_index_map is given as a named parameter, then the internal one must be initialized
FaceRangerange of boost::graph_traits<PolygonMesh>::face_descriptor, model of Range. Its iterator type is InputIterator.
HalfedgeOutputIteratormodel of OutputIterator holding boost::graph_traits<PolygonMesh>::halfedge_descriptor for patch border
NamedParametersa sequence of Named Parameters
Parameters
pmeshthe polygon mesh to which faces belong
facesthe range of faces defining the patch whose border halfedges are collected
outthe output iterator that collects the border halfedges of the patch, seen from outside.
npoptional sequence of Named Parameters among the ones listed below
Named Parameters
face_index_mapa property map containing the index of each face of pmesh
Returns
out
Examples:
Polygon_mesh_processing/isotropic_remeshing_example.cpp.

◆ edge_bbox()

template<typename PolygonMesh , typename NamedParameters >
CGAL::Bbox_3 CGAL::Polygon_mesh_processing::edge_bbox ( typename boost::graph_traits< PolygonMesh >::edge_descriptor  ed,
const PolygonMesh &  pmesh,
const NamedParameters &  np 
)

#include <CGAL/Polygon_mesh_processing/bbox.h>

computes a bounding box of an edge of a polygon mesh.

Template Parameters
PolygonMesha model of HalfedgeGraph
NamedParametersa sequence of Named Parameters
Parameters
eda descriptor of an edge in pmesh
pmesha polygon mesh
npoptional sequence of Named Parameters among the ones listed below
Named Parameters
vertex_point_mapthe property map with the points associated to the vertices of pmesh. If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in PolygonMesh
geom_traitsan 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.
Returns
a bounding box of pmesh

◆ extract_boundary_cycles()

template<typename PolygonMesh , typename OutputIterator >
OutputIterator CGAL::Polygon_mesh_processing::extract_boundary_cycles ( PolygonMesh &  pm,
OutputIterator  out 
)

#include <CGAL/Polygon_mesh_processing/border.h>

extracts boundary cycles as a list of halfedges, with one halfedge per border.

Template Parameters
PolygonMesha model of HalfedgeListGraph
OutputIteratora model of OutputIterator holding objects of type boost::graph_traits<PolygonMesh>::halfedge_descriptor
Parameters
pma polygon mesh
outan output iterator where the border halfedges will be put

◆ face_bbox()

template<typename PolygonMesh , typename NamedParameters >
CGAL::Bbox_3 CGAL::Polygon_mesh_processing::face_bbox ( typename boost::graph_traits< PolygonMesh >::face_descriptor  fd,
const PolygonMesh &  pmesh,
const NamedParameters &  np 
)

#include <CGAL/Polygon_mesh_processing/bbox.h>

computes a bounding box of a face of a polygon mesh.

Template Parameters
PolygonMesha model of HalfedgeGraph
NamedParametersa sequence of Named Parameters
Parameters
fda descriptor of a face in pmesh
pmesha polygon mesh
npoptional sequence of Named Parameters among the ones listed below
Named Parameters
vertex_point_mapthe property map with the points associated to the vertices of pmesh. If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in PolygonMesh
geom_traitsan 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.
Returns
a bounding box of pmesh

◆ transform()

template<class Transformation , class PolygonMesh , class NamedParameters >
void CGAL::Polygon_mesh_processing::transform ( const Transformation &  transformation,
PolygonMesh &  mesh,
const NamedParameters &  np 
)

#include <CGAL/Polygon_mesh_processing/transform.h>

applies a transformation to every vertex of a PolygonMesh.

Template Parameters
Transformationa 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.
PolygonMesha model of VertexListGraph
NamedParametersa sequence of Named Parameters
Parameters
transformationthe transformation functor to apply to the points of mesh.
meshthe PolygonMesh to transform.
npoptional sequence of Named Parameters for Polygon Mesh Processing for mesh, among the ones listed below
  • Named Parameters
    vertex_point_mapthe property map with the points associated to the vertices of mesh. If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in PolygonMesh

◆ vertex_bbox()

template<typename PolygonMesh , typename NamedParameters >
CGAL::Bbox_3 CGAL::Polygon_mesh_processing::vertex_bbox ( typename boost::graph_traits< PolygonMesh >::vertex_descriptor  vd,
const PolygonMesh &  pmesh,
const NamedParameters &  np 
)

#include <CGAL/Polygon_mesh_processing/bbox.h>

computes a bounding box of a vertex of a polygon mesh.

Template Parameters
PolygonMesha model of HalfedgeGraph
NamedParametersa sequence of Named Parameters
Parameters
vda descriptor of a vertex in pmesh
pmesha polygon mesh
npoptional sequence of Named Parameters among the ones listed below
Named Parameters
vertex_point_mapthe property map with the points associated to the vertices of pmesh. If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in PolygonMesh
geom_traitsan 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.
Returns
a bounding box of pmesh