Draft WorkingPlaneProxy/fr: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>


<div class="mw-translate-fuzzy">
{{GuiCommand/fr|Name/fr=Draft SetWorkingPlaneProxy|Workbenches=[[Draft Module/fr|Draft]], [[Arch Module/fr|Arch]]|MenuLocation=Draft → Utilitaires → Créer WP Proxy|SeeAlso=[[Draft SelectPlane/fr|Draft SelectPlane]]}}
{{GuiCommand/fr|Name/fr=Draft SetWorkingPlaneProxy|Workbenches=[[Draft Module/fr|Draft]], [[Arch Module/fr|Arch]]|MenuLocation=Draft → Utilitaires → Créer WP Proxy|SeeAlso=[[Draft SelectPlane/fr|Draft SelectPlane]]}}
</div>


<div class="mw-translate-fuzzy">
[[Image:Draft WPProxy example.png|400px]]
==Description==
==Description==
Cette commande placera un objet Proxy dans le document, placé et aligné sur le [[Draft SelectPlane/fr|Working Plane]] actuel. Lorsque vous utilisez la commande [[Draft SelectPlane/fr|Draft SelectPlane]] avec un tel objet Proxy sélectionné ou en double-cliquant dessus dans l'arborescence, le plan de travail sera positionné et aligné avec l'objet proxy. La position de la caméra et l'état masqué/affiché des objets sont également stockés dans l'objet Proxy et peuvent être restaurés si les propriétés correspondantes sont activées (voir ci-dessous).
Cette commande placera un objet Proxy dans le document, placé et aligné sur le [[Draft SelectPlane/fr|Working Plane]] actuel. Lorsque vous utilisez la commande [[Draft SelectPlane/fr|Draft SelectPlane]] avec un tel objet Proxy sélectionné ou en double-cliquant dessus dans l'arborescence, le plan de travail sera positionné et aligné avec l'objet proxy. La position de la caméra et l'état masqué/affiché des objets sont également stockés dans l'objet Proxy et peuvent être restaurés si les propriétés correspondantes sont activées (voir ci-dessous).
</div>


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.

[[Image:Draft WPProxy example.png|400px]]
{{Caption|Three working plane proxies showing different orientations and offsets}}

<div class="mw-translate-fuzzy">
==Comment l'utiliser==
==Comment l'utiliser==
# Make sure the [[Draft SelectPlane/fr|Plan de travail]] is set as you want.
# Make sure the [[Draft SelectPlane/fr|Plan de travail]] is set as you want.
# Cliquez Draft -> Utilitaires -> {{KEY|[[Image:Draft SetWorkingPlaneProxy.png|16px]] [[Draft SetWorkingPlaneProxy/fr|Créer un PT Proxy]]}}
# Cliquez Draft -> Utilitaires -> {{KEY|[[Image:Draft SetWorkingPlaneProxy.png|16px]] [[Draft SetWorkingPlaneProxy/fr|Créer un PT Proxy]]}}
</div>


Notes:
==Options==
* 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 {{Button|[[Image:Draft SelectPlane.svg|16px]] [[Draft SelectPlane]]}} button.
* Les proxy Plans de Travail peuvent être manipulés (déplacés et pivotés) comme n'importe quel autre objet FreeCAD
* 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 {{Button|[[Image:Draft SelectPlane.svg|16px]] Write camera position}}.
* La taille et l'apparence de l'objet Proxy peuvent être définies dans vue propriétés
* The visibility state of all objects is also stored in the Proxy object upon creation. This state can be updated anytime: set the {{PropertyView|Visibility}} property of the objects to {{TRUE}} or {{FALSE}} as desired, then right-click the Proxy object in the tree view, and select {{Button|[[Image:Draft SelectPlane.svg|16px]] Write objects state}}.
* La position de la caméra est stockée dans l'objet Proxy lors de sa création. Cette position peut être modifiée à tout moment en cliquant avec le bouton droit sur l'objet Proxy, puis en sélectionnant l'option "Write camera position" pour stocker la position actuelle de la caméra.
* 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]].
* L'état caché/visible de tous les objets dans le document actuel est également stocké dans l'objet Proxy lors de sa création. Cet état peut être mis à jour à tout moment en cliquant avec le bouton droit sur l'objet Proxy, puis sélectionnez l'option "Write objects state".
* Le plan de travail stocké dans l'objet Proxy peut être restauré en double-cliquant sur l'objet Proxy dans l'arborescence ou en utilisant l'outil [[Draft SelectPlane/fr|Draft SelectPlane]] avec l'objet Proxy sélectionné.
* Si la propriété '''RestoreView''' est définie sur True, la position de la caméra sera également restaurée à la position enregistrée en double-cliquant sur l'objet Proxy ou en utilisant [[Draft SelectPlane/fr|Draft SelectPlane]]
* Si la propriété '''RestoreState''' est définie sur True, l'état caché/visible des objets sera également restauré à la position enregistrée en double-cliquant sur l'objet Proxy ou en utilisant [[Draft SelectPlane/fr|Draft SelectPlane]]. Si de nouveaux objets ont été ajoutés au document après que l'état a été stocké dans l'objet Proxy, la visibilité de ces nouveaux objets sera inchangée


==Propriétés==
==Propriétés==


<div class="mw-translate-fuzzy">
* {{PropertyData/fr|Placement}}: Stocke la position de ce Proxy et du plan de travail correspondant
* {{PropertyData/fr|Placement}}: Stocke la position de ce Proxy et du plan de travail correspondant
* {{PropertyView/fr|Display Size}}: La dimension de l'objet Proxy dans la vue 3D
* {{PropertyView/fr|Display Size}}: La dimension de l'objet Proxy dans la vue 3D
Line 27: Line 35:
* {{PropertyView/fr|Restore View}}: Si True, la position de la caméra est restaurée ou activée (ou double-cliquez sur l'objet [[Draft SelectPlane/fr|Draft SelectPlane]])
* {{PropertyView/fr|Restore View}}: Si True, la position de la caméra est restaurée ou activée (ou double-cliquez sur l'objet [[Draft SelectPlane/fr|Draft SelectPlane]])
* {{PropertyView/fr|Restore State}}: Si True, la visibilité de tous les objets dans documents est restaurée ou activée (ou double-cliquez sur l'objet [[Draft SelectPlane/fr|Draft SelectPlane]])
* {{PropertyView/fr|Restore State}}: Si True, la visibilité de tous les objets dans documents est restaurée ou activée (ou double-cliquez sur l'objet [[Draft SelectPlane/fr|Draft SelectPlane]])
</div>


=== View ===
* {{PropertyView|Display 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.
* {{PropertyView|Arrow Size}}: specifies the size of the arrows indicating the three axes of the plane proxy.
* {{PropertyView|Restore View}}: if it is {{TRUE}} the camera position will be restored to the saved position when using the proxy with {{Button|[[Image:Draft SelectPlane.svg|16px]] [[Draft SelectPlane]]}} or by double-clicking on it.
* {{PropertyView|Restore State}}: if it is {{TRUE}} the visibility state of all objects will be restored to the saved state when using the proxy with {{Button|[[Image:Draft SelectPlane.svg|16px]] [[Draft SelectPlane]]}} or by double-clicking on it.

<div class="mw-translate-fuzzy">
==Scripting==
==Scripting==
L'objet Working plane proxy peut être facilement créé avec une [[macros/fr|macros]] en utilisant le script ci dessous:
L'objet Working plane proxy peut être facilement créé avec une [[macros/fr|macros]] en utilisant le script ci dessous:
</div>

{{Emphasis|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:
{{Code|code=
WPProxy = makeWorkingPlaneProxy(placement)
}}
* Creates a {{incode|WPProxy}} object from the given {{incode|placement}} which is a {{incode|FreeCAD.Placement}}.
** A placement is defined by a base point, given by its {{incode|FreeCAD.Vector}}, and a {{incode|FreeCAD.Rotation}}.

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

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


Exemple:
Exemple:
{{Code|code=
{{Code|code=
import FreeCAD,Draft
import FreeCAD, FreeCADGui, Draft

currentWP = FreeCAD.DraftWorkingPlane
currentWP = FreeCAD.DraftWorkingPlane
Draft.makeWorkingPlaneProxy(currentWP.getPlacement())
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()
}}
}}


{{Draft Tools navi}}
{{Userdocnavi}}
{{clear}}
{{clear}}

Revision as of 13:14, 8 January 2019

Draft SetWorkingPlaneProxy

Emplacement du menu
Draft → Utilitaires → Créer WP Proxy
Ateliers
Draft, Arch
Raccourci par défaut
Aucun
Introduit dans la version
-
Voir aussi
Draft SelectPlane

Description

Cette commande placera un objet Proxy dans le document, placé et aligné sur le Working Plane actuel. Lorsque vous utilisez la commande Draft SelectPlane avec un tel objet Proxy sélectionné ou en double-cliquant dessus dans l'arborescence, le plan de travail sera positionné et aligné avec l'objet proxy. La position de la caméra et l'état masqué/affiché des objets sont également stockés dans l'objet Proxy et peuvent être restaurés si les propriétés correspondantes sont activées (voir ci-dessous).

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.

Three working plane proxies showing different orientations and offsets

Comment l'utiliser

  1. Make sure the Plan de travail is set as you want.
  2. Cliquez Draft -> Utilitaires -> File:Draft SetWorkingPlaneProxy.png Créer un PT 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 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 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 VueVisibility property of the objects to true or false as desired, then right-click the Proxy object in the tree view, and select 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.

Propriétés

  • DonnéesPlacement: Stocke la position de ce Proxy et du plan de travail correspondant
  • VueDisplay Size: La dimension de l'objet Proxy dans la vue 3D
  • VueArrow Size: La dimension des flèches dans les 3 axes
  • VueRestore View: Si True, la position de la caméra est restaurée ou activée (ou double-cliquez sur l'objet Draft SelectPlane)
  • VueRestore State: Si True, la visibilité de tous les objets dans documents est restaurée ou activée (ou double-cliquez sur l'objet Draft SelectPlane)

View

  • VueDisplay 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.
  • VueArrow Size: specifies the size of the arrows indicating the three axes of the plane proxy.
  • VueRestore View: if it is true the camera position will be restored to the saved position when using the proxy with Draft SelectPlane or by double-clicking on it.
  • VueRestore 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 or by double-clicking on it.

Scripting

L'objet Working plane proxy peut être facilement créé avec une macros en utilisant le script ci dessous:

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.

Exemple:

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()