CGAL 5.5.2 - Tetrahedral Remeshing
Tetrahedral Remeshing Reference

bimba_back_small.png
Jane Tournois, Noura Faraj, Jean-Marc Thiery, Tamy Boubekeur
The package provides a function for remeshing tetrahedral meshes, targeting high quality meshes with respect to dihedral angles. This practical iterative remeshing algorithm is designed to remesh multi-material tetrahedral meshes, by iteratively performing a sequence of elementary operations such as edge splits, edge collapses, edge flips, and vertex relocations following a Laplacian smoothing. The algorithm results in high-quality uniform isotropic meshes, with the desired mesh density, while preserving the input geometric curve and surface features.
Introduced in: CGAL 5.1
Depends on: 3D Triangulations
BibTeX: cgal:tftb-tr-23a
License: GPL
Windows Demo: Polyhedron demo
Common Demo Dlls: dlls

Classified Reference Pages

Concepts

Classes

Function Templates

Modules

 Concepts
 
 Classes
 

Functions

template<typename Traits , typename TDS , typename SLDS , typename NamedParameters = parameters::Default_named_parameters>
void CGAL::tetrahedral_isotropic_remeshing (CGAL::Triangulation_3< Traits, TDS, SLDS > &tr, const double &target_edge_length, const NamedParameters &np=parameters::default_values())
 remeshes a tetrahedral mesh. More...
 
template<typename Tr , typename CornerIndex , typename CurveIndex >
CGAL::Triangulation_3< typename Tr::Geom_traits, typename Tr::Triangulation_data_structure > CGAL::convert_to_triangulation_3 (CGAL::Mesh_complex_3_in_triangulation_3< Tr, CornerIndex, CurveIndex > c3t3)
 converts the triangulation contained in the input to a Triangulation_3. More...
 

Function Documentation

◆ convert_to_triangulation_3()

template<typename Tr , typename CornerIndex , typename CurveIndex >
CGAL::Triangulation_3<typename Tr::Geom_traits, typename Tr::Triangulation_data_structure> CGAL::convert_to_triangulation_3 ( CGAL::Mesh_complex_3_in_triangulation_3< Tr, CornerIndex, CurveIndex >  c3t3)

#include <CGAL/tetrahedral_remeshing.h>

converts the triangulation contained in the input to a Triangulation_3.

This function should be used to generate a valid triangulation for tetrahedral remeshing, when the input triangulation is generated with the tetrahedral mesh generation package.

Template Parameters
Tris the underlying triangulation for Mesh_complex_3_in_triangulation_3. It can be instantiated with any 3D regular triangulation of CGAL provided that its vertex and cell base classes are models of the concepts MeshVertexBase_3 (refined by RemeshingCellBase_3) and MeshCellBase_3 (refined by RemeshingVertexBase_3), respectively.
CornerIndexis the type of the indices for feature corners. If c3t3 has been generated using CGAL::make_mesh_3(), it must match the Corner_index type of the model of the MeshDomainWithFeatures_3 concept used for mesh generation.
CurveIndexis the type of the indices for feature curves. If c3t3 has been generated using CGAL::make_mesh_3(), it must match the Curve_index type of the model of the MeshDomainWithFeatures_3 concept used for mesh generation.
Parameters
c3t3the complex containing the triangulation to be remeshed.
Examples:
Tetrahedral_remeshing/mesh_and_remesh_polyhedral_domain_with_features.cpp.

◆ tetrahedral_isotropic_remeshing()

template<typename Traits , typename TDS , typename SLDS , typename NamedParameters = parameters::Default_named_parameters>
void CGAL::tetrahedral_isotropic_remeshing ( CGAL::Triangulation_3< Traits, TDS, SLDS > &  tr,
const double &  target_edge_length,
const NamedParameters &  np = parameters::default_values() 
)

#include <CGAL/tetrahedral_remeshing.h>

remeshes a tetrahedral mesh.

It is recommended to use CGAL::Tetrahedral_remeshing::Remeshing_triangulation_3 for the first parameter, as it inherits from Triangulation_3 with a TDS suitable for this function.

This function takes as input a 3-dimensional triangulation and performs a sequence of atomic operations in order to generate as output a high quality mesh with a prescribed uniform density. These atomic operations are performed as follows:

  • edge splits, until all edges satisfy a prescribed length criterion,
  • edge collapses, until all edges satisfy a prescribed length criterion,
  • edge flips, to locally improve dihedral angles, until they can no longer be improved by flipping,
  • global smoothing by vertex relocations,
  • re-projection of boundary vertices to the initial surface.

This remeshing function can deal with multi-domains, boundaries, and features. It preserves the geometry of subdomains throughout the remeshing process.

Subdomains are defined by indices that are stored in the cells of the input triangulation, following the MeshCellBase_3 concept (refined by RemeshingCellBase_3). The surfacic interfaces between subdomains are formed by facets whose two incident cells have different subdomain indices. The edges where three or more subdomains meet form feature polylines, and are considered as constrained edges.

Template Parameters
Traitsis the geometric traits, model of RemeshingTriangulationTraits_3
TDSis the triangulation data structure for Triangulation_3, model of TriangulationDataStructure_3, with cell base model of RemeshingCellBase_3 and vertex base model of RemeshingVertexBase_3.
SLDSis an optional parameter for Triangulation_3, that specifies the type of the spatial lock data structure.
NamedParametersa sequence of Named Parameters
Parameters
trthe triangulation to be remeshed, of type Triangulation_3<Traits, TDS, SLDS>. Remeshing_triangulation is a helper class that satisfies all the requirements of its template parameters.
target_edge_lengththe uniform target edge length. This parameter provides a mesh density target for the remeshing algorithm.
npoptional sequence of Named Parameters among the ones listed below
Optional Named Parameters
  • the number of iterations for the full sequence of atomic operations performed (listed in the above description)
  • Type: unsigned int
  • Default: 1

  • If false, none of the input volume boundaries can be modified. Otherwise, the topology is preserved, but atomic operations can be performed on the surfaces, and along feature polylines, such that boundaries are remeshed.
  • Type: bool
  • Default: true
  • Extra: Boundaries are between the exterior and the interior, between two subdomains, between the areas selected or not for remeshing (cf Remeshing_cell_is_selected_map), or defined by Remeshing_edge_is_constrained_map and Remeshing_facet_is_constrained_map.

  • a property map containing the constrained-or-not status of each edge of tr.
  • Type: a class model of ReadWritePropertyMap with std::pair<Triangulation_3::Vertex_handle, Triangulation_3::Vertex_handle> as key type and bool as value type. It must be default constructible.
  • Default: a default property map where no edge is constrained
  • Extra: A constrained edge can be split or collapsed, but not flipped.
  • Extra: The pairs must be ordered to ensure consistency.
  • Extra: During the meshing process, the set of constrained edges evolves consistently with edge splits and collapses, so the property map must be writable.

  • a property map containing the constrained-or-not status of each facet of tr.
  • Type: a class model of ReadablePropertyMap with Triangulation_3::Facet as key type and bool as value type. It must be default constructible.
  • Default: a default property map where no facet is constrained
  • Extra: A constrained facet can be split or collapsed, but not flipped.
  • Extra: This map, contrary to the others, is not updated throughout the remeshing process.

  • a property map containing the selected - or - not status for each cell of tr for remeshing. Only selected cells are modified (and possibly their neighbors if surfaces are modified) by remeshing.
  • Type: a class model of ReadWritePropertyMap with Triangulation_3::Cell_handle as key type and bool as value type. It must be default constructible.
  • Default: a default property map where all cells of the domain (i.e. with a non-zero Subdomain_index) are selected.
  • Extra: During the meshing process, the set of selected cells evolves consistently with the atomic operations that are performed, so the property map must be writable.

  • If true, the end vertices of the edges set as constrained in edge_is_constrained_map move along the constrained polylines they belong to.
  • Type: bool
  • Default: false
  • Extra: The endvertices of constraints listed by edge_is_constrained_map, and edges incident to at least three subdomains are made eligible to one dimensional smoothing, along the constrained polylines they belong to. Corners (i.e. vertices incident to more than 2 constrained edges) are not allowed to move at all.
    Note that activating the smoothing step on polyline constraints tends to reduce the quality of the minimal dihedral angle in the mesh.
    If remesh_boundaries is set to false, this parameter is ignored.

See also
CGAL::Tetrahedral_remeshing::Remeshing_triangulation_3
Examples:
Tetrahedral_remeshing/mesh_and_remesh_polyhedral_domain_with_features.cpp, Tetrahedral_remeshing/tetrahedral_remeshing_example.cpp, Tetrahedral_remeshing/tetrahedral_remeshing_from_mesh.cpp, Tetrahedral_remeshing/tetrahedral_remeshing_of_one_subdomain.cpp, and Tetrahedral_remeshing/tetrahedral_remeshing_with_features.cpp.