Performs tetrahedralization of a 3D cell using the TetGen library.
More...
#include <simplexify.hpp>
|
| void | reconstructBoundaries () |
| | Find out which faces (triangles) of the tetrahedrons that compose the tetrahedralization are on the boundary of the cell.
|
|
| const geometry::Cell3D< float_t, index_t > & | m_cell |
| | The input 3D geometric cell for tetrahedralization.
|
| tetgen::tetgenio | m_in |
| | Input structure for the TetGen library.
|
| tetgen::tetgenio | m_out |
| | Output structure for the TetGen library.
|
| std::vector< tetgen::tetgenio::facet > | m_facelist |
| | Dynamic buffer for storing the list of facets in the tetrahedralization. This is used only if the static buffer is not large enough.
|
| std::vector< tetgen::tetgenio::polygon > | m_polygons |
| | Dynamic buffer for storing the list of polygons in the tetrahedralization. This is used only if the static buffer is not large enough.
|
| std::vector< int32_t > | m_facetmarkerlist |
| | Boundary markers are tags (integers) used mainly to identify which entities are associated with which boundary element of the input PLC. We use it to reconstruct to which face each triface belongs to.
|
| std::unique_ptr< PointsViewType > | m_point_list |
| | Unique pointer to an Eigen::Map representing the list of points in the tetrahedralization. The data is generated by TetGen in m_out.
|
| std::unique_ptr< SimplexesViewType > | m_tetrahedra_list |
| | Unique pointer to an Eigen::Map representing the list of tetrahedra in the tetrahedralization. The data is generated by TetGen in m_out.
|
| std::vector< index_t > | m_num_subfaces_per_face |
| | Number of triangles in each face of the cell.
|
| std::vector< index_t > | m_num_subfaces_per_face_cumsum |
| | Cumulative number of triangles in each face of the cell.
|
| Eigen::Matrix< index_t, 3, -1 > | m_faces_subsimplexes |
| | Triangles in each face of the cell.
|
Performs tetrahedralization of a 3D cell using the TetGen library.
This class generates a tetrahedral mesh for a given 3D cell and provides access to the resulting points and tetrahedra. It leverages the TetGen library [http://wias-berlin.de/software/tetgen/] under the hood for 3D computational geometry operations.
◆ float_t
Defines the floating-point type used in the TetGen library.
◆ index_t
Defines the integer type used in the TetGen library.
◆ PointsType
◆ PointsViewType
◆ PointType
◆ SimplexesType
◆ SimplexesViewType
◆ SubsimplexesType
◆ SubsimplexesViewType
◆ Tetrahedralization()
Constructs a Tetrahedralization object for a given 3D cell.
Initializes the tetrahedralization process for the provided 3D geometric cell.
- Parameters
-
| cell | A 3D cell to be tetrahedralized, represented by geometry::Cell3D. |
| reconstruct_boundary | For every triangular face of each tetrahedron in the tessellation, identify the corresponding face of the cell to which it belongs. |
| options | Tetgen library options |
◆ cell()
| const auto & vulpes::geometry::Tetrahedralization::cell |
( |
| ) |
const |
|
inline |
Gets a reference to the cell.
◆ getNumPoints()
| index_t vulpes::geometry::Tetrahedralization::getNumPoints |
( |
| ) |
const |
|
inline |
Gets the number of points in the tetrahedralization.
- Returns
- The total number of points in the tetrahedralization.
◆ getNumTetrahedra()
| index_t vulpes::geometry::Tetrahedralization::getNumTetrahedra |
( |
| ) |
const |
|
inline |
Gets the number of tetrahedra in the tetrahedralization.
- Returns
- The total number of tetrahedra generated.
◆ getPointList()
| const PointsViewType & vulpes::geometry::Tetrahedralization::getPointList |
( |
| ) |
const |
|
inline |
Gets the list of points in the tetrahedralization.
The points are represented as a 3xN Eigen matrix where each column is a point (x, y, z).
- Returns
- A reference to an Eigen::Map representing the point list.
◆ getTetrahedronList()
| const SimplexesViewType & vulpes::geometry::Tetrahedralization::getTetrahedronList |
( |
| ) |
const |
|
inline |
Gets the list of tetrahedra in the tetrahedralization.
The tetrahedra are represented as a 4xM Eigen matrix where each column contains the indices of the four vertices of a tetrahedron.
- Returns
- A reference to an Eigen::Map representing the tetrahedron list.
◆ getTriangleListFacet()
| const auto vulpes::geometry::Tetrahedralization::getTriangleListFacet |
( |
index_t | face_id | ) |
const |
|
inline |
Gets the list of triangles of the boundary of the tetrahedralization for a certain face.
- Note
- this information is available only after reconstructBoundaries has been called
◆ reconstructBoundaries()
| void vulpes::geometry::Tetrahedralization::reconstructBoundaries |
( |
| ) |
|
|
protected |
Find out which faces (triangles) of the tetrahedrons that compose the tetrahedralization are on the boundary of the cell.
◆ dim
| int32_t vulpes::geometry::Tetrahedralization::dim = 3 |
|
staticconstexpr |
◆ m_cell
The input 3D geometric cell for tetrahedralization.
◆ m_facelist
| std::vector<tetgen::tetgenio::facet> vulpes::geometry::Tetrahedralization::m_facelist |
|
protected |
Dynamic buffer for storing the list of facets in the tetrahedralization. This is used only if the static buffer is not large enough.
◆ m_faces_subsimplexes
| Eigen::Matrix<index_t, 3, -1> vulpes::geometry::Tetrahedralization::m_faces_subsimplexes |
|
protected |
◆ m_facetmarkerlist
| std::vector<int32_t> vulpes::geometry::Tetrahedralization::m_facetmarkerlist |
|
protected |
Boundary markers are tags (integers) used mainly to identify which entities are associated with which boundary element of the input PLC. We use it to reconstruct to which face each triface belongs to.
◆ m_in
| tetgen::tetgenio vulpes::geometry::Tetrahedralization::m_in |
|
protected |
Input structure for the TetGen library.
◆ m_num_subfaces_per_face
| std::vector<index_t> vulpes::geometry::Tetrahedralization::m_num_subfaces_per_face |
|
protected |
Number of triangles in each face of the cell.
◆ m_num_subfaces_per_face_cumsum
| std::vector<index_t> vulpes::geometry::Tetrahedralization::m_num_subfaces_per_face_cumsum |
|
protected |
Cumulative number of triangles in each face of the cell.
Needed to create the Eigen::Map from a contiguous buffer
◆ m_out
| tetgen::tetgenio vulpes::geometry::Tetrahedralization::m_out |
|
protected |
Output structure for the TetGen library.
◆ m_point_list
| std::unique_ptr<PointsViewType> vulpes::geometry::Tetrahedralization::m_point_list |
|
protected |
Unique pointer to an Eigen::Map representing the list of points in the tetrahedralization. The data is generated by TetGen in m_out.
◆ m_polygons
| std::vector<tetgen::tetgenio::polygon> vulpes::geometry::Tetrahedralization::m_polygons |
|
protected |
Dynamic buffer for storing the list of polygons in the tetrahedralization. This is used only if the static buffer is not large enough.
◆ m_tetrahedra_list
| std::unique_ptr<SimplexesViewType> vulpes::geometry::Tetrahedralization::m_tetrahedra_list |
|
protected |
Unique pointer to an Eigen::Map representing the list of tetrahedra in the tetrahedralization. The data is generated by TetGen in m_out.
◆ s_facelist
| tetgen::tetgenio::facet vulpes::geometry::Tetrahedralization::s_facelist = {} |
|
staticprotected |
Static buffer for storing the list of facets in the tetrahedralization.
◆ s_polygons
| tetgen::tetgenio::polygon vulpes::geometry::Tetrahedralization::s_polygons = {} |
|
staticprotected |
Static buffer for storing the list of polygons in the tetrahedralization.
◆ s_static_buffer_size
| index_t vulpes::geometry::Tetrahedralization::s_static_buffer_size = 256 |
|
staticconstexpr |
Static constant defining the size of the static buffer for avoiding dynamic allocation of facet and polygon lists.
◆ s_tetgen_default_options
| const tetgen::tetgenbehavior vulpes::geometry::Tetrahedralization::s_tetgen_default_options |
|
static |
Initial value:=
[]() {
tetgen::tetgenbehavior options;
options.plc = 1;
options.zeroindex = 1;
options.quality = 1;
options.minratio = 2.0;
options.mindihedral = 3.5;
options.opt_max_flip_level = 3;
options.opt_scheme = 7;
options.opt_iterations = 3;
options.quiet = 1;
return options;
}()
The documentation for this class was generated from the following files: