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 ff54549274a..e76da9171a1 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 @@ -42,11 +42,6 @@ //--------------------- namespace CGAL { - -// Forward declaration for normal check -template::Kernel::Vector_3> -class Point_set_3; - namespace Shape_detection { /*! @@ -287,8 +282,10 @@ public: Normal_map normal_map = Normal_map() ///< Property map to access the normal of an input point. ) { - if constexpr (std::is_convertible_v>) +#ifdef CGAL_POINT_SET_3_H + if constexpr (std::is_convertible_v >) CGAL_precondition(input_range.has_normal_map()); +#endif 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 6f9cb8b0668..ed9c2908a7a 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 @@ -21,11 +21,6 @@ #include namespace CGAL { - -// Forward declaration for normal check -template::Kernel::Vector_3> -class Point_set_3; - namespace Shape_detection { namespace Point_set { @@ -140,8 +135,10 @@ namespace Point_set { m_traits(parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits))) { CGAL_precondition(input_range.size() > 0); - if constexpr (std::is_convertible_v>) +#ifdef CGAL_POINT_SET_3_H + if constexpr (std::is_convertible_v >) CGAL_precondition(input_range.has_normal_map()); +#endif 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 c225ea5f47a..e5da7ec5a21 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 @@ -21,11 +21,6 @@ #include namespace CGAL { - -// Forward declaration for normal check -template::Kernel::Vector_3> -class Point_set_3; - namespace Shape_detection { namespace Point_set { @@ -142,8 +137,10 @@ namespace Point_set { m_traits(parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits))) { CGAL_precondition(input_range.size() > 0); - if constexpr (std::is_convertible_v>) +#ifdef CGAL_POINT_SET_3_H + if constexpr (std::is_convertible_v >) CGAL_precondition(input_range.has_normal_map()); +#endif using NP_helper = internal::Default_property_map_helper; using Item_map = typename NP_helper::type;