Fixed bug in Draft dimensions

This commit is contained in:
Yorik van Havre 2012-04-17 20:47:10 -03:00
parent c01e948139
commit 2a76595863

View File

@ -1804,12 +1804,12 @@ class _ViewProviderDimension:
if not proj: norm = Vector(0,0,1)
else: norm = fcvec.neg(p3.sub(p2).cross(proj))
norm.normalize()
va = get3DView.getViewDirection()
va = get3DView().getViewDirection()
if va.getAngle(norm) < math.pi/2:
norm = fcvec.neg(norm)
u = p3.sub(p2)
u.normalize()
c = get3DView.getCameraNode()
c = get3DView().getCameraNode()
r = c.orientation.getValue()
ru = Vector(r.multVec(coin.SbVec3f(1,0,0)).getValue())
if ru.getAngle(u) > math.pi/2: u = fcvec.neg(u)