Skip to content

Commit

Permalink
Arch: Walls now adopt the current working plane orientation on creati…
Browse files Browse the repository at this point in the history
…on - fixes #2175
  • Loading branch information
yorikvanhavre committed Dec 19, 2015
1 parent eb5ec62 commit d6920a0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Mod/Arch/ArchWall.py
Expand Up @@ -223,7 +223,7 @@ def getPoint(self,point=None,obj=None):
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")
Expand Down Expand Up @@ -258,8 +258,10 @@ def getPoint(self,point=None,obj=None):

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"
Expand Down

0 comments on commit d6920a0

Please sign in to comment.