BIM: Fixes profile tool positioning (#16305)

* [BIM] Get working plane when picking a point

Fixes: #16284

* Use the new way of getting the Draft Working Plane
This commit is contained in:
Furgo
2024-09-10 11:48:39 +02:00
committed by GitHub
parent 34c366bfd7
commit 5af5936c24

View File

@@ -116,7 +116,9 @@ class Arch_Profile:
FreeCAD.ActiveDocument.openTransaction(translate("Arch","Create Profile"))
FreeCADGui.addModule("Arch")
FreeCADGui.doCommand('p = Arch.makeProfile('+str(self.Profile)+')')
FreeCADGui.doCommand('p.Placement.move('+pt+')')
FreeCADGui.addModule('WorkingPlane')
FreeCADGui.doCommand('p.Placement = WorkingPlane.get_working_plane().get_placement()')
FreeCADGui.doCommand('p.Placement.Base = ' + pt)
FreeCADGui.addModule("Draft")
FreeCADGui.doCommand("Draft.autogroup(p)")
FreeCAD.ActiveDocument.commitTransaction()