Easy3D 2.5.3
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:
30
37 allow_steiner_points_on_boundary_ = x;
38 }
39
47 void set_max_tet_shape(double x) { max_tet_shape_ = x; }
48
56 void set_min_dihedral_angle(double x) { min_dihedral_angle_ = x; }
57
65 void set_max_tet_volume(double x) { max_tet_volume_ = x; }
66
72 void set_tag_regions(bool x) { tag_regions_ = x; }
73
75 void set_command_line(const std::string &x) { command_line_ = x; }
76
79
80 protected:
81 tetgenio* to_tetgen_surface(SurfaceMesh* mesh) const;
82 PolyMesh* to_easy3d_poly_mesh(tetgenio* volume) const;
83
84 private:
85 bool allow_steiner_points_on_boundary_;
86 bool tag_regions_;
87 double max_tet_shape_;
88 double min_dihedral_angle_;
89 double max_tet_volume_;
90 std::string command_line_;
91 };
92
93}
94
95#endif // EASY3D_ALGO_SURFACE_MESH_TETRAHEDRALIZATION_H
Data structure representing a polyhedral mesh.
Definition: poly_mesh.h:50
A halfedge data structure for polygonal meshes of 2-manifold.
Definition: surface_mesh.h:52
Generate quality tetrahedralization from closed shells.
Definition: surface_mesh_tetrahedralization.h:26
void set_tag_regions(bool x)
Definition: surface_mesh_tetrahedralization.h:72
void set_min_dihedral_angle(double x)
Definition: surface_mesh_tetrahedralization.h:56
PolyMesh * apply(SurfaceMesh *mesh)
Definition: surface_mesh_tetrahedralization.cpp:29
void set_command_line(const std::string &x)
Definition: surface_mesh_tetrahedralization.h:75
void set_max_tet_volume(double x)
Definition: surface_mesh_tetrahedralization.h:65
void set_allow_steiner_points_on_boundary(bool x)
Definition: surface_mesh_tetrahedralization.h:36
void set_max_tet_shape(double x)
Definition: surface_mesh_tetrahedralization.h:47
Definition: collider.cpp:182