Draft: small fix in dimensions
This commit is contained in:
parent
87bed7d5c4
commit
c1978ec97c
|
@ -3137,13 +3137,19 @@ class _ViewProviderDimension(_ViewProviderDraft):
|
||||||
self.coord2.point.setValue((self.p3.x,self.p3.y,self.p3.z))
|
self.coord2.point.setValue((self.p3.x,self.p3.y,self.p3.z))
|
||||||
|
|
||||||
# calculate the text position and orientation
|
# calculate the text position and orientation
|
||||||
|
if hasattr(obj,"Normal"):
|
||||||
if DraftVecUtils.isNull(obj.Normal):
|
if DraftVecUtils.isNull(obj.Normal):
|
||||||
if not proj:
|
if proj:
|
||||||
norm = Vector(0,0,1)
|
|
||||||
else:
|
|
||||||
norm = (self.p3.sub(self.p2).cross(proj)).negative()
|
norm = (self.p3.sub(self.p2).cross(proj)).negative()
|
||||||
|
else:
|
||||||
|
norm = Vector(0,0,1)
|
||||||
else:
|
else:
|
||||||
norm = obj.Normal
|
norm = obj.Normal
|
||||||
|
else:
|
||||||
|
if proj:
|
||||||
|
norm = (self.p3.sub(self.p2).cross(proj)).negative()
|
||||||
|
else:
|
||||||
|
norm = Vector(0,0,1)
|
||||||
if not DraftVecUtils.isNull(norm):
|
if not DraftVecUtils.isNull(norm):
|
||||||
norm.normalize()
|
norm.normalize()
|
||||||
u = self.p3.sub(self.p2)
|
u = self.p3.sub(self.p2)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user