From 4ca887ba5819f2b642d9694e98c15c9f1471ac6d Mon Sep 17 00:00:00 2001 From: Luigi Malomo Date: Fri, 18 May 2018 13:24:58 +0200 Subject: [PATCH] added vertex border comptuation from EEadj on 1-manifolds --- vcg/complex/algorithms/update/flag.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/vcg/complex/algorithms/update/flag.h b/vcg/complex/algorithms/update/flag.h index 66087cf1..722f9992 100644 --- a/vcg/complex/algorithms/update/flag.h +++ b/vcg/complex/algorithms/update/flag.h @@ -418,6 +418,23 @@ public: } } + /// Compute the PerVertex Border flag deriving it from the Edge-Edge adjacency (made for edgemeshes) + static void VertexBorderFromEdgeAdj(MeshType &m) + { + RequirePerVertexFlags(m); + RequireEEAdjacency(m); + + VertexClearB(m); + for (EdgeIterator ei=m.edge.begin();ei!=m.edge.end();++ei) + if (!ei->IsD()) + { + for (int z=0; z<2; ++z) + if (edge::IsEdgeBorder(*ei, z)) + { + ei->V(z)->SetB(); + } + } + } /// \brief Marks feature edges according to two signed dihedral angles. /// Actually it uses the face_edge selection bit on faces,