From 4f58f5182e4d33f4d3fdac44bf98b35ea13c933e Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 4 Jun 2015 16:31:04 +0200 Subject: [PATCH] add debug code and fix constness --- .../internal/remesh_impl.h | 37 ++++++++++++++----- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/remesh_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/remesh_impl.h index 5e7404bf31e..6900d48a76f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/remesh_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/remesh_impl.h @@ -65,11 +65,18 @@ namespace internal { BOOST_FOREACH(halfedge_descriptor h, border) border_edges[edge(h, pmesh_)] = true; } - friend bool get(Border_constraint_pmap map, - edge_descriptor e) + + friend bool get(const Border_constraint_pmap& map, + const edge_descriptor& e) { - return map.border_edges[e]; + CGAL_assertion(!map.border_edges.empty()); + typename std::map::const_iterator it + = map.border_edges.find(e); + + CGAL_assertion(it != map.border_edges.end()); + return it->second; } + }; template VNormalsMap; @@ -627,7 +644,6 @@ namespace internal { } // compute moves - //todo : iterate on barycenters instead. Would avoid retesting is_on_patch typedef typename std::map::value_type VP_pair; std::map new_locations; BOOST_FOREACH(const VP_pair& vp, barycenters) @@ -663,6 +679,7 @@ namespace internal { { //todo : handle the case of boundary vertices std::cout << "Project to surface..."; + std::cout.flush(); BOOST_FOREACH(vertex_descriptor v, vertices(mesh_)) {