diff --git a/Mesh_2/changes.txt b/Mesh_2/changes.txt index cc967454854..3c22c18ba40 100644 --- a/Mesh_2/changes.txt +++ b/Mesh_2/changes.txt @@ -8,6 +8,7 @@ test/Mesh_3/combined_spheres.cpp. - major switch from .C to .cpp. Andreas's script left a lot of things that had to be fixed manually. +- new header 7 July 2006 Laurent Rineau - add the ability to set the background color, and properties of the layer diff --git a/Mesh_2/include/CGAL/Mesh_2/Output_stream.h b/Mesh_2/include/CGAL/Mesh_2/Output_stream.h new file mode 100644 index 00000000000..d540be70724 --- /dev/null +++ b/Mesh_2/include/CGAL/Mesh_2/Output_stream.h @@ -0,0 +1,28 @@ +// Copyright (c) 2006 INRIA Sophia-Antipolis (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you may redistribute it under +// the terms of the Q Public License version 1.0. +// See the file LICENSE.QPL distributed with CGAL. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// +// +// Author(s) : Laurent Rineau + +#ifndef CGAL_MESHES_OUTPUT_STREAM_H + +#ifndef CGAL_MESHES_OUTPUT_ON_CERR +#define CGAL_MESHES_OUTPUT_STREAM std::cout +#else +#define CGAL_MESHES_OUTPUT_STREAM std::cerr +#endif + +#endif diff --git a/Mesh_3/include/CGAL/Mesh_3/Double_map_container.h b/Mesh_3/include/CGAL/Mesh_3/Double_map_container.h index 4f3b0029090..1d966faa0f5 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Double_map_container.h +++ b/Mesh_3/include/CGAL/Mesh_3/Double_map_container.h @@ -21,6 +21,7 @@ #define CGAL_MESH_3_DOUBLE_MAP_CONTAINER_H #include +#include #include namespace CGAL { diff --git a/Mesh_3/include/CGAL/Mesh_3/Implicit_surface_mesher_visitor.h b/Mesh_3/include/CGAL/Mesh_3/Implicit_surface_mesher_visitor.h index 640fee14d4c..6e1a09ad277 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Implicit_surface_mesher_visitor.h +++ b/Mesh_3/include/CGAL/Mesh_3/Implicit_surface_mesher_visitor.h @@ -1,4 +1,4 @@ -// Copyright (c) 2005 INRIA Sophia-Antipolis (France). +// Copyright (c) 2005-2006 INRIA Sophia-Antipolis (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under @@ -20,6 +20,8 @@ #ifndef CGAL_MESH_3_IMPLICIT_SURFACE_MESHER_VISITOR_H #define CGAL_MESH_3_IMPLICIT_SURFACE_MESHER_VISITOR_H +#include + namespace CGAL { namespace Mesh_3 { @@ -50,10 +52,10 @@ namespace CGAL { { if(v->point().surface_index() == 0) { - std::cerr << "?"; + CGAL_MESHES_OUTPUT_STREAM << "?"; v->point().set_surface_index(1); } - std::cout << v->point().surface_index(); + CGAL_MESHES_OUTPUT_STREAM << v->point().surface_index(); } template diff --git a/Mesh_3/include/CGAL/Mesh_3/Refine_tets.h b/Mesh_3/include/CGAL/Mesh_3/Refine_tets.h index 35b78d83223..0397d7c1bdd 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Refine_tets.h +++ b/Mesh_3/include/CGAL/Mesh_3/Refine_tets.h @@ -23,6 +23,8 @@ #include #include +#include + //#include //#include @@ -115,6 +117,9 @@ public: Point refinement_point_impl(const Cell_handle& c) const { +#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS + std::cerr << "point from volume mesher: "; +#endif typename Geom_traits::Construct_circumcenter_3 circumcenter = triangulation_ref_impl().geom_traits().construct_circumcenter_3_object(); @@ -123,7 +128,16 @@ public: const Point& r = c->vertex(2)->point(); const Point& s = c->vertex(3)->point(); - return circumcenter(p, q, r, s); + const Point result = circumcenter(p, q, r, s); +#ifdef CGAL_MESHES_DEBUG_REFINEMENT_POINTS +# ifdef CGAL_MESH_3_DIRTY_DEBUG_SPHERES + std::cerr << " \t\tdistance: " + << CGAL::sqrt(CGAL::squared_distance(result, + typename Tr::Geom_traits::Point_3(CGAL::ORIGIN))); +# endif +#endif + + return result; } #if CGAL_MESH_3_DEBUG_BEFORE_CONFLICTS @@ -213,7 +227,7 @@ public: void after_insertion_impl(const Vertex_handle& v) { - std::cout << "*"; + CGAL_MESHES_OUTPUT_STREAM << "*"; #if CGAL_MESH_3_DEBUG_AFTER_INSERTION std::cerr << " INSERTED." << std::endl; #endif diff --git a/Mesh_3/include/CGAL/Mesh_criteria_3.h b/Mesh_3/include/CGAL/Mesh_criteria_3.h index c34c4372f63..1a50cce9faf 100644 --- a/Mesh_3/include/CGAL/Mesh_criteria_3.h +++ b/Mesh_3/include/CGAL/Mesh_criteria_3.h @@ -20,6 +20,8 @@ #ifndef CGAL_MESH_CRITERIA_3_H #define CGAL_MESH_CRITERIA_3_H +#include + namespace CGAL { template @@ -155,6 +157,12 @@ public: }; // end Mesh_criteria_3 + template + std::ostream& operator<<(std::ostream& os, + const typename Mesh_criteria_3::Quality& q) + { + return os << q.sq_size() << ", " << q.aspect(); + } } // end namespace CGAL