From 6ef060264db70acd4707b57f1bd8eb3f87b7428d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 19 Dec 2014 02:22:04 +0100 Subject: [PATCH] fix initalization of id for the segmentation --- .../Polyhedron_demo_mean_curvature_flow_skeleton_plugin.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_mean_curvature_flow_skeleton_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_mean_curvature_flow_skeleton_plugin.cpp index 3935c90c85f..a0c5137d132 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_mean_curvature_flow_skeleton_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_mean_curvature_flow_skeleton_plugin.cpp @@ -417,9 +417,11 @@ void Polyhedron_demo_mean_curvature_flow_skeleton_plugin::on_actionSegment() std::vector id_to_vd; id_to_vd.clear(); id_to_vd.resize(num_vertices(*mCopy)); + std::size_t id=0; for (boost::tie(vb, ve) = vertices(*mCopy); vb != ve; ++vb) { vertex_descriptor v = *vb; + v->id()=id++; id_to_vd[v->id()] = v; }