Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ Options:
--op INT Boolean operation: 0: union, 1: intersection, 2: difference.
-a,--la FLOAT Ideal edge length not scaled by diag_of_bbox. Excludes: --lr. (double, optional)
-l,--lr FLOAT ideal_edge_length = diag_of_bbox * L. Excludes: --la. (double, optional, default: 0.05)
-e,--epsr FLOAT epsilon = diag_of_bbox * EPS. (double, optional, default: 1e-3)
-d,--espr-abs FLOAT Epsilon as a unitless distance. Excludes: --epsr. (double, optional)
-e,--epsr FLOAT epsilon = diag_of_bbox * EPS. Excludes: --epsr-abs. (double, optional, default: 1e-3)
--stop-energy FLOAT Stop optimization when max energy is lower than this.
--log TEXT Log info to given file.
--level INT Log level (0 = most verbose, 6 = off).
Expand Down
10 changes: 9 additions & 1 deletion src/Parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ namespace floatTetWild {

// initial absolute target edge length not scaled to the box diagonal
Scalar ideal_edge_length_abs = 0.0;
// initial absolute epsilon not scaled to the box diagonal
Scalar eps_abs = 0.0;

int max_its = 80;
Scalar stop_energy = 10;
Expand Down Expand Up @@ -116,7 +118,13 @@ namespace floatTetWild {
}
ideal_edge_length_2 = ideal_edge_length * ideal_edge_length;

eps_input = bbox_diag_length * eps_rel;
if (eps_abs > 0.0) {
eps_input = eps_abs;
eps_rel = eps_abs / bbox_diag_length;
}
else {
eps_input = bbox_diag_length * eps_rel;
}
dd = eps_input;// / stage;
dd /= 1.5;

Expand Down
10 changes: 7 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,13 @@ int main(int argc, char** argv)
"ideal_edge_length = diag_of_bbox * L. (double, optional, default: 0.05)");
relative_op->excludes(absolute_op);

command_line.add_option("-e,--epsr",
params.eps_rel,
"epsilon = diag_of_bbox * EPS. (double, optional, default: 1e-3)");
auto absolute_eps = command_line.add_option("-d,--espr-abs",
params.eps_abs,
"Epsilon as a unitless distance. (double, optional)");
auto relative_eps = command_line.add_option("-e,--epsr",
params.eps_rel,
"epsilon = diag_of_bbox * EPS. (double, optional, default: 1e-3)");
relative_eps->excludes(absolute_eps);

command_line.add_option("--max-its", params.max_its, "(for debugging usage only)");
command_line.add_option(
Expand Down