Wildmeshing Toolkit
Loading...
Searching...
No Matches
tetwild_spec.hpp
1#pragma once
2#include <nlohmann/json.hpp>
3namespace {
4
5nlohmann::json tetwild_spec = R"(
6[
7 {
8 "pointer": "/",
9 "type": "object",
10 "required": ["application", "input"],
11 "optional": [
12 "output",
13 "skip_simplify",
14 "use_sample_envelope",
15 "use_legacy_code",
16 "num_threads",
17 "max_iterations",
18 "filter",
19 "eps_rel",
20 "length_rel",
21 "stop_energy",
22 "preserve_topology",
23 "throw_on_fail",
24 "log_file",
25 "report",
26 "DEBUG_output",
27 "DEBUG_sanity_checks",
28 "DEBUG_hausdorff"
29 ]
30 },
31 {
32 "pointer": "/application",
33 "type": "string",
34 "options": ["tetwild"],
35 "doc": "Application name must be tetwild."
36 },
37 {
38 "pointer": "/input",
39 "type": "list",
40 "doc": "List of triangular input meshes.",
41 "min": 1
42 },
43 {
44 "pointer": "/input/*",
45 "type": "string",
46 "doc": "Triangular input mesh."
47 },
48 {
49 "pointer": "/output",
50 "type": "string",
51 "default": "out",
52 "doc": "Output file name (without extension)."
53 },
54 {
55 "pointer": "/skip_simplify",
56 "type": "bool",
57 "default": false,
58 "doc": "If true, input simplification will be skipped."
59 },
60 {
61 "pointer": "/use_sample_envelope",
62 "type": "bool",
63 "default": false,
64 "doc": "Use sample envelope instead of exact one."
65 },
66 {
67 "pointer": "/use_legacy_code",
68 "type": "bool",
69 "default": false,
70 "doc": "Use the original TetWild code for the mesh improvement. This only works with 'use_sample_envelope'!"
71 },
72 {
73 "pointer": "/num_threads",
74 "type": "int",
75 "default": 0,
76 "doc": "Number of threads used by the application"
77 },
78 {
79 "pointer": "/max_iterations",
80 "type": "int",
81 "default": 80,
82 "doc": "Maximum iterations before stopping."
83 },
84 {
85 "pointer": "/filter",
86 "type": "string",
87 "options": ["flood", "input", "tracked", "none"],
88 "default": "none",
89 "doc": "Remove the outside region based on different criteria. 'flood': flood fill. 'input': winding number w.r.t. the input. 'tracked': winding number w.r.t. the tracked surface. 'none': Do not filter. Flood fill only works if the input is closed. Otherwise, it results in an empty mesh. Filtering w.r.t. the input might cause wrinkles along the surface as some tets might be falsely tagged. Filtering w.r.t. the tracked surface can lead to missing pieces if the input consists of multiple components."
90 },
91 {
92 "pointer": "/eps_rel",
93 "type": "float",
94 "default": 2e-3,
95 "doc": "Envelope thickness relative to the bounding box"
96 },
97 {
98 "pointer": "/length_rel",
99 "type": "float",
100 "default": 5e-2,
101 "doc": "Target edge length relative to the bounding box"
102 },
103 {
104 "pointer": "/stop_energy",
105 "type": "float",
106 "default": 10,
107 "doc": "Target energy. If all tets have an energy below this, tetwild will stop."
108 },
109 {
110 "pointer": "/preserve_topology",
111 "type": "bool",
112 "default": false,
113 "doc": "Preserve the topology of the input surface."
114 },
115 {
116 "pointer": "/throw_on_fail",
117 "type": "bool",
118 "default": false,
119 "doc": "Throw exception if the output does not fulfil the desired criteria. No output will be generated."
120 },
121 {
122 "pointer": "/log_file",
123 "type": "string",
124 "default": "",
125 "doc": "Logs are not just printed on the terminal but also saved in this file."
126 },
127 {
128 "pointer": "/report",
129 "type": "string",
130 "default": "",
131 "doc": "A JSON file that stores information about the result and the method execution, e.g., runtime."
132 },
133 {
134 "pointer": "/DEBUG_output",
135 "type": "bool",
136 "default": false,
137 "doc": "Write the mesh as debug_{}.vtu after every operation."
138 },
139 {
140 "pointer": "/DEBUG_sanity_checks",
141 "type": "bool",
142 "default": false,
143 "doc": "Perform sanity checks after every operation. This can be very slow and should only be used for debugging."
144 },
145 {
146 "pointer": "/DEBUG_hausdorff",
147 "type": "bool",
148 "default": false,
149 "doc": "Sanity Check: Compute and report the Hausdorff distance of the output to the input. Should be always smaller than eps."
150 }
151]
152)"_json;
153
154}