From 24ff167b7227bf2f7f889eeccb141ae21f5851a0 Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Mon, 6 Mar 2017 14:36:11 +0100 Subject: [PATCH 1/2] Fix incomplete clear --- .../include/CGAL/Shape_detection_3/Efficient_RANSAC.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Efficient_RANSAC.h b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Efficient_RANSAC.h index 61ccf5820a5..828908d4c19 100644 --- a/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Efficient_RANSAC.h +++ b/Point_set_shape_detection_3/include/CGAL/Shape_detection_3/Efficient_RANSAC.h @@ -397,6 +397,7 @@ shape. The implementation follows \cgalCite{schnabel2007efficient}. m_num_available_points = m_num_total_points; clear_octrees(); + clear_shape_factories(); } /// @} From 12e032c9e4d81dedd58a8ecd7d1154dd2d5510a4 Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Mon, 13 Mar 2017 14:32:04 +0100 Subject: [PATCH 2/2] Bugfix in test: shape factory must be added when input is reset --- .../test/Point_set_shape_detection_3/test_regularization.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Point_set_shape_detection_3/test/Point_set_shape_detection_3/test_regularization.cpp b/Point_set_shape_detection_3/test/Point_set_shape_detection_3/test_regularization.cpp index d07a052897e..e332cf31a0c 100644 --- a/Point_set_shape_detection_3/test/Point_set_shape_detection_3/test_regularization.cpp +++ b/Point_set_shape_detection_3/test/Point_set_shape_detection_3/test_regularization.cpp @@ -132,7 +132,6 @@ int main() Efficient_ransac ransac; - ransac.add_shape_factory >(); const std::size_t nb_pts = 5000; @@ -156,6 +155,7 @@ int main() 5000, std::back_inserter (points)); ransac.set_input(points); + ransac.add_shape_factory >(); ransac.detect(op); check_ransac_size (ransac, 2); @@ -187,6 +187,7 @@ int main() ransac.set_input(points); + ransac.add_shape_factory >(); ransac.detect(op); check_ransac_size (ransac, 2); @@ -217,6 +218,7 @@ int main() 5000, std::back_inserter (points)); ransac.set_input(points); + ransac.add_shape_factory >(); ransac.detect(op); check_ransac_size (ransac, 2); @@ -252,6 +254,7 @@ int main() 5000, std::back_inserter (points)); ransac.set_input(points); + ransac.add_shape_factory >(); ransac.detect(op); check_ransac_size (ransac, 2);