CGAL 6.2 - Meshing and Remeshing of Polygonal Meshes
Loading...
Searching...
No Matches

Generic functions to mesh and remesh polygon meshes.

Functions

template<class InputMesh , class OutputMesh , class BottomFunctor , class TopFunctor , class NamedParameters1 = CGAL::parameters::Default_named_parameter, class NamedParameters2 = CGAL::parameters::Default_named_parameter>
void CGAL::Polygon_mesh_processing::extrude_mesh (const InputMesh &input, OutputMesh &output, const BottomFunctor &bot, const TopFunctor &top, const NamedParameters1 &np_in=parameters::default_values(), const NamedParameters2 &np_out=parameters::default_values())
 performs a generalized extrusion of input and puts it in output.
 
template<class InputMesh , class OutputMesh , class NamedParameters1 = CGAL::parameters::Default_named_parameter, class NamedParameters2 = CGAL::parameters::Default_named_parameter>
void CGAL::Polygon_mesh_processing::extrude_mesh (const InputMesh &input, OutputMesh &output, Vector_3 v, const NamedParameters1 &np_in=parameters::default_values(), const NamedParameters2 &np_out=parameters::default_values())
 fills output with a closed mesh bounding the volume swept by input when translating its vertices by v.
 

Function Documentation

◆ extrude_mesh() [1/2]

template<class InputMesh , class OutputMesh , class BottomFunctor , class TopFunctor , class NamedParameters1 = CGAL::parameters::Default_named_parameter, class NamedParameters2 = CGAL::parameters::Default_named_parameter>
void CGAL::Polygon_mesh_processing::extrude_mesh ( const InputMesh &  input,
OutputMesh &  output,
const BottomFunctor &  bot,
const TopFunctor &  top,
const NamedParameters1 &  np_in = parameters::default_values(),
const NamedParameters2 &  np_out = parameters::default_values() 
)

#include </home/runner/work/cgal/cgal/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/extrude.h>

performs a generalized extrusion of input and puts it in output.

This function extrudes the open surface mesh input and puts the result in output. The mesh generated is a closed surface mesh with a bottom and top part, both having the same graph combinatorics as input (except that the orientation of the faces of the bottom part is reversed). The bottom and the top parts are connected by a triangle strip between boundary cycles. The coordinates of the points associated to the vertices of the bottom and top part are first initialized to the same value as the corresponding vertices of input. Then for each vertex, a call to bot and top is done for the vertices of the bottom part and the top part, respectively.

Attention
output may be self intersecting.
Template Parameters
InputMesha model of FaceListGraph
OutputMesha model of FaceListGraph and MutableFaceGraph
BottomFunctora functor providing
void operator()(boost::graph_traits<InputMesh>::vertex_descriptor input_v,boost::graph_traits<OutputMesh>::vertex_descriptor output_v)
where output_v is the copy of input_v from input into the bottom part of output.
TopFunctora functor providing a similar operator() as BottomFunctor.
NamedParameters1a sequence of Named Parameters for InputMesh
NamedParameters2a sequence of Named Parameters for OutputMesh
Parameters
inputan open surface mesh to extrude.
outputa surface mesh that will contain the result of the extrusion.
botfunctor that will transform all points copied from input in order to shape the bottom part of the extrusion.
topfunctor that will transform all points copied from input in order to shape the top part of the extrusion.
np_inan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • a property map associating points to the vertices of input
  • Type: a class model of ReadablePropertyMap with boost::graph_traits<InputMesh>::vertex_descriptor as key type and Point_3 as value type
  • Default: boost::get(CGAL::vertex_point, input)
  • Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t should be available for the vertices of input.
Parameters
np_outan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • a property map associating points to the vertices of output
  • Type: a class model of ReadWritePropertyMap with boost::graph_traits<OutputMesh>::vertex_descriptor as key type and Point_3 as value type
  • Default: boost::get(CGAL::vertex_point, output)
  • Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t should be available for the vertices of output.
Examples
Polygon_mesh_processing/extrude.cpp.

◆ extrude_mesh() [2/2]

template<class InputMesh , class OutputMesh , class NamedParameters1 = CGAL::parameters::Default_named_parameter, class NamedParameters2 = CGAL::parameters::Default_named_parameter>
void CGAL::Polygon_mesh_processing::extrude_mesh ( const InputMesh &  input,
OutputMesh &  output,
Vector_3  v,
const NamedParameters1 &  np_in = parameters::default_values(),
const NamedParameters2 &  np_out = parameters::default_values() 
)

#include </home/runner/work/cgal/cgal/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/extrude.h>

fills output with a closed mesh bounding the volume swept by input when translating its vertices by v.

The mesh is oriented so that the faces corresponding to input in output have the same orientation.

Attention
output may be self intersecting.
Template Parameters
InputMesha model of the concept FaceListGraph
OutputMesha model of the concept FaceListGraph and MutableFaceGraph
Vector_3vector type from the same CGAL kernel as the point of the vertex point map used for OutputMesh.
NamedParameters1a sequence of Named Parameters for InputMesh
NamedParameters2a sequence of Named Parameters for OutputMesh
Parameters
inputan open surface mesh to extrude
outputa surface mesh that will contain the result of the extrusion
vthe vector defining the direction of the extrusion
np_inan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • a property map associating points to the vertices of input
  • Type: a class model of ReadablePropertyMap with boost::graph_traits<InputMesh>::vertex_descriptor as key type and Point_3 as value type
  • Default: boost::get(CGAL::vertex_point, input)
  • Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t should be available for the vertices of input.
Parameters
np_outan optional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • a property map associating points to the vertices of output
  • Type: a class model of ReadWritePropertyMap with boost::graph_traits<OutputMesh>::vertex_descriptor as key type and Point_3 as value type
  • Default: boost::get(CGAL::vertex_point, output)
  • Extra: If this parameter is omitted, an internal property map for CGAL::vertex_point_t should be available for the vertices of output.