GuiCommand:
Name: Draft WorkingPlaneProxy
MenuLocation: Utilities , Create working plane proxy
Utils , Create working plane proxy
Workbenches: Draft_Workbench, BIM_Workbench
SeeAlso: Draft_SelectPlane
Draft WorkingPlaneProxy
Description
The Draft WorkingPlaneProxy command creates a working plane proxy to save the current Draft working plane. A working plane proxy can be used to quickly restore a working plane. The camera position and visibility of the objects in the 3D view are also saved in the working plane proxy and can, optionally, be restored as well.
![](https://raw.githubusercontent.com/FreeCAD/FreeCAD-documentation/master/wiki/images/Draft_WPProxy_example.png)
Usage
- Optionally change the working plane.
- Optionally change the 3D view.
- Optionally change the visibility state of objects in the document.
- There are several ways to invoke the command:
- Draft: Press the
Create working plane proxy button.
- Draft: Select the Utilities →
Create working plane proxy option from the menu, or from the Tree view or 3D view context menu.
- BIM: Select the Utils →
Create working plane proxy option from the menu.
- Draft: Press the
- A working plane proxy is created.
- To align the working plane with a working plane proxy, double-click the working plane proxy in the Tree view or use it with the Draft SelectPlane command.
Context menu
For a Draft WorkingPlaneProxy these additional options are available in the Tree view context menu:
-
Write camera position: updates the View Data property of the working plane proxy with the current 3D view camera settings.
-
Write objects state: updates the Visibility Map property of the working plane proxy with the current visibility state of objects in the document.
Notes
- Working plane proxies can be moved and rotated like any other object. Use
Draft Snap Center to snap to their Placement point.
Properties
See also: Property editor.
A Draft WorkingPlaneProxy object is derived from an App FeaturePython object and inherits all its properties. It also has the following additional properties:
Data
{{TitleProperty|Base}}
-
Placement|Placement: specifies the position of the working plane proxy in the 3D view. See Placement.
-
Shape|Shape|Hidden: specifies the shape of the working plane proxy.
View
{{TitleProperty|Base}}
-
Line Color|Color: specifies the color of all elements of the working plane proxy.
-
Line Width|Float: specifies the line width of the axes and arrow symbols.
-
Restore State|Bool: specifies if the Visibility Map is restored when the working plane is aligned with the working plane proxy.
-
Restore View|Bool: specifies if the View Data is restored when the working plane is aligned with the working plane proxy.
-
Transparency|Percent: specifies the transparency of the face of the working plane proxy.
-
View Data|FloatList: specifies the camera position and settings.
-
Visibility Map|Map|Hidden: specifies the visibility state of objects.
{{TitleProperty|Draft}}
-
Arrow Size|Length: specifies the size of the arrow symbols displayed at the tip of the three axes.
-
Display Size|Length: specifies the length and width of the working plane proxy.
Scripting
See also: Autogenerated API documentation and FreeCAD Scripting Basics.
To create a Draft WorkingPlaneProxy use the make_workingplaneproxy
method of the Draft module.
If the Draft Workbench is active the FreeCAD application object has a DraftWorkingPlane
property which stores the current working plane. The {{Incode|Placement}} from the {{Incode|getPlacement}} method of the DraftWorkingPlane
object can be used to create an aligned working plane proxy. The {{Incode|Placement}} of a working plane proxy in turn can be used to realign the working plane.
# This code only works if the Draft Workbench is active!
import FreeCAD as App
import FreeCADGui as Gui
import Draft
doc = App.newDocument()
workplane = App.DraftWorkingPlane
place = workplane.getPlacement()
proxy = Draft.make_workingplaneproxy(place)
proxy.ViewObject.DisplaySize = 3000
proxy.ViewObject.ArrowSize = 200
axis2 = App.Vector(1, 1, 1)
point2 = App.Vector(3000, 0, 0)
place2 = App.Placement(point2, App.Rotation(axis2, 90))
proxy2 = Draft.make_workingplaneproxy(place2)
proxy2.ViewObject.DisplaySize = 3000
proxy2.ViewObject.ArrowSize = 200
workplane.setFromPlacement(proxy2.Placement, rebase=True)
Gui.Snapper.setGrid()
doc.recompute()
⏵ documentation index > Draft > Draft WorkingPlaneProxy
This page is retrieved from https://github.com/FreeCAD/FreeCAD-documentation/blob/main/wiki/Draft_WorkingPlaneProxy.md