From e527b5f48dcb945492fcb99e312271504a494a45 Mon Sep 17 00:00:00 2001 From: DeepSOIC Date: Fri, 13 Nov 2015 22:42:15 +0300 Subject: [PATCH] Compose: fix placement averaging mode --- latticeCompose.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/latticeCompose.py b/latticeCompose.py index b011bc7..eb8e527 100644 --- a/latticeCompose.py +++ b/latticeCompose.py @@ -139,11 +139,11 @@ class Compose(latticeBaseFeature.LatticeFeature): outPlm = toolPlm.multiply(plmMatcher.multiply(basePlm)) elif isAvg: plm1 = toolPlm - plm2 = pltMatcher.multiply(basePlm) + plm2 = plmMatcher.multiply(basePlm) transl = plm1.Base*0.5 + plm2.Base*0.5 a1,b1,c1,d1 = plm1.Rotation.Q a2,b2,c2,d2 = plm2.Rotation.Q - rot = App.Rotation((a1+a2,b1+b2,c1+c2,d1+d2)) #no divide-by-two, because FreeCAD will normalize the quaternion automatically + rot = App.Rotation(a1+a2,b1+b2,c1+c2,d1+d2) #no divide-by-two, because FreeCAD will normalize the quaternion automatically outPlm = App.Placement(transl,rot) elif isIgnore: outPlm = toolPlm