CGAL 6.2 - Boolean Operations on Meshes
Loading...
Searching...
No Matches

Functions to split meshes using planes.

Classes

class  CGAL::Polygon_mesh_slicer< class TriangleMesh, class Traits, class VertexPointMap, class AABBTree, bool UseParallelPlaneOptimization >
 Function object that computes the intersection of a plane with a triangulated surface mesh.
 

Functions

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

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 </home/runner/work/cgal/cgal/Polygon_mesh_processing/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
PolygonMesha model of the concepts EdgeListGraph and FaceListGraph
ValueMapa 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.
NamedParametersa sequence of Named Parameters for pm
Parameters
pmthe polygon mesh to be refined.
value_mapthe property map containing a value at each vertex for a given function defined over the mesh.
isovaluethe value used to refine
npan 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 </home/runner/work/cgal/cgal/Polygon_mesh_processing/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
PolygonMesha model of HalfedgeListGraph, FaceListGraph, and MutableFaceGraph
Plane_3plane type, equal to GeomTraits::Plane_3, GeomTraits being the type of the parameter geom_traits.
NamedParametersa sequence of Named Parameters
Parameters
pminput mesh to be refined
planethe plane used to refine the mesh
npan 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.

  • 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()