From 07f9b10b8a3b589615ec8210ad87064d943adbf9 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 28 Mar 2018 16:43:22 +0100 Subject: [PATCH] Ridges_3: Remove dependency on Bounding_volumes --- Ridges_3/include/CGAL/Ridges.h | 16 +++++++++------- Ridges_3/package_info/Ridges_3/dependencies | 2 -- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Ridges_3/include/CGAL/Ridges.h b/Ridges_3/include/CGAL/Ridges.h index 1aaaaec915a..adbfb7f1d80 100644 --- a/Ridges_3/include/CGAL/Ridges.h +++ b/Ridges_3/include/CGAL/Ridges.h @@ -28,8 +28,6 @@ #include #include -#include -#include #include #include #include @@ -356,11 +354,15 @@ Ridge_approximation(const TriangleMesh &p, BOOST_FOREACH(vertex_descriptor v, vertices(p)){ points.push_back(get(vpm,v)); } - - CGAL::Min_sphere_d > - min_sphere(points.begin(), points.end()); - squared_model_size = min_sphere.squared_radius(); - //maybe better to use CGAL::Min_sphere_of_spheres_d ?? but need to create spheres? + + Bbox_3 bb = bbox_3(points.begin(), points.end()); + double width = bb.xmax() - bb.xmin(); + double yw = bb.ymax() - bb.ymin(); + width = (std::max)(width,yw); + double zw = bb.zmax() - bb.zmin(); + width = (std::max)(width,zw); + + squared_model_size = (width*width)/4.0 ; tag_order = Ridge_order_3; } diff --git a/Ridges_3/package_info/Ridges_3/dependencies b/Ridges_3/package_info/Ridges_3/dependencies index 4ebd98b15ac..f4b40909932 100644 --- a/Ridges_3/package_info/Ridges_3/dependencies +++ b/Ridges_3/package_info/Ridges_3/dependencies @@ -1,13 +1,11 @@ Algebraic_foundations BGL -Bounding_volumes Circulator Installation Interval_support Kernel_23 Modular_arithmetic Number_types -Optimisation_basic Principal_component_analysis_LGPL Profiling_tools Property_map