From 54d19e3059db1c92b42a7bdc8d2052d450153c0e Mon Sep 17 00:00:00 2001 From: Luigi Malomo Date: Thu, 5 Apr 2018 18:43:05 +0200 Subject: [PATCH] added function to compute mesh boundary length --- vcg/complex/algorithms/stat.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/vcg/complex/algorithms/stat.h b/vcg/complex/algorithms/stat.h index 8b3c8d90..ca1f3de5 100644 --- a/vcg/complex/algorithms/stat.h +++ b/vcg/complex/algorithms/stat.h @@ -212,6 +212,21 @@ public: return area/ScalarType(2.0); } + static ScalarType ComputeBorderLength(MeshType & m) + { + RequireFFAdjacency(m); + ScalarType sum = 0; + tri::UpdateTopology::FaceFace(m); + ForEachFace(m, [&](FaceType &f) { + for (int k=0; k &h, bool selectionOnly = false) // V1.0 { tri::RequirePerVertexQuality(m);