diff --git a/Kinetic_shape_reconstruction/include/CGAL/KSR_3/Data_structure.h b/Kinetic_shape_reconstruction/include/CGAL/KSR_3/Data_structure.h index b28c9c5b0e8..e63f535655d 100644 --- a/Kinetic_shape_reconstruction/include/CGAL/KSR_3/Data_structure.h +++ b/Kinetic_shape_reconstruction/include/CGAL/KSR_3/Data_structure.h @@ -703,6 +703,7 @@ public: void remove_collinear_points( std::vector& points, const FT min_angle = FT(10)) { + // std::cout << std::endl; std::vector polygon; const std::size_t n = points.size(); for (std::size_t i = 0; i < n; ++i) { @@ -722,11 +723,11 @@ public: const Direction_2 dir2(vec2); const FT angle = KSR::angle_2(dir1, dir2); - // std::cout << "- angle: " << angle << std::endl; + // std::cout << "- angle: " << angle << " : " << min_angle << std::endl; if (angle > min_angle) polygon.push_back(q); } if (polygon.size() >= 3) points = polygon; - else remove_collinear_points(points, min_angle / FT(5)); + else remove_collinear_points(points, min_angle / FT(2)); // CGAL_assertion_msg(false, "TODO: REMOVE COLLINEAR POINTS!"); } diff --git a/Kinetic_shape_reconstruction/include/CGAL/KSR_3/Initializer.h b/Kinetic_shape_reconstruction/include/CGAL/KSR_3/Initializer.h index a842cadf859..6a8df8ac842 100644 --- a/Kinetic_shape_reconstruction/include/CGAL/KSR_3/Initializer.h +++ b/Kinetic_shape_reconstruction/include/CGAL/KSR_3/Initializer.h @@ -92,7 +92,7 @@ public: add_polygons(input_range, polygon_map, bbox_faces); if (m_verbose) std::cout << "* intersecting input polygons ... "; - if (m_export) { + if (m_debug) { KSR_3::dump(m_data, "init"); // KSR_3::dump_segmented_edges(m_data, "init"); } @@ -103,7 +103,7 @@ public: set_k_intersections(k); if (m_verbose) std::cout << "done" << std::endl; - if (m_export) { + if (m_debug) { KSR_3::dump(m_data, "intersected"); // KSR_3::dump_segmented_edges(m_data, "intersected"); } diff --git a/Kinetic_shape_reconstruction/include/CGAL/Kinetic_shape_reconstruction_3.h b/Kinetic_shape_reconstruction/include/CGAL/Kinetic_shape_reconstruction_3.h index c9f81d151e4..f0f57f0c16f 100644 --- a/Kinetic_shape_reconstruction/include/CGAL/Kinetic_shape_reconstruction_3.h +++ b/Kinetic_shape_reconstruction/include/CGAL/Kinetic_shape_reconstruction_3.h @@ -203,7 +203,7 @@ public: // Finalization. timer.reset(); timer.start(); - if (m_export) dump(m_data, "jiter-final-a-result"); + if (m_debug) dump(m_data, "jiter-final-a-result"); Finalizer finalizer(m_verbose, m_export, m_debug, m_data); finalizer.clean(); @@ -212,7 +212,7 @@ public: CGAL_assertion(m_data.check_integrity(true, true, true)); if (m_verbose) std::cout << " done" << std::endl; - if (m_export) dump(m_data, "jiter-final-b-result"); + if (m_debug) dump(m_data, "jiter-final-b-result"); // std::cout << std::endl << "CLEANING SUCCESS!" << std::endl << std::endl; // exit(EXIT_SUCCESS); diff --git a/Kinetic_shape_reconstruction/test/Kinetic_shape_reconstruction/kinetic_3d_test_all.cpp b/Kinetic_shape_reconstruction/test/Kinetic_shape_reconstruction/kinetic_3d_test_all.cpp index 61243962ed5..62f97a872b6 100644 --- a/Kinetic_shape_reconstruction/test/Kinetic_shape_reconstruction/kinetic_3d_test_all.cpp +++ b/Kinetic_shape_reconstruction/test/Kinetic_shape_reconstruction/kinetic_3d_test_all.cpp @@ -338,7 +338,7 @@ void run_all_tests() { // Stress tests 5. results = {21,2,468,1224,723,67}; assert(run_test("data/stress-test-5/test-1-rnd-polygons-15-6.off", ks, num_iters, results, all_times, num_tests)); - results = {26,3,1037,2829,1697,164}; + results = {26,3,1037,2829,1693,161}; assert(run_test("data/stress-test-5/test-2-rnd-polygons-20-4.off", ks, num_iters, results, all_times, num_tests)); // Real data tests. @@ -346,7 +346,7 @@ void run_all_tests() { assert(run_test("data/real-data-test/test-10-polygons.off", ks, num_iters, results, all_times, num_tests)); results = {21,3,349,899,603,81}; assert(run_test("data/real-data-test/test-15-polygons.off", ks, num_iters, results, all_times, num_tests)); - results = {25,3,606,1607,1019,107}; + results = {25,3,606,1607,999,101}; assert(run_test("data/real-data-test/test-20-polygons.off", ks, num_iters, results, all_times, num_tests)); // Still to be done!