Arch: Walls now adopt the current working plane orientation on creation - fixes #2175
This commit is contained in:
parent
eb5ec62ccb
commit
d6920a07c3
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue
Block a user