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 53a0aeff591..dc389ba3fc8 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 @@ -400,6 +400,7 @@ shape. The implementation follows \cgalCite{schnabel2007efficient}. m_num_available_points = m_num_total_points; clear_octrees(); + clear_shape_factories(); } /// @} 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 6f3b4033043..be7879b1dfa 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);