diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/bbox.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/bbox.h index b9701de8c03..813c6a3ef8e 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/bbox.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/bbox.h @@ -278,9 +278,11 @@ namespace CGAL { * axis-aligned bounding box.} * \cgalParamDefault{1.} * \cgalParamNEnd - * \cgalParamNBegin{triangulate_bbox} - * \cgalParamDescription{a boolean used to specify if the bounding box should be triangulated or not.} - * \cgalParamDefault{true} + * \cgalParamNBegin{do_not_triangulate_faces} + * \cgalParamDescription{a boolean used to specify if the bounding box faces + * should be triangulated or not. + * The default value is `false`, and faces are triangulated.} + * \cgalParamDefault{false} * \cgalParamNEnd * \cgalParamNBegin{geom_traits} * \cgalParamDescription{an instance of a geometric traits class providing the functor `Construct_bbox_3`, @@ -306,7 +308,8 @@ namespace CGAL { using Vector_3 = typename GT::Vector_3; double factor = choose_parameter(get_parameter(np, internal_np::bbox_scaling), 1.); - bool triangulate = choose_parameter(get_parameter(np, internal_np::triangulate_bbox), true); + bool dont_triangulate = choose_parameter( + get_parameter(np, internal_np::do_not_triangulate_faces), false); Iso_cuboid_3 bb(CGAL::Polygon_mesh_processing::bbox(pmesh)); Point_3 bb_center(0.5 * (bb.xmax() + bb.xmin()), @@ -321,7 +324,7 @@ namespace CGAL { bbext[4], bbext[5], bbext[6], bbext[7], bbox_mesh); - if(triangulate) + if(!dont_triangulate) CGAL::Polygon_mesh_processing::triangulate_faces(bbox_mesh); CGAL::copy_face_graph(bbox_mesh, pmesh, diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Repair_polyhedron_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Repair_polyhedron_plugin.cpp index aa54e0679b7..496b998a97a 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Repair_polyhedron_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Repair_polyhedron_plugin.cpp @@ -395,7 +395,7 @@ void Polyhedron_demo_repair_polyhedron_plugin::on_actionAddBbox_triggered(Scene_ const double scaling = ui.bbox_scaling->value(); CGAL::Polygon_mesh_processing::add_bbox(*poly_item->face_graph(), CGAL::parameters::bbox_scaling(scaling). - triangulate_bbox(ui.triangulate_bbox->isChecked())); + do_not_triangulate_faces(!ui.triangulate_bbox->isChecked())); poly_item->invalidateOpenGLBuffers(); Q_EMIT poly_item->itemChanged(); diff --git a/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h b/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h index c5c143399d6..7f84dd628e3 100644 --- a/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h +++ b/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h @@ -164,7 +164,6 @@ CGAL_add_named_parameter(region_primitive_map_t, region_primitive_map, region_pr CGAL_add_named_parameter(postprocess_regions_t, postprocess_regions, postprocess_regions) CGAL_add_named_parameter(sizing_function_t, sizing_function, sizing_function) CGAL_add_named_parameter(bbox_scaling_t, bbox_scaling, bbox_scaling) -CGAL_add_named_parameter(triangulate_bbox_t, triangulate_bbox, triangulate_bbox) // List of named parameters that we use in the package 'Surface Mesh Simplification' CGAL_add_named_parameter(get_cost_policy_t, get_cost_policy, get_cost)