Skip to content

Commit

Permalink
Draft: fixed bug in dimensions direction
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Jan 27, 2014
1 parent c3e8a15 commit 36bcc58
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/Mod/Draft/Draft.py
Original file line number Diff line number Diff line change
Expand Up @@ -3009,11 +3009,19 @@ def updateData(self, obj, prop):
v3 = DraftVecUtils.project(v3,obj.Direction)
self.p2 = obj.Dimline.add(v2)
self.p3 = obj.Dimline.add(v3)
base = Part.Line(self.p2,self.p3).toShape()
proj = DraftGeomUtils.findDistance(self.p1,base)
if DraftVecUtils.equals(self.p2,self.p3):
base = None
proj = None
else:
base = Part.Line(self.p2,self.p3).toShape()
proj = DraftGeomUtils.findDistance(self.p1,base)
if not base:
base = Part.Line(self.p1,self.p4).toShape()
proj = DraftGeomUtils.findDistance(obj.Dimline,base)
if DraftVecUtils.equals(self.p1,self.p4):
base = None
proj = None
else:
base = Part.Line(self.p1,self.p4).toShape()
proj = DraftGeomUtils.findDistance(obj.Dimline,base)
if proj:
self.p2 = self.p1.add(proj.negative())
self.p3 = self.p4.add(proj.negative())
Expand Down

0 comments on commit 36bcc58

Please sign in to comment.