From ba87d4d427d34d6fb3ecc64f5a340bb0db7fbfb3 Mon Sep 17 00:00:00 2001 From: Marco Callieri mcallieri Date: Wed, 19 Oct 2016 12:16:46 +0000 Subject: [PATCH] corrected, in "scale" and "rotate" filters, how the "on bbox center" option works, when the layer already have a transformation matrix --- src/meshlabplugins/filter_meshing/meshfilter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/meshlabplugins/filter_meshing/meshfilter.cpp b/src/meshlabplugins/filter_meshing/meshfilter.cpp index b11dbf19a..0b38f2b2b 100644 --- a/src/meshlabplugins/filter_meshing/meshfilter.cpp +++ b/src/meshlabplugins/filter_meshing/meshfilter.cpp @@ -1149,7 +1149,7 @@ bool ExtraMeshFilterPlugin::applyFilter(QAction * filter, MeshDocument & md, Ric switch(par.getEnum("rotCenter")) { case 0: tranVec=Point3m(0,0,0); break; - case 1: tranVec=m.cm.trBB().Center(); break; + case 1: tranVec= m.cm.Tr * m.cm.bbox.Center(); break; case 2: tranVec=par.getPoint3m("customCenter");break; } @@ -1360,7 +1360,7 @@ bool ExtraMeshFilterPlugin::applyFilter(QAction * filter, MeshDocument & md, Ric switch (par.getEnum("scaleCenter")) { case 0: tranVec = Point3m(0, 0, 0); break; - case 1: tranVec = m.cm.trBB().Center(); break; + case 1: tranVec = m.cm.Tr * m.cm.bbox.Center(); break; case 2: tranVec = par.getPoint3m("customCenter"); break; } trTran.SetTranslate(tranVec);