diff --git a/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h b/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h index 1e1b41ab7a5..59a0f0be6df 100644 --- a/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h +++ b/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h @@ -18,8 +18,6 @@ #include -#include - #include #include #include @@ -44,6 +42,11 @@ //--------------------- namespace CGAL { + +// Forward declaration for normal check +template +class Point_set_3; + namespace Shape_detection { /*! @@ -285,7 +288,7 @@ public: ///< Property map to access the normal of an input point. ) { if constexpr (std::is_convertible_v>) - CGAL_assertion(input_range.has_normal_map()); + CGAL_precondition(input_range.has_normal_map()); m_point_pmap = point_map; m_normal_pmap = normal_map; diff --git a/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_cylinder_fit_sorting.h b/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_cylinder_fit_sorting.h index 0919e421dbc..0184e3a620d 100644 --- a/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_cylinder_fit_sorting.h +++ b/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_cylinder_fit_sorting.h @@ -16,13 +16,16 @@ #include -#include - // Internal includes. #include #include namespace CGAL { + +// Forward declaration for normal check +template +class Point_set_3; + namespace Shape_detection { namespace Point_set { @@ -138,7 +141,7 @@ namespace Point_set { CGAL_precondition(input_range.size() > 0); if constexpr (std::is_convertible_v>) - CGAL_assertion(input_range.has_normal_map()); + CGAL_precondition(input_range.has_normal_map()); using NP_helper = internal::Default_property_map_helper; using Item_map = typename NP_helper::type; diff --git a/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_plane_fit_sorting.h b/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_plane_fit_sorting.h index c959e3794c3..a9977aaf4f1 100644 --- a/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_plane_fit_sorting.h +++ b/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_plane_fit_sorting.h @@ -16,13 +16,16 @@ #include -#include - // Internal includes. #include #include namespace CGAL { + +// Forward declaration for normal check +template +class Point_set_3; + namespace Shape_detection { namespace Point_set { @@ -140,7 +143,7 @@ namespace Point_set { { CGAL_precondition(input_range.size() > 0); if constexpr (std::is_convertible_v>) - CGAL_assertion(input_range.has_normal_map()); + CGAL_precondition(input_range.has_normal_map()); using NP_helper = internal::Default_property_map_helper; using Item_map = typename NP_helper::type;