From 2dea69312beb8891d2ef160d229603bf0a1ec2d8 Mon Sep 17 00:00:00 2001 From: Paolo Cignoni cignoni Date: Mon, 16 Oct 2006 08:57:29 +0000 Subject: [PATCH] Added management of selection in laplacian filter --- src/meshlabplugins/meshfilter/meshfilter.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/meshlabplugins/meshfilter/meshfilter.cpp b/src/meshlabplugins/meshfilter/meshfilter.cpp index 314f2ff6e..441b10aa9 100644 --- a/src/meshlabplugins/meshfilter/meshfilter.cpp +++ b/src/meshlabplugins/meshfilter/meshfilter.cpp @@ -22,6 +22,9 @@ /**************************************************************************** History $Log$ +Revision 1.68 2006/10/16 08:57:29 cignoni +Added management of selection in laplacian filter + Revision 1.67 2006/10/10 21:13:08 cignoni Added remove non manifold and quadric simplification filter. @@ -105,6 +108,7 @@ added scale to unit box, move obj center. Rotate around object and origin are no #include #include #include +#include #include "invert_faces.h" #include "refine_loop.h" //#include "decimator.h" @@ -421,8 +425,11 @@ bool ExtraMeshFilterPlugin::applyFilter(QAction *filter, MeshModel &m, FilterPar if(filter->text() == ST(FP_LAPLACIAN_SMOOTH)) { - LaplacianSmooth(m.cm,1); - vcg::tri::UpdateNormals::PerVertexNormalizedPerFace(m.cm); + size_t cnt=tri::UpdateSelection::VertexFromFaceStrict(m.cm); + if(cnt>0) LaplacianSmooth(m.cm,1,true); + else LaplacianSmooth(m.cm,1,false); + tri::UpdateNormals::PerVertexNormalizedPerFace(m.cm); + } if(filter->text() == ST(FP_CLUSTERING))