CGAL 5.6 - Polygon Mesh Processing

Classes and functions that answer queries about a polygon mesh or its elements.

Classes

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 NamedParameters = parameters::Default_named_parameters>
bool CGAL::Polygon_mesh_processing::is_degenerate_edge (typename boost::graph_traits< PolygonMesh >::edge_descriptor e, const PolygonMesh &pm, const NamedParameters &np=parameters::default_values())
 checks whether an edge is degenerate. More...
 
template<typename EdgeRange , typename TriangleMesh , typename OutputIterator , typename NamedParameters = CGAL::parameters::Default_named_parameters>
OutputIterator CGAL::Polygon_mesh_processing::degenerate_edges (const EdgeRange &edges, const TriangleMesh &tm, OutputIterator out, const NamedParameters &np=parameters::default_values())
 collects the degenerate edges within a given range of edges. More...
 
template<typename TriangleMesh , typename OutputIterator , typename NamedParameters = CGAL::parameters::Default_named_parameters>
OutputIterator CGAL::Polygon_mesh_processing::degenerate_edges (const TriangleMesh &tm, OutputIterator out, const NamedParameters &np=parameters::default_values())
 calls the function degenerate_edges() with the range: edges(tm). More...
 
template<typename TriangleMesh , typename NamedParameters = parameters::Default_named_parameters>
bool CGAL::Polygon_mesh_processing::is_degenerate_triangle_face (typename boost::graph_traits< TriangleMesh >::face_descriptor f, const TriangleMesh &tm, const NamedParameters &np=parameters::default_values())
 checks whether a triangle face is degenerate. More...
 
template<typename FaceRange , typename TriangleMesh , typename OutputIterator , typename NamedParameters = CGAL::parameters::Default_named_parameters>
OutputIterator CGAL::Polygon_mesh_processing::degenerate_faces (const FaceRange &faces, const TriangleMesh &tm, OutputIterator out, const NamedParameters &np=parameters::default_values())
 collects the degenerate faces within a given range of faces. More...
 
template<typename TriangleMesh , typename OutputIterator , typename NamedParameters = CGAL::parameters::Default_named_parameters>
OutputIterator CGAL::Polygon_mesh_processing::degenerate_faces (const TriangleMesh &tm, OutputIterator out, const NamedParameters &np=parameters::default_values())
 calls the function degenerate_faces() with the range: faces(tm). More...
 
template<typename TriangleMesh , typename NamedParameters = parameters::Default_named_parameters>
boost::graph_traits< TriangleMesh >::halfedge_descriptor CGAL::Polygon_mesh_processing::is_needle_triangle_face (typename boost::graph_traits< TriangleMesh >::face_descriptor f, const TriangleMesh &tm, const double threshold, const NamedParameters &np=parameters::default_values())
 checks whether a triangle face is needle. More...
 
template<typename TriangleMesh , typename NamedParameters = parameters::Default_named_parameters>
boost::graph_traits< TriangleMesh >::halfedge_descriptor CGAL::Polygon_mesh_processing::is_cap_triangle_face (typename boost::graph_traits< TriangleMesh >::face_descriptor f, const TriangleMesh &tm, const double threshold, const NamedParameters &np=parameters::default_values())
 checks whether a triangle face is a cap. More...
 

Function Documentation

◆ degenerate_edges() [1/2]

template<typename EdgeRange , typename TriangleMesh , typename OutputIterator , typename NamedParameters = CGAL::parameters::Default_named_parameters>
OutputIterator CGAL::Polygon_mesh_processing::degenerate_edges ( const EdgeRange &  edges,
const TriangleMesh &  tm,
OutputIterator  out,
const NamedParameters &  np = parameters::default_values() 
)

#include <CGAL/Polygon_mesh_processing/shape_predicates.h>

collects the degenerate edges within a given range of edges.

Template Parameters
EdgeRangea model of Range with value type boost::graph_traits<TriangleMesh>::edge_descriptor
TriangleMesha model of HalfedgeGraph
NamedParametersa sequence of Named Parameters
Parameters
edgesa subset of edges of tm
tma triangle mesh
outan output iterator in which the degenerate edges are written
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • a property map associating points to the vertices of tm
  • Type: a class model of ReadablePropertyMap with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and Point_3 as value type
  • Default: boost::get(CGAL::vertex_point, tm)
  • Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in TriangleMesh.

  • an instance of a geometric traits class
  • Type: The traits class must provide the nested type Point_3, and the nested functor Equal_3 to check whether two points are identical.
  • Default: a CGAL Kernel deduced from the point type, using CGAL::Kernel_traits
  • Extra: The geometric traits class must be compatible with the vertex point type.
See also
is_degenerate_edge()

◆ degenerate_edges() [2/2]

template<typename TriangleMesh , typename OutputIterator , typename NamedParameters = CGAL::parameters::Default_named_parameters>
OutputIterator CGAL::Polygon_mesh_processing::degenerate_edges ( const TriangleMesh &  tm,
OutputIterator  out,
const NamedParameters &  np = parameters::default_values() 
)

#include <CGAL/Polygon_mesh_processing/shape_predicates.h>

calls the function degenerate_edges() with the range: edges(tm).

See the other overload for the comprehensive description of the parameters.

◆ degenerate_faces() [1/2]

template<typename FaceRange , typename TriangleMesh , typename OutputIterator , typename NamedParameters = CGAL::parameters::Default_named_parameters>
OutputIterator CGAL::Polygon_mesh_processing::degenerate_faces ( const FaceRange &  faces,
const TriangleMesh &  tm,
OutputIterator  out,
const NamedParameters &  np = parameters::default_values() 
)

#include <CGAL/Polygon_mesh_processing/shape_predicates.h>

collects the degenerate faces within a given range of faces.

Template Parameters
FaceRangea model of Range with value type boost::graph_traits<TriangleMesh>::face_descriptor
TriangleMesha model of FaceGraph
NamedParametersa sequence of Named Parameters
Parameters
facesa subset of faces of tm
tma triangle mesh
outan output iterator in which the degenerate faces are put
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • a property map associating points to the vertices of tm
  • Type: a class model of ReadablePropertyMap with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and Point_3 as value type
  • Default: boost::get(CGAL::vertex_point, tm)
  • Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t must be available in TriangleMesh.

  • an instance of a geometric traits class
  • Type: The traits class must provide the nested type Point_3, and the nested functor Collinear_3 to check whether three points are collinear.
  • Default: a CGAL Kernel deduced from the point type, using CGAL::Kernel_traits
  • Extra: The geometric traits class must be compatible with the vertex point type.
See also
is_degenerate_triangle_face()

◆ degenerate_faces() [2/2]

template<typename TriangleMesh , typename OutputIterator , typename NamedParameters = CGAL::parameters::Default_named_parameters>
OutputIterator CGAL::Polygon_mesh_processing::degenerate_faces ( const TriangleMesh &  tm,
OutputIterator  out,
const NamedParameters &  np = parameters::default_values() 
)

#include <CGAL/Polygon_mesh_processing/shape_predicates.h>

calls the function degenerate_faces() with the range: faces(tm).

See the other overload for the comprehensive description of the parameters.

◆ is_cap_triangle_face()

template<typename TriangleMesh , typename NamedParameters = parameters::Default_named_parameters>
boost::graph_traits<TriangleMesh>::halfedge_descriptor CGAL::Polygon_mesh_processing::is_cap_triangle_face ( typename boost::graph_traits< TriangleMesh >::face_descriptor  f,
const TriangleMesh &  tm,
const double  threshold,
const NamedParameters &  np = parameters::default_values() 
)

#include <CGAL/Polygon_mesh_processing/shape_predicates.h>

checks whether a triangle face is a cap.

A triangle is said to be a cap if one of its angles is close to 180 degrees.

Template Parameters
TriangleMesha model of FaceGraph
NamedParametersa sequence of Named Parameters
Parameters
fa triangle face of tm
tmtriangle mesh containing f
thresholdthe cosine of a minimum angle such that if f has an angle greater than this bound, it is a cap. The threshold is in range [-1 0] and corresponds to an angle between 90 and 180 degrees.
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • a property map associating points to the vertices of tm
  • Type: a class model of ReadablePropertyMap with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and Point_3 as value type
  • Default: boost::get(CGAL::vertex_point, tm)

  • an instance of a geometric traits class
  • Type: The traits class must provide the nested type Point_3, the nested functors Compute_squared_distance_3, Construct_vector_3, and Compute_scalar_product_3.
  • Default: a CGAL Kernel deduced from the point type, using CGAL::Kernel_traits
  • Extra: The geometric traits class must be compatible with the vertex point type.
Returns
the halfedge opposite of the largest angle if the face is a cap, and a null halfedge otherwise.
See also
is_needle_triangle_face()
remove_almost_degenerate_faces()

◆ is_degenerate_edge()

template<typename PolygonMesh , typename NamedParameters = parameters::Default_named_parameters>
bool CGAL::Polygon_mesh_processing::is_degenerate_edge ( typename boost::graph_traits< PolygonMesh >::edge_descriptor  e,
const PolygonMesh &  pm,
const NamedParameters &  np = parameters::default_values() 
)

#include <CGAL/Polygon_mesh_processing/shape_predicates.h>

checks whether an edge is degenerate.

An edge is considered degenerate if the geometric positions of its two extremities are identical.

Template Parameters
PolygonMesha model of HalfedgeGraph
NamedParametersa sequence of Named Parameters
Parameters
ean edge of pm
pmpolygon mesh containing e
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • a property map associating points to the vertices of pm
  • 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, pm)

  • an instance of a geometric traits class
  • Type: The traits class must provide the nested type Point_3, and the nested functor Equal_3 to check whether two points are identical.
  • Default: a CGAL Kernel deduced from the point type, using CGAL::Kernel_traits
  • Extra: The geometric traits class must be compatible with the vertex point type.
Returns
true if the edge e is degenerate, false otherwise.
See also
degenerate_edges()

◆ is_degenerate_triangle_face()

template<typename TriangleMesh , typename NamedParameters = parameters::Default_named_parameters>
bool CGAL::Polygon_mesh_processing::is_degenerate_triangle_face ( typename boost::graph_traits< TriangleMesh >::face_descriptor  f,
const TriangleMesh &  tm,
const NamedParameters &  np = parameters::default_values() 
)

#include <CGAL/Polygon_mesh_processing/shape_predicates.h>

checks whether a triangle face is degenerate.

A triangle face is considered degenerate if the geometric positions of its vertices are collinear.

Template Parameters
TriangleMesha model of FaceGraph
NamedParametersa sequence of Named Parameters
Parameters
fa triangle face of tm
tma triangle mesh containing f
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • a property map associating points to the vertices of tm
  • Type: a class model of ReadablePropertyMap with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and Point_3 as value type
  • Default: boost::get(CGAL::vertex_point, tm)

  • an instance of a geometric traits class
  • Type: The traits class must provide the nested type Point_3, and the nested functor Collinear_3 to check whether three points are aligned.
  • Default: a CGAL Kernel deduced from the point type, using CGAL::Kernel_traits
  • Extra: The geometric traits class must be compatible with the vertex point type.
Returns
true if the face f is degenerate, false otherwise.
See also
degenerate_faces()

◆ is_needle_triangle_face()

template<typename TriangleMesh , typename NamedParameters = parameters::Default_named_parameters>
boost::graph_traits<TriangleMesh>::halfedge_descriptor CGAL::Polygon_mesh_processing::is_needle_triangle_face ( typename boost::graph_traits< TriangleMesh >::face_descriptor  f,
const TriangleMesh &  tm,
const double  threshold,
const NamedParameters &  np = parameters::default_values() 
)

#include <CGAL/Polygon_mesh_processing/shape_predicates.h>

checks whether a triangle face is needle.

A triangle is said to be a needle if its longest edge is much longer than its shortest edge.

Template Parameters
TriangleMesha model of FaceGraph
NamedParametersa sequence of Named Parameters
Parameters
fa triangle face of tm
tmtriangle mesh containing f
thresholda bound on the ratio of the longest edge length and the shortest edge length
npan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • a property map associating points to the vertices of tm
  • Type: a class model of ReadablePropertyMap with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and Point_3 as value type
  • Default: boost::get(CGAL::vertex_point, tm)

  • an instance of a geometric traits class
  • Type: The traits class must provide the nested type FT, and the nested functor Compute_squared_distance_3.
  • Default: a CGAL Kernel deduced from the point type, using CGAL::Kernel_traits
  • Extra: The geometric traits class must be compatible with the vertex point type.
Returns
the shortest halfedge if the triangle face is a needle, and a null halfedge otherwise. If the face contains degenerate edges, a halfedge corresponding to one of these edges is returned.
See also
is_cap_triangle_face()
remove_almost_degenerate_faces()