From e8d22d0f2448cd2ee0ca6895c6b8c82575d791c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 24 Oct 2016 17:07:19 +0200 Subject: [PATCH] Some progress towards compilation of ARAP with a seam_mesh Most of the issues come from the incomplete seam_mesh graph traits now. --- .../parameterization_tests.cpp | 1 + .../include/CGAL/ARAP_parameterizer_3.h | 22 ++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/parameterization_tests.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/parameterization_tests.cpp index 1902b6e5ae2..21a66f638ff 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/parameterization_tests.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/parameterization_tests.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include diff --git a/Surface_mesh_parameterization/include/CGAL/ARAP_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/ARAP_parameterizer_3.h index 27436a2cc1d..5cb7751e4d4 100644 --- a/Surface_mesh_parameterization/include/CGAL/ARAP_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/ARAP_parameterizer_3.h @@ -239,18 +239,24 @@ private: CGAL_precondition(!vertices.empty()); if(m_lambda != 0.){ - // Fix a random vertex, the value in uvmap is already set + // Fix a random vertex, the value in uvmap is already set vertex_descriptor vd = *(vertices.begin()); put(vpmap, vd, true); } else { - // This fixes two vertices that are far in the original geometry + // This fixes two vertices that are far in the original geometry - // A local uvmap (that is then discarded) is passed to avoid changing - // the values of the real uvmap - CGAL::Unique_hash_map useless_uvmap; - status = get_border_parameterizer().parameterize_border(mesh, bhd, - VertexUVMap(useless_uvmap), - vpmap); + // A local uvmap (that is then discarded) is passed to avoid changing + // the values of the real uvmap. Since we can't get VertexUVMap::C, + // we build a map with the same key and value type + typedef boost::unordered_map Useless_map; + typedef boost::associative_property_map Useless_pmap; + + Useless_map useless_map; + Useless_pmap useless_uvpmap(useless_map); + status = get_border_parameterizer().parameterize_border(mesh, bhd, + useless_uvpmap, + vpmap); } return status;