From 2b6e30f95d686eaf8c37438e88f540a4a8df1687 Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Thu, 1 Feb 2018 10:49:30 +0100 Subject: [PATCH] Fix infinite loop in RANSAC --- .../include/CGAL/Shape_detection_3/Efficient_RANSAC.h | 3 +++ 1 file changed, 3 insertions(+) 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 93970e7ef1a..259124e5d97 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 @@ -734,6 +734,9 @@ shape. The implementation follows \cgalCite{schnabel2007efficient}. candidates.resize(end); } + else if (!keep_searching) + ++ generated_candidates; + keep_searching = (stop_probability(m_options.min_points, m_num_available_points - num_invalid, generated_candidates,