From dad74ae1f293ade75afd70fe1b2aa527f10ae2f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 10 Nov 2017 11:36:26 +0100 Subject: [PATCH] Hid some debug code with macros --- Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h | 4 ++++ .../CGAL/Mesh_domain_with_polyline_features_3.h | 4 ++-- Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h | 10 +++++----- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h b/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h index 2f2744923fb..9ad4fd066df 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h @@ -995,10 +995,12 @@ scan_triangulation_impl() { // Cannot be const, see treat_new_facet signature Facet facet = *facet_it; +#ifdef CGAL_MESH_3_VERBOSE std::cerr << "TREAT FACET : " << std::endl << "*" << *facet.first->vertex((facet.second+1)%4) << std::endl << " " << *facet.first->vertex((facet.second+2)%4) << std::endl << " " << *facet.first->vertex((facet.second+3)%4) << std::endl; +#endif this->treat_new_facet(facet); } } @@ -1562,12 +1564,14 @@ treat_new_facet(Facet& facet) { insert_bad_facet(facet, *is_facet_bad); +#ifdef CGAL_MESH_3_DEBUG_FACET_CRITERIA std::cerr << "INSERT BAD FACET : " << std::endl << "* " << *facet.first->vertex((facet.second+1)%4) << std::endl << " " << *facet.first->vertex((facet.second+2)%4) << std::endl << " " << *facet.first->vertex((facet.second+3)%4) << std::endl << " Surface center: " << get_facet_surface_center(facet) << std::endl << " Quality = " << is_facet_bad->second << std::endl; +#endif } } else diff --git a/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h b/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h index bb071149b2c..58a82f53407 100644 --- a/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h +++ b/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h @@ -892,7 +892,7 @@ public: void build_curves_aabb_tree() const { -#if CGAL_MESH_3_VERBOSE +#ifdef CGAL_MESH_3_VERBOSE std::cerr << "Building curves AABB tree..."; CGAL::Real_timer timer; timer.start(); @@ -914,7 +914,7 @@ public: } curves_aabb_tree_.build(); curves_aabb_tree_is_built = true; -#if CGAL_MESH_3_VERBOSE +#ifdef CGAL_MESH_3_VERBOSE timer.stop(); std::cerr << " done (" << timer.time() * 1000 << " ms)" << std::endl; #endif diff --git a/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h b/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h index 6c49a68d4f9..f947f976192 100644 --- a/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h @@ -507,7 +507,7 @@ public: /// @cond DEVELOPERS template void add_vertices_to_c3t3_on_patch_without_feature_edges(C3t3& c3t3) const { -#if CGAL_MESH_3_VERBOSE +#ifdef CGAL_MESH_3_VERBOSE std::cout << "add_vertices_to_c3t3_on_patch_without_feature_edges..."; std::cout.flush(); #endif @@ -637,7 +637,7 @@ public: } } } -#if CGAL_MESH_3_VERBOSE +#ifdef CGAL_MESH_3_VERBOSE std::cout << "\badd_vertices_to_c3t3_on_patch_without_feature_edges done."; std::cout << std::endl; #endif @@ -653,7 +653,7 @@ public: first_intersected_primitive(ray); } -#if USE_ALL_INTERSECTIONS +#ifdef USE_ALL_INTERSECTIONS boost::optional shoot_a_ray_2(const Ray_3 ray) const { const Point_3& p = ray.source(); typedef typename AABB_tree:: @@ -883,7 +883,7 @@ detect_features(FT angle_in_degree, initialize_ts(p); using internal::Mesh_3::Get_face_index_pmap; Get_face_index_pmap get_face_index_pmap(p); -#if CGAL_MESH_3_VERBOSE +#ifdef CGAL_MESH_3_VERBOSE std::size_t poly_id = &p-&poly[0]; std::cerr << "Polyhedron #" << poly_id << " :\n"; std::cerr << " material #" << patch_indices[poly_id].first << "\n"; @@ -909,7 +909,7 @@ detect_features(FT angle_in_degree, } this->patch_id_to_polyhedron_id.resize(nb_of_patch_plus_one); this->patch_has_featured_edges.resize(nb_of_patch_plus_one); -#if CGAL_MESH_3_VERBOSE +#ifdef CGAL_MESH_3_VERBOSE std::cerr << "Number of patches: " << (nb_of_patch_plus_one - 1) << std::endl; #endif BOOST_FOREACH(Polyhedron_type& p, poly)