CGAL 6.3-I-99 - Linear Cell Complex
Loading...
Searching...
No Matches
Constructions for Linear Cell Complex

Basic constructions.

Functions

template<typename LCC = Default, typename TriangleMesh, typename NamedParameters = parameters::Default_named_parameters>
auto CGAL::generate_hexahedral_mesh_using_two_refinement (const TriangleMesh &tmesh, int cube_cells_per_dim, int nb_levels, const NamedParameters &np=parameters::default_values())
 generates a pure hexahedral mesh from a surface triangle mesh using the two-refinement algorithm described in [1].
template<class LCC>
LCC::Dart_descriptor CGAL::read_plane_graph_in_lcc (LCC &lcc, std::istream &ais)
 Imports an embedded plane graph read from ais into lcc, a model of the LinearCellComplex concept.
template<class LCC>
LCC::Dart_descriptor CGAL::import_from_plane_graph (LCC &lcc, std::istream &ais)
template<class LCC, class Triangulation_>
LCC::Dart_descriptor CGAL::triangulation_3_to_lcc (LCC &lcc, const Triangulation_ &atr)
 Imports atr (a Triangulation_3) into lcc, a model of the LinearCellComplex concept.
template<class LCC, class PolygonMesh>
LCC::Dart_descriptor CGAL::import_face_graph_to_lcc (LCC &lcc, const PolygonMesh &pmesh)
 imports pmesh into lcc.
template<class LCC, class PolygonMesh>
LCC::Dart_descriptor CGAL::import_from_polyhedron_3 (LCC &lcc, const PolygonMesh &apoly)
template<class LCC, class PolygonMesh>
LCC::Dart_descriptor CGAL::polyhedron_3_to_lcc (LCC &lcc, const PolygonMesh &apoly)
template<class LCC, class PointRange, class TetrahedronRange>
LCC::Dart_descriptor CGAL::tetrahedron_soup_to_lcc (LCC &lcc, const PointRange &points, const TetrahedronRange &tetrahedra)
 imports a 3D tetrahedron soup into a linear cell complex.

Function Documentation

◆ generate_hexahedral_mesh_using_two_refinement()

template<typename LCC = Default, typename TriangleMesh, typename NamedParameters = parameters::Default_named_parameters>
auto CGAL::generate_hexahedral_mesh_using_two_refinement ( const TriangleMesh & tmesh,
int cube_cells_per_dim,
int nb_levels,
const NamedParameters & np = parameters::default_values() )

#include <CGAL/generate_hexahedral_mesh_using_two_refinement.h>

generates a pure hexahedral mesh from a surface triangle mesh using the two-refinement algorithm described in [1].

Starts to create a regular grid of cube_cells_per_dim \( ^3\) voxels. Then refines voxels intersected by the surface nb_levels times, while creating transitions between refined and non-refined voxels.

Template Parameters
LCCthe target Linear Cell Complex type, or CGAL::Default.
TriangleMesha model of FaceListGraph.
NamedParametersa sequence of Named Parameters.
Parameters
tmeshthe input triangle mesh.
cube_cells_per_dimthe initial grid resolution per dimension.
nb_levelsthe number of two-refinement levels.
npn optional sequence of Named Parameters among the ones listed below:
Optional Named Parameters
  • trims exterior mesh elements, i.e., remove volumes that are entirely outside of tmesh
  • Type: bool
  • Default: true
  • applies Laplacian smoothing to project boundary vertices onto tmesh
  • Type: bool
  • Default: true
  • a property map associating points to the vertices of tmesh
  • Type: a class model of ReadablePropertyMap with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and GeomTraits::Point_3 as value type, GeomTraits being the type of the parameter geom_traits
  • Default: get(CGAL::vertex_point, tmesh)
  • 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.
Returns
the resulting linear cell complex representing the hexahedral mesh.
See also
CGAL::Linear_cell_complex_for_combinatorial_map
Examples
Linear_cell_complex/hexmeshing_basic.cpp.

◆ import_face_graph_to_lcc()

template<class LCC, class PolygonMesh>
LCC::Dart_descriptor CGAL::import_face_graph_to_lcc ( LCC & lcc,
const PolygonMesh & pmesh )

#include <CGAL/import_face_graph_to_lcc.h>

imports pmesh into lcc.

The polygon mesh is added in lcc, existing darts are not modified. Returns a dart created during the import.

Precondition
LCC::dimension \( \geq\) 2 and LCC::ambient_dimension==3.
Template Parameters
LCCa model of LinearCellComplex
PolygonMesha model of FaceListGraph
See also
CGAL::read_plane_graph_in_lcc<LCC>
CGAL::triangulation_3_to_lcc<LCC,Triangulation>
Examples
Linear_cell_complex/read_face_graph_in_lcc_3.cpp.

◆ import_from_plane_graph()

template<class LCC>
LCC::Dart_descriptor CGAL::import_from_plane_graph ( LCC & lcc,
std::istream & ais )

#include <CGAL/Linear_cell_complex_constructors.h>

Deprecated
Use read_plane_graph_in_lcc() instead.

◆ import_from_polyhedron_3()

template<class LCC, class PolygonMesh>
LCC::Dart_descriptor CGAL::import_from_polyhedron_3 ( LCC & lcc,
const PolygonMesh & apoly )

#include <CGAL/import_face_graph_to_lcc.h>

Deprecated
This function is deprecated. Users should instead use CGAL::import_face_graph_to_lcc()

Imports apolyinto lcc. Objects are added in lcc, existing darts are not modified. Returns a dart created during the import.

Precondition
LCC::dimension \( \geq\) 2 and LCC::ambient_dimension==3.
Template Parameters
LCCa model of LinearCellComplex
PolygonMesha model of FaceGraph
See also
CGAL::read_plane_graph_in_lcc<LCC>
CGAL::triangulation_3_to_lcc<LCC,Triangulation>

◆ polyhedron_3_to_lcc()

template<class LCC, class PolygonMesh>
LCC::Dart_descriptor CGAL::polyhedron_3_to_lcc ( LCC & lcc,
const PolygonMesh & apoly )

#include <CGAL/import_face_graph_to_lcc.h>

Deprecated
This function is deprecated. Users should instead use CGAL::import_face_graph_to_lcc()

Imports apolyinto lcc. Objects are added in lcc, existing darts are not modified. Returns a dart created during the import.

Precondition
LCC::dimension \( \geq\) 2 and LCC::ambient_dimension==3.
Template Parameters
LCCa model of LinearCellComplex
PolygonMesha model of FaceGraph
See also
CGAL::read_plane_graph_in_lcc<LCC>
CGAL::triangulation_3_to_lcc<LCC,Triangulation>

◆ read_plane_graph_in_lcc()

template<class LCC>
LCC::Dart_descriptor CGAL::read_plane_graph_in_lcc ( LCC & lcc,
std::istream & ais )

#include <CGAL/Linear_cell_complex_constructors.h>

Imports an embedded plane graph read from ais into lcc, a model of the LinearCellComplex concept.

Objects are added in lcc, existing darts are not modified. Returns a dart created during the import.

Precondition
LCC::dimension \( \geq\) 2 and LCC::ambient_dimension==2.

File format

The file format must be the following. First the number of vertices and the number of edges of the planar graph. Then, for each vertex of the planar graph, the coordinates of the \( i^{\mbox{th}}\) vertex (two numbers for \( x\) and \( y\) coordinates). The first vertex index is 0. Then for each edge of the planar graph, the two indices of the two vertices (two numbers between 0 and the number of vertices minus 1).

Here a small example:

5 6
1.0 3.0 0.0 2.0 2.0 2.0 0.0 0.0 2.0 0.0
0 1 0 2 1 2 1 3 2 4 3 4
Example of import_graph reading the above file as istream, middle for combinatorial map as combinatorial data-structure, right for generalized maps.

Left: A planar graph embedded in the plane with P0=(1.0,3.0), P1=(0.0,2.0), P2=(2.0,2.0), P3=(0.0,0.0), P4=(2.0,0.0). Middle: the 2D linear cell complex reconstructed if combinatorial maps are the combinatorial data-structure. Right: the 2D linear cell complex reconstructed if generalized maps are the combinatorial data-structure.

See also
CGAL::triangulation_3_to_lcc<LCC,Triangulation>
CGAL::import_face_graph_to_lcc<LCC, PolygonMesh>

◆ tetrahedron_soup_to_lcc()

template<class LCC, class PointRange, class TetrahedronRange>
LCC::Dart_descriptor CGAL::tetrahedron_soup_to_lcc ( LCC & lcc,
const PointRange & points,
const TetrahedronRange & tetrahedra )

#include <CGAL/tetrahedron_soup_to_lcc.h>

imports a 3D tetrahedron soup into a linear cell complex.

Creates a 3D linear cell complex in lcc from a set of points and a range of tetrahedra defined by indices into points. The topological 3-combinatorial map is constructed by sewing adjacent 3-volumes (tetrahedra) along matching 2-faces.

Template Parameters
LCCa model of the LinearCellComplex concept.
PointRangea model of RandomAccessContainer with Point_3 as value type, being compatible with the point type of LCC.
TetrahedronRangea model of ConstRange where each element is a container of 4 point indices, accessible using operator[](int).
Parameters
pointsrange of 3D points.
tetrahedrarange of tetrahedra, where each tetrahedron is represented by 4 indices corresponding to entries in points.
lccthe target linear cell complex.
Returns
a descriptor to a dart of the created complex, or LCC::null_descriptor if the input is empty.
Precondition
LCC::dimension >= 3 and LCC::ambient_dimension == 3.
Indices in tetrahedra must be valid 0-based indices into points.
See also
CGAL::triangulation_3_to_lcc()

◆ triangulation_3_to_lcc()

template<class LCC, class Triangulation_>
LCC::Dart_descriptor CGAL::triangulation_3_to_lcc ( LCC & lcc,
const Triangulation_ & atr )

#include <CGAL/Triangulation_3_to_lcc.h>

Imports atr (a Triangulation_3) into lcc, a model of the LinearCellComplex concept.

Objects are added in lcc, existing darts are not modified. Returns a dart created during the import.

Precondition
LCC::dimension \( \geq\) 3 and LCC::ambient_dimension==3.
See also
CGAL::read_plane_graph_in_lcc<LCC>
CGAL::import_face_graph_to_lcc<LCC, PolygonMesh>