diff --git a/Surface_reconstruction_3/demo/Surface_reconstruction_3/poisson/PoissonDoc.cpp b/Surface_reconstruction_3/demo/Surface_reconstruction_3/poisson/PoissonDoc.cpp index 3027da0a254..f01c237faed 100644 --- a/Surface_reconstruction_3/demo/Surface_reconstruction_3/poisson/PoissonDoc.cpp +++ b/Surface_reconstruction_3/demo/Surface_reconstruction_3/poisson/PoissonDoc.cpp @@ -37,6 +37,7 @@ #include #include #include +#include // STL #include @@ -938,15 +939,13 @@ void CPoissonDoc::OnReconstructionPoissonSurfaceMeshing() m_sm_radius*size, // upper bound of Delaunay balls radii m_sm_distance_poisson*size); // upper bound of distance to surface -#ifdef DEBUG_TRACE - std::cerr << " make_surface_mesh(dichotomy error="< #include #include +#include // This test #include "enriched_polyhedron.h" @@ -204,9 +205,7 @@ int main(int argc, char * argv[]) std::cerr << "Compute implicit function...\n"; // Create implicit function -#ifdef DEBUG_TRACE - std::cerr << " APSS_implicit_function(knn="< #include #include +#include // This test #include "enriched_polyhedron.h" @@ -263,15 +264,13 @@ int main(int argc, char * argv[]) sm_radius*size, // upper bound of Delaunay balls radii sm_distance*size); // upper bound of distance to surface -#ifdef DEBUG_TRACE - std::cerr << " make_surface_mesh(dichotomy error="<>20) << " Mb allocated" - << std::endl; + CGAL_TRACE_STREAM << "Delaunay refinement: " << "added " << nb_vertices2-nb_vertices << " Steiner points, " + << task_timer.time() << " seconds, " + << (memory>>20) << " Mb allocated" + << std::endl; task_timer.reset(); -#endif // Smooth normals field. // Commented out as it shrinks the reconstructed model. //extrapolate_normals(); -#ifdef DEBUG_TRACE - std::cerr << "Solve Poisson equation...\n"; -#endif + CGAL_TRACE_STREAM << "Solve Poisson equation...\n"; /// Compute the Poisson indicator function f() /// at each vertex of the triangulation. @@ -336,14 +330,12 @@ public: // - f() < 0 inside the surface. set_contouring_value(median_value_at_input_vertices()); -#ifdef DEBUG_TRACE // Print status /*long*/ memory = CGAL::Memory_sizer().virtual_size(); - std::cerr << "Solve Poisson equation: " << task_timer.time() << " seconds, " - << (memory>>20) << " Mb allocated" - << std::endl; + CGAL_TRACE_STREAM << "Solve Poisson equation: " << task_timer.time() << " seconds, " + << (memory>>20) << " Mb allocated" + << std::endl; task_timer.reset(); -#endif return true; } diff --git a/Surface_reconstruction_3/include/CGAL/surface_reconstruction_assertions.h b/Surface_reconstruction_3/include/CGAL/surface_reconstruction_assertions.h index 54ed4350358..760d73db8f1 100644 --- a/Surface_reconstruction_3/include/CGAL/surface_reconstruction_assertions.h +++ b/Surface_reconstruction_3/include/CGAL/surface_reconstruction_assertions.h @@ -296,4 +296,10 @@ #define CGAL_TRACE if (false) printf #endif +#ifdef DEBUG_TRACE + #define CGAL_TRACE_STREAM std::cerr +#else + #define CGAL_TRACE_STREAM if (false) std::cerr +#endif + diff --git a/Surface_reconstruction_3/test/Surface_reconstruction_3/APSS_reconstruction_test.cpp b/Surface_reconstruction_3/test/Surface_reconstruction_3/APSS_reconstruction_test.cpp index 9dfea62858f..89724068da2 100644 --- a/Surface_reconstruction_3/test/Surface_reconstruction_3/APSS_reconstruction_test.cpp +++ b/Surface_reconstruction_3/test/Surface_reconstruction_3/APSS_reconstruction_test.cpp @@ -27,6 +27,7 @@ #include #include #include +#include // This test #include "enriched_polyhedron.h" @@ -200,9 +201,7 @@ int main(int argc, char * argv[]) std::cerr << "Compute implicit function...\n"; // Create implicit function -#ifdef DEBUG_TRACE - std::cerr << " APSS_implicit_function(knn="< #include #include +#include // This test #include "enriched_polyhedron.h" @@ -267,15 +268,13 @@ int main(int argc, char * argv[]) sm_radius*size, // upper bound of Delaunay balls radii sm_distance*size); // upper bound of distance to surface -#ifdef DEBUG_TRACE - std::cerr << " make_surface_mesh(dichotomy error="<