CGAL 5.6.3 - 3D Simplicial Mesh Data Structures

Loading...
Searching...
No Matches
Functions
Functions
3D Simplicial Mesh Data Structures Reference

##

The functions to work with the 3D mesh data structures.

## Functions
template<class C3T3 , class TriangleMesh , typename NamedParameters = parameters::Default_named_parameters>
void | CGAL::facets_in_complex_3_to_triangle_mesh (const C3T3 &c3t3, TriangleMesh &tmesh, const NamedParameters &np=parameters::default_values())
| builds a `TriangleMesh` from the surface facets, with a consistent orientation at the interface of two subdomains.
template<typename Triangulation , typename TetrahedronRange >
Triangulation | CGAL::tetrahedron_soup_to_triangulation_3 (const TetrahedronRange &tets)
| builds a 3D triangulation from a soup of tetrahedra.
template<typename Triangulation , typename PointRange , typename TetrahedronRange , typename NamedParameters = parameters::Default_named_parameters>
Triangulation | CGAL::tetrahedron_soup_to_triangulation_3 (const PointRange &points, const TetrahedronRange &tets, const NamedParameters &np=parameters::default_values())
| builds a 3D triangulation from a soup of tetrahedra.

## Function Documentation

## ◆ facets_in_complex_3_to_triangle_mesh()

template<class C3T3 , class TriangleMesh , typename NamedParameters = parameters::Default_named_parameters>

void CGAL::facets_in_complex_3_to_triangle_mesh | ( | const C3T3 & | c3t3,
|  | TriangleMesh & | tmesh,
|  | const NamedParameters & | np = `parameters::default_values()`
| ) |  |

`#include <CGAL/facets_in_complex_3_to_triangle_mesh.h>`

builds a `TriangleMesh` from the surface facets, with a consistent orientation at the interface of two subdomains.

This function exports the surface as a `TriangleMesh` and appends it to `tmesh`, using `orient_polygon_soup()`.

Template Parameters

  C3T3 | a model of `MeshComplexWithFeatures_3InTriangulation_3`.
  TriangleMesh | a model of `MutableFaceGraph` with an internal point property map. The point type must be compatible with the one used in `C3T3`.
  NamedParameters | a sequence of Named Parameters

Parameters

  c3t3 | an instance of `C3T3`
  tmesh | an instance of `TriangleMesh`
  np | an optional sequence of Named Parameters among the ones listed below

Optional Named Parameters

  a property map with the patch id's associated to the faces of `faces(tmesh)` Type: a class model of `ReadWritePropertyMap` with `boost::graph_traits<TriangleMesh>::face_descriptor` as key type and the desired property, model of `CopyConstructible` and `LessThanComparable`, and compatible with the `Surface_patch_index` type of `C3T3` as value type. Default: If not provided, faces patch ids are ignored. |

## ◆ tetrahedron_soup_to_triangulation_3() [1/2]

template<typename Triangulation , typename PointRange , typename TetrahedronRange , typename NamedParameters = parameters::Default_named_parameters>

Triangulation CGAL::tetrahedron_soup_to_triangulation_3 | ( | const PointRange & | points,
|  | const TetrahedronRange & | tets,
|  | const NamedParameters & | np = `parameters::default_values()`
| ) |  |

`#include <CGAL/tetrahedron_soup_to_triangulation_3.h>`

builds a 3D triangulation from a soup of tetrahedra.

Template Parameters

  PointRange | a model of the concept `RandomAccessContainer` whose value type is the point type. The point type must be convertible to `Triangulation::Point`.
  TetrahedronRange | a model of the concept `RandomAccessContainer` whose value type is a model of the concept `RandomAccessContainer` whose value type is `std::size_t`
  Triangulation | a 3D triangulation class that has a vertex base model of `MeshVertexBase_3` and a cell base model of `MeshCellBase_3`
  NamedParameters | a sequence of Named Parameters

Parameters

  points | points of the soup of tetrahedra
  tets | the set of finite tetrahedra of a valid CGAL triangulation. Each element in the range describes a tetrahedron using the indices of the points in `points`. It must describe a non self-intersecting set of tetrahedra, that cover the convex hull of the corresponding point set. The tetrahedra must form a valid triangulation with each pair of neighboring cells sharing exactly one triangle. Combinatorial validity and validity of the geometric embedding are required.
  np | an optional sequence of Named Parameters among the ones listed below

Optional Named Parameters

  each element in the range describes a surface facet using the indices of points in `points` (indices 0 to 2), and the associated `Surface_patch_index` (index 3) Type: a class model of `AssociativeContainer` whose key type is model of `RandomAccessContainer` containing `int` and mapped type is `Tr::Cell::Surface_patch_index` Default: an empty `boost::unordered_map<std::array<int, 3>, typename Tr::Cell::Surface_patch_index>` Extra: to avoid copies of large data sets, this parameter can be passed using `std::cref` |
  each element in the range gives the `Triangulation::Cell::Subdomain_index` corresponding to the tetrahedron (cell) of same index in `tets` Type: a class model of `RandomAccessContainer` whose value type is `Triangulation::Cell::Subdomain_index` Default: each finite cell of the output triangulation is set to have `1` as `Subdomain_index` Extra: to avoid copies of large data sets, this parameter can be passed using `std::cref` |

Returns
  the 3D triangulation built from parameters

Precondition
  `points` contains each point only once

Postcondition
  the output triangulation must be a triangulation of the convex hull of `points`
  `is_valid()` returns `true` for the returned triangulation

See also
  `CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh()`
  SMDS_3/tetrahedron_soup_to_c3t3_example.cpp

## ◆ tetrahedron_soup_to_triangulation_3() [2/2]

template<typename Triangulation , typename TetrahedronRange >

Triangulation CGAL::tetrahedron_soup_to_triangulation_3 | ( | const TetrahedronRange & | tets | ) |

`#include <CGAL/tetrahedron_soup_to_triangulation_3.h>`

builds a 3D triangulation from a soup of tetrahedra.

Template Parameters

  TetrahedronRange | a model of `Range` whose value type is a `Tetrahedron_3`. The point type of the tetrahedra must be convertible to `Triangulation::Point`
  Triangulation | a 3D triangulation class that has a vertex base model of `SimplicialMeshVertexBase_3` and a cell base model of `SimplicialMeshCellBase_3`

Parameters

  tets | the set of finite tetrahedra of a valid CGAL triangulation. Each element in the range is the geometric description of the corresponding cell in the triangulation.

Returns
  the 3D triangulation built from `tets`

Postcondition
  the output triangulation must be a triangulation of the convex hull of `tets`

See also
  SMDS_3/tetrahedron_soup_to_c3t3_example.cpp