From abf2070f77568aa20b41984eb901d511b1a995db Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Thu, 21 Apr 2016 07:56:03 +0200 Subject: [PATCH] Clean up code --- .../include/CGAL/regularize_planes.h | 10 ----- .../test_regularization.cpp | 42 +++++++++---------- 2 files changed, 21 insertions(+), 31 deletions(-) diff --git a/Point_set_shape_detection_3/include/CGAL/regularize_planes.h b/Point_set_shape_detection_3/include/CGAL/regularize_planes.h index aa64de2ff94..571f5257604 100644 --- a/Point_set_shape_detection_3/include/CGAL/regularize_planes.h +++ b/Point_set_shape_detection_3/include/CGAL/regularize_planes.h @@ -70,9 +70,6 @@ typename Traits::Vector_3 regularize_normal typedef typename Traits::Line_3 Line; typedef typename Traits::Plane_3 Plane; - // if (symmetry_direction == CGAL::NULL_VECTOR) - // return n; - Point pt_symmetry = CGAL::ORIGIN + cos_symmetry* symmetry_direction; Plane plane_symmetry (pt_symmetry, symmetry_direction); @@ -117,9 +114,6 @@ typename Traits::Vector_3 regularize_normals_from_prior typedef typename Traits::Line_3 Line; typedef typename Traits::Plane_3 Plane; - // if (symmetry_direction == CGAL::NULL_VECTOR) - // return n; - Plane plane_orthogonality (CGAL::ORIGIN, np); Point pt_symmetry = CGAL::ORIGIN + cos_symmetry* symmetry_direction; @@ -439,8 +433,6 @@ void subgraph_mutually_orthogonal_clusters (PlaneClusterContainer& clusters, subgraph_clusters_prop.push_back(subgraph_clusters_prop_temp); } - std::cerr << "B " << clusters[0].normal << " " << clusters[1].normal << std::endl; - //regularization of cluster normals : in eachsubgraph, we start //from the largest area cluster and we propage over the subgraph //by regularizing the normals of the clusters accorting to @@ -485,7 +477,6 @@ void subgraph_mutually_orthogonal_clusters (PlaneClusterContainer& clusters, std::size_t cluster_index_2 = clusters[cluster_index].orthogonal_clusters[j]; if(clusters[cluster_index_2].is_free) { - std::cerr << "Propagation" << std::endl; propagation = true; index_container_current_ring.push_back(cluster_index_2); clusters[cluster_index_2].is_free = false; @@ -653,7 +644,6 @@ void regularize_planes (const Shape_detection_3::Efficient_RANSAC before = get_ransac_planes(ransac); - // CGAL::regularize_planes (ransac, false, true, false, true, 5., 0.01, Vector(1.,0.,0.)); - // std::vector after = get_ransac_planes(ransac); + std::vector before = get_ransac_planes(ransac); + CGAL::regularize_planes (ransac, false, true, false, true, 5.); + std::vector after = get_ransac_planes(ransac); - // std::cerr << " * Nothing should change now..." << std::endl; - // check_planes_unchanged (before, after); + std::cerr << " * Nothing should change now..." << std::endl; + check_planes_unchanged (before, after); - // CGAL::regularize_planes (ransac, false, true, false, true, 15.); - // after = get_ransac_planes(ransac); + CGAL::regularize_planes (ransac, false, true, false, true, 15.); + after = get_ransac_planes(ransac); - // std::cerr << " * Something should change now..." << std::endl; - // check_planes_changed (before, after); - // ransac.clear (); - // } + std::cerr << " * Something should change now..." << std::endl; + check_planes_changed (before, after); + ransac.clear (); + } std::cerr << "Testing coplanarity..." << std::endl; {