Draft: Fixes in working plane

This commit is contained in:
Yorik van Havre 2012-06-05 18:53:48 -03:00
parent 19e747d770
commit f4f132540c
2 changed files with 13 additions and 0 deletions

View File

@ -231,6 +231,17 @@ class SelectPlane:
self.call = None
self.doc = FreeCAD.ActiveDocument
if self.doc:
sel = FreeCADGui.Selection.getSelectionEx()
if len(sel) == 1:
sel = sel[0]
if sel.HasSubObjects:
if len(sel.SubElementNames) == 1:
if "Face" in sel.SubElementNames[0]:
self.ui = FreeCADGui.draftToolBar
plane.alignToFace(sel.SubObjects[0], self.offset)
self.display(plane.axis)
self.finish()
return
FreeCAD.activeDraftCommand = self
self.view = Draft.get3DView()
self.ui = FreeCADGui.draftToolBar

View File

@ -617,7 +617,9 @@ class gridTracker(Tracker):
def set(self):
Q = FreeCAD.DraftWorkingPlane.getRotation().Rotation.Q
P = FreeCAD.DraftWorkingPlane.position
self.trans.rotation.setValue([Q[0],Q[1],Q[2],Q[3]])
self.trans.translation.setValue([P.x,P.y,P.z])
self.on()
def getClosestNode(self,point):