From ad5183e567eb5f15f5457ea9a9daf98fc1731a86 Mon Sep 17 00:00:00 2001 From: Andrea Maggiordomo Date: Mon, 7 May 2018 10:14:00 +0200 Subject: [PATCH] isotropic remeshing: added early face selection check in collapse functions --- vcg/complex/algorithms/isotropic_remeshing.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vcg/complex/algorithms/isotropic_remeshing.h b/vcg/complex/algorithms/isotropic_remeshing.h index e988dc13..0622ce49 100644 --- a/vcg/complex/algorithms/isotropic_remeshing.h +++ b/vcg/complex/algorithms/isotropic_remeshing.h @@ -475,14 +475,14 @@ private: tri::UpdateFlags::VertexBorderFromNone(m); for(auto fi=m.face.begin(); fi!=m.face.end(); ++fi) - if(!(*fi).IsD()) + if(!(*fi).IsD() && (params.selectedOnly == false || fi->IsS())) { for(auto i=0; i<3; ++i) { PosType pi(&*fi, i); ++candidates; VertexPair bp = VertexPair(pi.V(), pi.VFlip()); - Point3 mp = (pi.V()->P()+pi.VFlip()->P())/2.f;; + Point3 mp = (pi.V()->P()+pi.VFlip()->P())/2.f; bool boundary = false; if(pi.V()->IsB() == pi.VFlip()->IsB()) @@ -581,7 +581,7 @@ private: int count = 0; for(auto fi=m.face.begin(); fi!=m.face.end(); ++fi) - if(!(*fi).IsD()) + if(!(*fi).IsD() && (params.selectedOnly == false || fi->IsS())) { for(auto i=0; i<3; ++i) {