From bd83e152e3f85642539792feb1f18bc2b812c761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 21 Oct 2022 13:52:55 +0200 Subject: [PATCH] Fix initialization and usage of Weights in skeletonization --- .../include/CGAL/Mean_curvature_flow_skeletonization.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h b/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h index 43a6a41ceb6..58e8e0b4d43 100644 --- a/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h +++ b/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h @@ -371,7 +371,11 @@ public: Mean_curvature_flow_skeletonization(const TriangleMesh& tmesh, VertexPointMap vertex_point_map, const Traits& traits = Traits()) - : m_traits(traits), m_weight_calculator(tmesh, vertex_point_map, traits, true /* use_clamped_version */) + : + m_tmesh(), + m_tmesh_point_pmap(get(CGAL::vertex_point, m_tmesh)), + m_traits(traits), + m_weight_calculator(m_tmesh, m_tmesh_point_pmap, m_traits, true /* use_clamped_version */) { init(tmesh, vertex_point_map); } @@ -884,7 +888,7 @@ private: m_edge_weight.clear(); m_edge_weight.reserve(num_halfedges(m_tmesh)); for(halfedge_descriptor hd : halfedges(m_tmesh)) - m_edge_weight.push_back(m_weight_calculator(hd, m_tmesh, m_tmesh_point_pmap)); + m_edge_weight.push_back(m_weight_calculator(hd)); } /// Assemble the left hand side.