From d6920a07c37cc5895b3a35d91bb16e9c6d0daad0 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Sat, 19 Dec 2015 12:53:20 -0200 Subject: [PATCH] Arch: Walls now adopt the current working plane orientation on creation - fixes #2175 --- src/Mod/Arch/ArchWall.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Mod/Arch/ArchWall.py b/src/Mod/Arch/ArchWall.py index b8474d75d..9d20f030b 100644 --- a/src/Mod/Arch/ArchWall.py +++ b/src/Mod/Arch/ArchWall.py @@ -223,7 +223,7 @@ class _CommandWall: FreeCADGui.Snapper.getPoint(last=self.points[0],callback=self.getPoint,movecallback=self.update,extradlg=self.taskbox()) elif len(self.points) == 2: import Part - l = Part.Line(self.points[0],self.points[1]) + l = Part.Line(FreeCAD.DraftWorkingPlane.getLocalCoords(self.points[0]),FreeCAD.DraftWorkingPlane.getLocalCoords(self.points[1])) self.tracker.finalize() FreeCAD.ActiveDocument.openTransaction(translate("Arch","Create Wall")) FreeCADGui.addModule("Arch") @@ -258,8 +258,10 @@ class _CommandWall: def addDefault(self,l): FreeCADGui.doCommand('base=FreeCAD.ActiveDocument.addObject("Sketcher::SketchObject","'+translate('Arch','WallTrace')+'")') + FreeCADGui.doCommand('base.Placement = FreeCAD.DraftWorkingPlane.getPlacement()') FreeCADGui.doCommand('base.addGeometry(trace)') - FreeCADGui.doCommand('Arch.makeWall(base,width='+str(self.Width)+',height='+str(self.Height)+',align="'+str(self.Align)+'")') + FreeCADGui.doCommand('wall = Arch.makeWall(base,width='+str(self.Width)+',height='+str(self.Height)+',align="'+str(self.Align)+'")') + FreeCADGui.doCommand('wall.Normal = FreeCAD.DraftWorkingPlane.axis') def update(self,point,info): "this function is called by the Snapper when the mouse is moved"