CGAL 5.6.3 - Polygon Mesh Processing

Loading...
Searching...
No Matches
Classes | Functions
Predicates
Polygon Mesh Processing Reference

##

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.
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.
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)`.
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.
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.
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)`.
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.
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.

## 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

  EdgeRange | a model of `Range` with value type `boost::graph_traits<TriangleMesh>::edge_descriptor`
  TriangleMesh | a model of `HalfedgeGraph`
  NamedParameters | a sequence of Named Parameters

Parameters

  edges | a subset of edges of `tm`
  tm | a triangle mesh
  out | an output iterator in which the degenerate edges are written
  np | an 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

  FaceRange | a model of `Range` with value type `boost::graph_traits<TriangleMesh>::face_descriptor`
  TriangleMesh | a model of `FaceGraph`
  NamedParameters | a sequence of Named Parameters

Parameters

  faces | a subset of faces of `tm`
  tm | a triangle mesh
  out | an output iterator in which the degenerate faces are put
  np | an 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

  TriangleMesh | a model of `FaceGraph`
  NamedParameters | a sequence of Named Parameters

Parameters

  f | a triangle face of `tm`
  tm | triangle mesh containing `f`
  threshold | the 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.
  np | an 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

  PolygonMesh | a model of `HalfedgeGraph`
  NamedParameters | a sequence of Named Parameters

Parameters

  e | an edge of `pm`
  pm | polygon mesh containing `e`
  np | an 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

  TriangleMesh | a model of `FaceGraph`
  NamedParameters | a sequence of Named Parameters

Parameters

  f | a triangle face of `tm`
  tm | a triangle mesh containing `f`
  np | an 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

  TriangleMesh | a model of `FaceGraph`
  NamedParameters | a sequence of Named Parameters

Parameters

  f | a triangle face of `tm`
  tm | triangle mesh containing `f`
  threshold | a bound on the ratio of the longest edge length and the shortest edge length
  np | an 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()`