CGAL 6.2 - Boolean Operations on Meshes

Loading...
Searching...
No Matches
Classes | Functions
Slicing
Reference Manual

##

Functions to split meshes using planes.

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

## Functions
template<class PolygonMesh , class ValueMap , class NamedParameters = parameters::Default_named_parameters>
void | CGAL::Polygon_mesh_processing::refine_mesh_at_isolevel (PolygonMesh &pm, ValueMap value_map, typename boost::property_traits< ValueMap >::value_type isovalue, const NamedParameters &np=parameters::default_values())
| refines `pm` by adding new vertices on edges having their incident vertices associated with values respectively larger and smaller than `isovalue` in `value_map`.
template<class PolygonMesh , class Plane_3 , class NamedParameters = parameters::Default_named_parameters>
void | CGAL::Polygon_mesh_processing::refine_with_plane (PolygonMesh &pm, const Plane_3 &plane, const NamedParameters &np=parameters::default_values())
| refines `pm` by inserting new vertices and new edges at the intersection of `plane` with `pm`.

## Function Documentation

## ◆ refine_mesh_at_isolevel()

template<class PolygonMesh , class ValueMap , class NamedParameters = parameters::Default_named_parameters>

void CGAL::Polygon_mesh_processing::refine_mesh_at_isolevel | ( | PolygonMesh & | pm,
|  | ValueMap | value_map,
|  | typename boost::property_traits< ValueMap >::value_type | isovalue,
|  | const NamedParameters & | np = `parameters::default_values()`
| ) |  |

`#include <CGAL/Polygon_mesh_processing/refine_mesh_at_isolevel.h>`

refines `pm` by adding new vertices on edges having their incident vertices associated with values respectively larger and smaller than `isovalue` in `value_map`.

The placement of new vertices on edges will be done by linear interpolation using the aforementioned values. New vertices will be associated `isovalue` in `value_map` when created. Additionally, new edges will be added by connecting new vertices created sharing a common incident face. Note that in case more than two new vertices are added on a face boundary, no edges will be created in that face.

Template Parameters

  PolygonMesh | a model of the concepts `EdgeListGraph` and `FaceListGraph`
  ValueMap | a model of the concept `ReadWritePropertyMap` with `boost::graph_traits<PolygonMesh>::vertex_descriptor` as key type and with its value type being the type of the coordinates of points associated with vertices in the vertex map provided to the `vertex_point_map()` named parameter.
  NamedParameters | a sequence of Named Parameters for `pm`

Parameters

  pm | the polygon mesh to be refined.
  value_map | the property map containing a value at each vertex for a given function defined over the mesh.
  isovalue | the value used to refine
  np | an optional sequence of Named Parameters among the ones listed below

Optional Named Parameters

  an output property map associating `true` to all edges connecting vertices on the isolevel, and `false` for all other edges. Type: a class model of `WritablePropertyMap` with `boost::graph_traits<PolygonMesh>::edge_descriptor` as key type and `bool` as value type Default: No marks on edges will be put |
  a property map associating points to the vertices of `pm` Type: a class model of `ReadWritePropertyMap` with `boost::graph_traits<PolygonMesh>::vertex_descriptor` as key type and `Point_3` as value type Default: `boost::get(CGAL::vertex_point, pm)` Extra: If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` must be available in `PolygonMesh`. |

## ◆ refine_with_plane()

template<class PolygonMesh , class Plane_3 , class NamedParameters = parameters::Default_named_parameters>

void CGAL::Polygon_mesh_processing::refine_with_plane | ( | PolygonMesh & | pm,
|  | const Plane_3 & | plane,
|  | const NamedParameters & | np = `parameters::default_values()`
| ) |  |

`#include <CGAL/Polygon_mesh_processing/refine_with_plane.h>`

refines `pm` by inserting new vertices and new edges at the intersection of `plane` with `pm`.

Template Parameters

  PolygonMesh | a model of `HalfedgeListGraph`, `FaceListGraph`, and `MutableFaceGraph`
  Plane_3 | plane type, equal to `GeomTraits::Plane_3`, `GeomTraits` being the type of the parameter `geom_traits`.
  NamedParameters | a sequence of Named Parameters

Parameters

  pm | input mesh to be refined
  plane | the plane used to refine the mesh
  np | an optional sequence of Named Parameters among the ones listed below:

Optional Named Parameters

  a property map containing the constrained-or-not status of each edge of `pm`. If an edge marked as constrained is split, the two resulting edges will be marked as constrained. Type: a class model of `ReadWritePropertyMap` with `boost::graph_traits<PolygonMesh>::edge_descriptor` as key type and `bool` as value type Default: unused |
  a property map filled by this function with `true` for all intersection edges of faces of `pm` and `plane`, and `false` for all other edges. Type: a class model of `WritablePropertyMap` with `boost::graph_traits<PolygonMesh>::edge_descriptor` as key type and `bool` as value type Default: unused |
  a property map filled by this function containing the position of each vertex relative to the oriented plane `plane`. Type: a class model of `ReadWritePropertyMap` with `boost::graph_traits<PolygonMesh>::vertex_descriptor` as key type and `Oriented_side` as value type Default: Dynamic vertex property map |
  If the input mesh is triangulated and this parameter is set to `false`, the mesh will be kept triangulated. Type: Boolean Default: `true` Extra: The function `triangulate_faces()` can be used to triangule faces before calling this function. |
  If set to `true`, a faster implementation specialized for convex meshes is used. The input mesh must be convex to guarantee a correct execution and results. Type: Boolean Default: `false` Extra: convex specialization is only used if `edge_is_constrained_map`, `edge_is_marked_map` and `vertex_oriented_side_map` are unused. |
  a property map associating points to the vertices of `pm` Type: a class model of `ReadWritePropertyMap` with `boost::graph_traits<PolygonMesh>::vertex_descriptor` as key type and `GeomTraits::Point_3` as value type, `GeomTraits` being the type of the parameter `geom_traits` Default: `boost::get(CGAL::vertex_point, pm)` 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 Type: a class model of `Kernel` 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
  `split()`
  `clip()`