mirror of https://github.com/CGAL/cgal
cleanup
This commit is contained in:
parent
21ccba8dcb
commit
a18fb5f9ef
|
|
@ -703,6 +703,7 @@ public:
|
|||
void remove_collinear_points(
|
||||
std::vector<Point_2>& points, const FT min_angle = FT(10)) {
|
||||
|
||||
// std::cout << std::endl;
|
||||
std::vector<Point_2> 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!");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -338,7 +338,7 @@ void run_all_tests() {
|
|||
// Stress tests 5.
|
||||
results = {21,2,468,1224,723,67};
|
||||
assert(run_test<Traits>("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<Traits>("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<Traits>("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<Traits>("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<Traits>("data/real-data-test/test-20-polygons.off", ks, num_iters, results, all_times, num_tests));
|
||||
|
||||
// Still to be done!
|
||||
|
|
|
|||
Loading…
Reference in New Issue