From b7e0e37ba3b9be0bbe686b6f76ee614d0a3c16bd Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Fri, 25 Jun 2021 18:02:05 +0200 Subject: [PATCH] fixed regularization in the polyhedron demo --- .../Point_set_shape_detection_plugin.cpp | 40 ++++++++++++------- .../package_info/Shape_detection/dependencies | 1 - 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp index e91df2c695e..519d2805d11 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_shape_detection_plugin.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include @@ -373,15 +373,19 @@ private: if (dialog.regularize()) { std::cerr << "Regularization of planes... " << std::endl; - CGAL::regularize_planes( - *points, - points->point_map(), + CGAL::Shape_regularization::Planes::regularize_planes( planes, CGAL::Identity_property_map(), - CGAL::Shape_detection::RG::Point_to_shape_index_map(*points, regions), - true, true, true, true, - max_accepted_angle, - max_distance_to_plane); + *points, + points->point_map(), + CGAL::parameters::plane_index_map( + CGAL::Shape_detection::RG::Point_to_shape_index_map(*points, regions)). + regularize_parallelism(true). + regularize_orthogonality(true). + regularize_coplanarity(true). + regularize_axis_symmetry(true). + max_angle(max_accepted_angle). + max_offset(max_distance_to_plane)); std::cerr << "done" << std::endl; } @@ -654,13 +658,19 @@ private: { std::cerr << "Regularization of planes... " << std::endl; typename Ransac::Plane_range planes = ransac.planes(); - CGAL::regularize_planes (*points, - points->point_map(), - planes, - CGAL::Shape_detection::Plane_map(), - CGAL::Shape_detection::Point_to_shape_index_map(*points, planes), - true, true, true, true, - op.normal_threshold, op.epsilon); + CGAL::Shape_regularization::Planes::regularize_planes( + planes, + CGAL::Shape_detection::Plane_map(), + *points, + points->point_map(), + CGAL::parameters::plane_index_map( + CGAL::Shape_detection::Point_to_shape_index_map(*points, planes)). + regularize_parallelism(true). + regularize_orthogonality(true). + regularize_coplanarity(true). + regularize_axis_symmetry(true). + max_angle(dialog.normal_tolerance()). + max_offset(op.epsilon)); std::cerr << "done" << std::endl; } diff --git a/Shape_detection/package_info/Shape_detection/dependencies b/Shape_detection/package_info/Shape_detection/dependencies index 742db3f7bb9..0e1d2b20985 100644 --- a/Shape_detection/package_info/Shape_detection/dependencies +++ b/Shape_detection/package_info/Shape_detection/dependencies @@ -31,4 +31,3 @@ Solver_interface Spatial_searching Stream_support Surface_mesh -Shape_regularization