Skip to content
Open
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
10 changes: 5 additions & 5 deletions src/examples/geogram/compute_RVD/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ namespace {
// If set, then the intersection between a Voronoi cell and the boundary surface is
// replaced with a single polygon whenever possible (i.e. when its topology is a
// disk and when it has at least 3 corners).
set_simplify_boundary_facets(CmdLine::get_arg_bool("RVD_cells:simplify_boundary"));
set_simplify_boundary_facets(CmdLine::get_arg_bool("RVD_cells:simplify_boundary"), CmdLine::get_arg_double("RVD_cells:simplify_boundary_angle_threshold"));

// If set, then the intersections are available as Mesh objects through the function
// process_polyhedron_mesh(). Note that this is implied by simplify_voronoi_facets
Expand Down Expand Up @@ -247,7 +247,6 @@ namespace {
// As an example, we shrink the cells. More drastic modifications/
// transformations of the mesh can be done (see base class's implementation
// in geogram/voronoi/RVD_polyhedron_callback.cpp).

double shrink = CmdLine::get_arg_double("RVD_cells:shrink");
if(shrink != 0.0 && mesh_.vertices.nb() != 0) {
vec3 center(0.0, 0.0, 0.0);
Expand Down Expand Up @@ -280,7 +279,7 @@ namespace {

void compute_RVD_cells(RestrictedVoronoiDiagram* RVD, Mesh& RVD_mesh) {
SaveRVDCells callback(RVD_mesh);
RVD->for_each_polyhedron(callback);
RVD->for_each_polyhedron(callback, true, true, CmdLine::get_arg_bool("RVD_cells:parallel"));
}

}
Expand Down Expand Up @@ -313,8 +312,9 @@ int main(int argc, char** argv) {
CmdLine::declare_arg("RVD_cells:simplify_tets", true, "Simplify tets intersections");
CmdLine::declare_arg("RVD_cells:simplify_voronoi", true, "Simplify Voronoi facets");
CmdLine::declare_arg("RVD_cells:simplify_boundary", false, "Simplify boundary facets");
CmdLine::declare_arg("RVD_cells:simplify_boundary_angle_threshold", 45.0, "Angle below which boundary facets are simplified. Only applies if simplify_boundary is `true`.");
CmdLine::declare_arg("RVD_cells:shrink", 0.0, "Shrink factor for computed cells");

CmdLine::declare_arg("RVD_cells:parallel", false, "Whether to run the RVD step in parallel (multi-thread).");

CmdLine::declare_arg_percent(
"epsilon",0.001,
Expand Down Expand Up @@ -540,7 +540,7 @@ int main(int argc, char** argv) {
RVD->compute_RVD(M_out, 0, cell_borders, integ_smplx);
if(integ_smplx && volumetric) {
M_out.cells.connect();
M_out.cells.compute_borders();

}
}
}
Expand Down