Draft WorkingPlaneProxy: Difference between revisions

From FreeCAD Documentation
No edit summary
No edit summary
Line 14: Line 14:
* WP proxies can be manipulated (moved and rotated) like any other FreeCAD object
* WP proxies can be manipulated (moved and rotated) like any other FreeCAD object
* The size and appearance of the proxy object can be set in the View properties
* The size and appearance of the proxy object can be set in the View properties
* The position of the camera is stored in the Proxy object upon creation. That position can be changed anytime by right-clicking the Proxy object, then select the "Write camera position" option to store the current camera position.
* The hidden/shown state of all the objects currently in the document is also stored in the Proxy object upon creation. That state can be updated anytime by right-clicking the Proxy object, then select the "Write objects state" option.
* The Working Plane stored in the Proxy object can be restored by double-clicking the Proxy object in the tree view, or by using the [[Draft SelectPlane]] tool with the Proxy object selected.
* If the '''RestoreView''' property is set to True, the camera position will also be restored to the saved position on double-clicking the Proxy object or using [[Draft SelectPlane]]
* If the '''RestoreState''' property is set to True, the objects hidden/shown state will also be restored to the saved position on double-clicking the Proxy object or using [[Draft SelectPlane]]. If new objects have been added to the document after the state was stored in the Proxy object, the visibility of these new objects will be unchanged

==Properties==

* {{PropertyData|Placement}}: Stores the position of this Proxy and the corresponding Working Plane
* {{PropertyView|Display Size}}: The size of the Proxy object in the 3D view
* {{PropertyView|Arrow Size}}: The size of the arrows on the 3 axes
* {{PropertyView|Restore View}}: If true, the camera position will be restored on activating (by double-click or [[Draft SelectPlane]]) this object
* {{PropertyView|Restore State}}: If true, the visibility state of all objects in the current document will be restored on activating (by double-click or [[Draft SelectPlane]]) this object


==Scripting== <!--T:5-->
==Scripting== <!--T:5-->

Revision as of 17:43, 8 July 2017

Draft SetWorkingPlaneProxy

Menu location
Draft → Utilities → Create WP Proxy
Workbenches
Draft, Arch
Default shortcut
None
Introduced in version
-
See also
Draft SelectPlane

Description

This command will place a Proxy object in the document, placed and aligned to the current Working Plane. When using the Draft SelectPlane command with such a Proxy object selected, or by double-clicking it in the tree view, the working plane will be positioned and aligned back with the proxy object. The camera position and hidden/shown state of objects are also stored in the Proxy object, and can be restored if the corresponding properties are enabled (see below).

How to use

  1. Make sure the Working Plane is set as you want.
  2. Press Draft -> Utilities -> File:Draft SetWorkingPlaneProxy.png Create WP Proxy

Options

  • WP proxies can be manipulated (moved and rotated) like any other FreeCAD object
  • The size and appearance of the proxy object can be set in the View properties
  • The position of the camera is stored in the Proxy object upon creation. That position can be changed anytime by right-clicking the Proxy object, then select the "Write camera position" option to store the current camera position.
  • The hidden/shown state of all the objects currently in the document is also stored in the Proxy object upon creation. That state can be updated anytime by right-clicking the Proxy object, then select the "Write objects state" option.
  • The Working Plane stored in the Proxy object can be restored by double-clicking the Proxy object in the tree view, or by using the Draft SelectPlane tool with the Proxy object selected.
  • If the RestoreView property is set to True, the camera position will also be restored to the saved position on double-clicking the Proxy object or using Draft SelectPlane
  • If the RestoreState property is set to True, the objects hidden/shown state will also be restored to the saved position on double-clicking the Proxy object or using Draft SelectPlane. If new objects have been added to the document after the state was stored in the Proxy object, the visibility of these new objects will be unchanged

Properties

  • DataPlacement: Stores the position of this Proxy and the corresponding Working Plane
  • ViewDisplay Size: The size of the Proxy object in the 3D view
  • ViewArrow Size: The size of the arrows on the 3 axes
  • ViewRestore View: If true, the camera position will be restored on activating (by double-click or Draft SelectPlane) this object
  • ViewRestore State: If true, the visibility state of all objects in the current document will be restored on activating (by double-click or Draft SelectPlane) this object

Scripting

Working plane proxy objects can easily be created in scripts and macros:

Example:

import FreeCAD,Draft
currentWP = FreeCAD.DraftWorkingPlane
Draft.makeWorkingPlaneProxy(currentWP.getPlacement())