Draft: SetWorkingPlaneProxy

From FreeCAD Documentation
Jump to: navigation, search
This page is a translated version of the page Draft SetWorkingPlaneProxy and the translation is 14% complete.

Outdated translations are marked like this.
Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎română

Draft SetWorkingPlaneProxy.svg Draft SetWorkingPlaneProxy

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

Descriere

Această comandă va plasa un obiect Proxy în document, plasat și aliniat la actualul Planul de lucru. Când se utilizează comanda Draft SelectPlane cu un astfel de obiect Proxy selectat sau prin dublu clic pe el în vizualizarea arborescentă, planul de lucru va fi poziționat și aliniat înapoi cu obiectul proxy. Poziția camerei și starea ascunsă/afișată a obiectelor sunt de asemenea stocate în obiectul Proxy și pot fi restabilite dacă proprietățile corespunzătoare sunt activate (vedeți mai jos).

This proxy object can be used like a face to quickly change the working plane using the Draft SelectPlane tool. The camera position and visibility of the objects in the 3D view can be saved in the proxy object, and restored at anytime when the Draft SelectPlane tool is used.

Draft WPProxy example.png

Three working plane proxies showing different orientations and offsets


Cum se folosește

  1. Asigurați-vă că Planul de lucru este setat așa cum doriți.
  2. Apăsați Draft -> Utilities -> Draft SetWorkingPlaneProxy.png Create WP Proxy

Notes:

  • The working plane stored in the Proxy object can be restored by double-clicking the object in the tree view, or by selecting the Proxy object and using the Draft SelectPlane.svg Draft SelectPlane button.
  • The position of the camera is stored in the Proxy object upon creation. This position can be updated anytime: zoom, pan and rotate the view as you wish, then right-click the Proxy object in the tree view, and select Draft SelectPlane.svg Write camera position.
  • The visibility state of all objects is also stored in the Proxy object upon creation. This state can be updated anytime: set the VIEWVisibility property of the objects to True or False as desired, then right-click the Proxy object in the tree view, and select Draft SelectPlane.svg Write objects state.
  • Plane proxies can be moved and rotated like any other object so that they define the desired working plane. Their visual appearance can also be changed in the property editor.

Proprietăți

  • DATA Placement: stochează poziția acestui proxy și planul de lucru corespunzător
  • VIEW Dimensiune afișare: mărimea obiectului Proxy din vizualizarea 3D
  • VIEW Arrow Size: mărimea săgeților de pe cele 3 axe
  • VIEW Restore View: Dacă este adevărat, poziția camerei va fi restabilită la activarea (prin dublu clic sau Draft SelectPlane) acest obiect
  • VIEW Restore State: Dacă este adevărat, starea de vizibilitate a tuturor obiectelor din documentul curent va fi restabilită la activarea (prin dublu-clic sau Draft SelectPlane)

View

  • VIEWDisplay Size: specifies both length and width of the proxy object. If the object is created in the tree view but no element is visible in the 3D view, increase this value until it is visible.
  • VIEWArrow Size: specifies the size of the arrows indicating the three axes of the plane proxy.
  • VIEWRestore View: if it is True the camera position will be restored to the saved position when using the proxy with Draft SelectPlane.svg Draft SelectPlane or by double-clicking on it.
  • VIEWRestore State: if it is True the visibility state of all objects will be restored to the saved state when using the proxy with Draft SelectPlane.svg Draft SelectPlane or by double-clicking on it.

Script-Programare

Obiectele proxy de lucru de lucru pot fi ușor create în script și macros:

See also: Draft API and FreeCAD Scripting Basics.

Working plane proxy objects can be used in macros and from the Python console by using the following function:

WPProxy = makeWorkingPlaneProxy(placement)
  • Creates a WPProxy object from the given placement which is a FreeCAD.Placement.
    • A placement is defined by a base point, given by its FreeCAD.Vector, and a FreeCAD.Rotation.

The size of the Plane Proxy can be changed by overwriting its ViewObject.DisplaySize and ViewObject.ArrowSize attributes, with units in millimeters.

The Plane Proxy has a "Face" object as its Shape attribute. This face can be used to set the current working plane by calling its alignToFace() method.

Exempluː

import FreeCAD, FreeCADGui, Draft

currentWP = FreeCAD.DraftWorkingPlane
place = currentWP.getPlacement()

WPProxy = Draft.makeWorkingPlaneProxy(place)
WPProxy.ViewObject.DisplaySize = 3000
WPProxy.ViewObject.ArrowSize = 200

YAxis = FreeCAD.Vector(0, 1, 0)
point2 = FreeCAD.Vector(3000, 0, 0)
place2 = FreeCAD.Placement(point2, FreeCAD.Rotation(YAxis, 90))

WPProxy2 = Draft.makeWorkingPlaneProxy(place2)
WPProxy2.ViewObject.DisplaySize = 3000
WPProxy2.ViewObject.ArrowSize = 200

Axis = FreeCAD.Vector(1, 1, 1)
point3 = FreeCAD.Vector(-3000, 3000, 0)
place3 = FreeCAD.Placement(point3, FreeCAD.Rotation(Axis, 90))

WPProxy3 = Draft.makeWorkingPlaneProxy(place3)
WPProxy3.ViewObject.DisplaySize = 3000
WPProxy3.ViewObject.ArrowSize = 200
FreeCAD.ActiveDocument.recompute()

currentWP.alignToFace(WPProxy3.Shape)
FreeCADGui.Snapper.setGrid()