Easy3D 2.6.1
Loading...
Searching...
No Matches
surface_mesh_tetrahedralization.h
1/********************************************************************
2 * Copyright (C) 2015-2021 by Liangliang Nan <liangliang.nan@gmail.com>
3 * Copyright (C) 2000-2005 INRIA - Project ALICE
4 *
5 * The code in this file is partly from OGF/Graphite (2.0 alpha-4) with
6 * modifications and enhancement:
7 * https://gforge.inria.fr/forum/forum.php?forum_id=11459
8 * The original code was distributed under the GNU GPL license.
9 ********************************************************************/
10
11#ifndef EASY3D_ALGO_SURFACE_MESH_TETRAHEDRALIZATION_H
12#define EASY3D_ALGO_SURFACE_MESH_TETRAHEDRALIZATION_H
13
14#include <string>
15
16
17class tetgenio;
18
19namespace easy3d {
20
21 class SurfaceMesh;
22 class PolyMesh;
23
27 public:
32
37
45 allow_steiner_points_on_boundary_ = x;
46 }
47
56 void set_max_tet_shape(double x) { max_tet_shape_ = x; }
57
66 void set_min_dihedral_angle(double x) { min_dihedral_angle_ = x; }
67
76 void set_max_tet_volume(double x) { max_tet_volume_ = x; }
77
84 void set_tag_regions(bool x) { tag_regions_ = x; }
85
90 void set_command_line(const std::string &x) { command_line_ = x; }
91
98
99 protected:
100 tetgenio* to_tetgen_surface(SurfaceMesh* mesh) const;
101 PolyMesh* to_easy3d_poly_mesh(tetgenio* volume) const;
102
103 private:
104 bool allow_steiner_points_on_boundary_;
105 bool tag_regions_;
106 double max_tet_shape_;
107 double min_dihedral_angle_;
108 double max_tet_volume_;
109 std::string command_line_;
110 };
111
112}
113
114#endif // EASY3D_ALGO_SURFACE_MESH_TETRAHEDRALIZATION_H
Data structure representing a polyhedral mesh.
Definition poly_mesh.h:49
A halfedge data structure for polygonal meshes of 2-manifold.
Definition surface_mesh.h:51
SurfaceMeshTetrehedralization()
Constructor.
Definition surface_mesh_tetrahedralization.cpp:23
void set_tag_regions(bool x)
If enabled, assigns an additional attribute (an integer number) to each tetrahedron that identifies t...
Definition surface_mesh_tetrahedralization.h:84
void set_min_dihedral_angle(double x)
Sets the minimum allowable dihedral angle.
Definition surface_mesh_tetrahedralization.h:66
PolyMesh * apply(SurfaceMesh *mesh)
Performs tetrahedralization on the input mesh.
Definition surface_mesh_tetrahedralization.cpp:29
~SurfaceMeshTetrehedralization()=default
Destructor.
void set_command_line(const std::string &x)
If specified, overrides all other options.
Definition surface_mesh_tetrahedralization.h:90
void set_max_tet_volume(double x)
Sets the maximum volume constraint on all tetrahedra.
Definition surface_mesh_tetrahedralization.h:76
void set_allow_steiner_points_on_boundary(bool x)
Sets if Steiner points are allowed on the boundary edges and faces of the input surface.
Definition surface_mesh_tetrahedralization.h:44
void set_max_tet_shape(double x)
Sets the maximum allowable radius-edge ratio.
Definition surface_mesh_tetrahedralization.h:56
Definition collider.cpp:182