Draft WorkingPlaneProxy/es: Difference between revisions

From FreeCAD Documentation
No edit summary
(Updating to match new version of source page)
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
<languages/>

<div class="mw-translate-fuzzy">
{{Docnav/es
{{Docnav/es
|[[Draft_AutoGroup/es|AutoGrupo]]
|[[Draft_AutoGroup/es|AutoGrupo]]
|[[Draft_AddConstruction/es|Añadir a grupo de construcción]]
|[[Draft_AddConstruction/es|Añadir a grupo de construcción]]
|[[Draft_Module/es|Borrador]]
|[[Draft_Workbench/es|Borrador]]
|IconL=Draft_AutoGroup.svg
|IconL=Draft_AutoGroup.svg
|IconR=Borrador_AddConstruction.svg
|IconR=Draft_AddConstruction.svg
|IconC=Workbench_Draft.svg
|IconC=Workbench_Draft.svg
}}
}}
</div>


<div class="mw-translate-fuzzy">
{{GuiCommand/es
{{GuiCommand/es
|Name=Draft WorkingPlaneProxy
|Name=Draft WorkingPlaneProxy
|Name/es=Borrador PlanoTrabajoProxy
|Name/es=Borrador PlanoTrabajoProxy
|MenuLocation=Borrador → Utilidades → Crear proxy del plano trabajo
|MenuLocation=Borrador → Utilidades → Crear proxy del plano trabajo
|Workbenches=[[Draft_Module/es|Borrador]], [[Arch_Module/es|Arquitectura]]
|Workbenches=[[Draft_Workbench/es|Borrador]], [[Arch_Workbench/es|Arquitectura]]
|SeeAlso=[[Draft_SelectPlane/es|Borrador SeleccionarPlano]]
|SeeAlso=[[Draft_SelectPlane/es|Borrador SeleccionarPlano]]
}}
}}
</div>


<span id="Description"></span>
==Descripción==
==Descripción==


<div class="mw-translate-fuzzy">
This command will place a Plane Proxy object aligned to the current [[Draft_SelectPlane|Working Plane]].
Este comando colocará un objeto Proxy de Plano alineado con el actual [[Draft_SelectPlane/es|Plano trabajo]].

</div>
This proxy object can be used like a face to quickly change the working plane using the [[Draft_SelectPlane|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|Draft SelectPlane]] tool is used.


[[Image:Draft WPProxy example.png|400px]]
[[Image:Draft WPProxy example.png|400px]]
{{Caption|Tres proxies de planos de trabajo que muestran diferentes orientaciones y rellenos}}
{{Caption|Three working plane proxies showing different orientations and offsets}}


<span id="Usage"></span>
==Utilización==
==Utilización==


<div class="mw-translate-fuzzy">
# Make sure the [[Draft SelectPlane|Working Plane]] is set as you want.
# Asegúrate de que el [[Draft SelectPlane/es|Plano trabajo]] está configurado como quieres.
# Then go to the menu {{MenuCommand|Draft → Utilities → [[Image:Draft_WorkingPlaneProxy.svg|16px]] Create Working Plane Proxy}}.
# A continuación, vaya al menú {{MenuCommand|Borrador → Utilidades → [[Image:Draft_WorkingPlaneProxy.svg|16px]] Crear proxy de plano trabajo}}.
</div>

== Context menu ==

For a Draft WorkingPlaneProxy these additional options are available in the [[Tree_view|Tree view]] context menu:

* {{MenuCommand|[[Image:Draft_SelectPlane.svg|16px]] Write camera position}}: updates the {{PropertyView|View Data}} property of the working plane proxy with the current [[3D_view|3D view]] camera settings.
* {{MenuCommand|[[Image:Draft_SelectPlane.svg|16px]] Write objects state}}: updates the {{PropertyView|Visibility Map}} property of the working plane proxy with the current visibility state of objects in the document.


==Notes==
==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 {{Button|[[Image:Draft SelectPlane.svg|16px]] [[Draft_SelectPlane|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 {{Button|[[Image:Draft SelectPlane.svg|16px]] 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 {{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}}.
* 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|Property editor]].


<div class="mw-translate-fuzzy">
==Properties==
==Notas==
* El plano de trabajo almacenado en el objeto Proxy puede restaurarse haciendo doble clic en el objeto en la vista de árbol, o seleccionando el objeto Proxy y utilizando el {{Button|[[Image:Draft SelectPlane.svg|16px]] [[Draft_SelectPlane/es|Borrador SeleccionarPlano]].}}.
* La posición de la cámara se almacena en el objeto Proxy en el momento de su creación. Esta posición puede actualizarse en cualquier momento: haz zoom, panorámica y rotación de la vista como desees, luego haz clic con el botón derecho en el objeto Proxy en la vista de árbol y selecciona {{Button|[[Image:Draft SelectPlane.svg|16px]]. Escribir posición de la cámara}}.
* El estado de visibilidad de todos los objetos también se almacena en el objeto Proxy en el momento de su creación. Este estado puede actualizarse en cualquier momento: establezca la propiedad {{PropertyView|Visibility}} de los objetos a {{TRUE}} o {{FALSE}} según desee, luego haga clic con el botón derecho en el objeto Proxy en la vista de árbol, y seleccione {{Button|[[Image:Draft SelectPlane.svg|16px]] Escribir estado de los objetos}}.
* Los proxies de plano pueden moverse y girarse como cualquier otro objeto para que definan el plano de trabajo deseado. Su apariencia visual también se puede cambiar en el [[Property_editor/es|Editor de propiedades]].
</div>

<span id="Properties"></span>
==Propiedades==

See also: [[Property_editor|Property editor]].

A Draft WorkingPlaneProxy object is derived from an [[App_FeaturePython|App FeaturePython]] object and inherits all its properties. It also has the following additional properties:


=== Data ===
=== Data ===

* {{PropertyData|Placement}}: specifies the position of the proxy object and the corresponding working plane.
{{TitleProperty|Base}}
** {{PropertyData|Position}}: specifies the coordinates of the proxy object.

** {{PropertyData|Angle}}: specifies the rotation angle of the proxy object.
** {{PropertyData|Axis}}: specifies the axis to use for the rotation angle.
* {{PropertyData|Placement|Placement}}: specifies the position of the working plane proxy in the [[3D_view|3D view]]. See [[Placement|Placement]].
* {{PropertyData|Shape|Shape|Hidden}}: specifies the shape of the working plane proxy.


=== View ===
=== 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|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|Draft SelectPlane]]}} or by double-clicking on it.


{{TitleProperty|Base}}
==Scripting==


* {{PropertyView|Line Color|Color}}: specifies the color of all elements of the working plane proxy.
{{Emphasis|See also:}} [[Draft_API|Draft API]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].
* {{PropertyView|Line Width|Float}}: specifies the line width of the axes and arrow symbols.
* {{PropertyView|Restore State|Bool}}: specifies if the {{PropertyView|Visibility Map}} is restored when the [[Draft_SelectPlane|working plane]] is aligned with the working plane proxy.
* {{PropertyView|Restore View|Bool}}: specifies if the {{PropertyView|View Data}} is restored when the [[Draft_SelectPlane|working plane]] is aligned with the working plane proxy.
* {{PropertyView|Transparency|Percent}}: specifies the transparency of the face of the working plane proxy.
* {{PropertyView|View Data|FloatList}}: specifies the camera position and settings.
* {{PropertyView|Visibility Map|Map|Hidden}}: specifies the visibility state of objects.


{{TitleProperty|Draft}}
Working plane proxy objects can be used in [[Macros|macros]] and from the [[Python|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}}.


* {{PropertyView|Arrow Size|Length}}: specifies the size of the arrow symbols displayed at the tip of the three axes.
The size of the Plane Proxy can be changed by overwriting its {{incode|ViewObject.DisplaySize}} and {{incode|ViewObject.ArrowSize}} attributes, with units in millimeters.
* {{PropertyView|Display Size|Length}}: specifies the length and width of the working plane proxy.


<span id="Scripting"></span>
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.
==Guión==

<div class="mw-translate-fuzzy">
{{Emphasis|Ver también:}} [[Draft_API/es|Borrador API]] y [[FreeCAD_Scripting_Basics/es|FreeCAD Fundamentos de Guión]].
</div>

<div class="mw-translate-fuzzy">
Los objetos proxy del plano de trabajo se pueden utilizar en [[Macros/es|macros]] y desde la consola de [[Python/es|Python]] utilizando la siguiente función:
</div>

If the [[Draft_Workbench|Draft Workbench]] is active the FreeCAD application object has a {{incode|DraftWorkingPlane}} property which stores the current working plane. The {{Incode|Placement}} from the {{Incode|getPlacement}} method of the {{incode|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.


Ejemplo:
{{Code|code=
{{Code|code=
# This code only works if the Draft Workbench is active!
import FreeCAD, FreeCADGui, Draft


currentWP = FreeCAD.DraftWorkingPlane
import FreeCAD as App
import FreeCADGui as Gui
place = currentWP.getPlacement()
import Draft


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


workplane = App.DraftWorkingPlane
YAxis = FreeCAD.Vector(0, 1, 0)
place = workplane.getPlacement()
point2 = FreeCAD.Vector(3000, 0, 0)
place2 = FreeCAD.Placement(point2, FreeCAD.Rotation(YAxis, 90))


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


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


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


workplane.setFromPlacement(proxy2.Placement, rebase=True)
currentWP.alignToFace(WPProxy3.Shape)
FreeCADGui.Snapper.setGrid()
Gui.Snapper.setGrid()

doc.recompute()
}}
}}



<div class="mw-translate-fuzzy">
{{Docnav/es
{{Docnav/es
|[[Draft_AutoGroup/es|AutoGrupo]]
|[[Draft_AutoGroup/es|AutoGrupo]]
|[[Draft_AddConstruction/es|Añadir a grupo de construcción]]
|[[Draft_AddConstruction/es|Añadir a grupo de construcción]]
|[[Draft_Module/es|Borrador]]
|[[Draft_Workbench/es|Borrador]]
|IconL=Draft_AutoGroup.svg
|IconL=Draft_AutoGroup.svg
|IconR=Borrador_AddConstruction.svg
|IconR=Draft_AddConstruction.svg
|IconC=Workbench_Draft.svg
|IconC=Workbench_Draft.svg
}}
}}
</div>



{{Draft Tools navi{{#translation:}}}}
{{Draft Tools navi{{#translation:}}}}

Latest revision as of 20:01, 7 December 2023

Borrador PlanoTrabajoProxy

Ubicación en el Menú
Borrador → Utilidades → Crear proxy del plano trabajo
Entornos de trabajo
Borrador, Arquitectura
Atajo de teclado por defecto
Ninguno
Introducido en versión
-
Ver también
Borrador SeleccionarPlano

Descripción

Este comando colocará un objeto Proxy de Plano alineado con el actual Plano trabajo.

Tres proxies de planos de trabajo que muestran diferentes orientaciones y rellenos

Utilización

  1. Asegúrate de que el Plano trabajo está configurado como quieres.
  2. A continuación, vaya al menú Borrador → Utilidades → Crear proxy de plano trabajo.

Context menu

For a Draft WorkingPlaneProxy these additional options are available in the Tree view context menu:

  • Write camera position: updates the VistaView Data property of the working plane proxy with the current 3D view camera settings.
  • Write objects state: updates the VistaVisibility Map property of the working plane proxy with the current visibility state of objects in the document.

Notes

Notas

  • El plano de trabajo almacenado en el objeto Proxy puede restaurarse haciendo doble clic en el objeto en la vista de árbol, o seleccionando el objeto Proxy y utilizando el Borrador SeleccionarPlano..
  • La posición de la cámara se almacena en el objeto Proxy en el momento de su creación. Esta posición puede actualizarse en cualquier momento: haz zoom, panorámica y rotación de la vista como desees, luego haz clic con el botón derecho en el objeto Proxy en la vista de árbol y selecciona . Escribir posición de la cámara.
  • El estado de visibilidad de todos los objetos también se almacena en el objeto Proxy en el momento de su creación. Este estado puede actualizarse en cualquier momento: establezca la propiedad VistaVisibility de los objetos a true o false según desee, luego haga clic con el botón derecho en el objeto Proxy en la vista de árbol, y seleccione Escribir estado de los objetos.
  • Los proxies de plano pueden moverse y girarse como cualquier otro objeto para que definan el plano de trabajo deseado. Su apariencia visual también se puede cambiar en el Editor de propiedades.

Propiedades

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

Base

  • DatosPlacement (Placement): specifies the position of the working plane proxy in the 3D view. See Placement.
  • Datos (Hidden)Shape (Shape): specifies the shape of the working plane proxy.

View

Base

  • VistaLine Color (Color): specifies the color of all elements of the working plane proxy.
  • VistaLine Width (Float): specifies the line width of the axes and arrow symbols.
  • VistaRestore State (Bool): specifies if the VistaVisibility Map is restored when the working plane is aligned with the working plane proxy.
  • VistaRestore View (Bool): specifies if the VistaView Data is restored when the working plane is aligned with the working plane proxy.
  • VistaTransparency (Percent): specifies the transparency of the face of the working plane proxy.
  • VistaView Data (FloatList): specifies the camera position and settings.
  • Vista (Hidden)Visibility Map (Map): specifies the visibility state of objects.

Draft

  • VistaArrow Size (Length): specifies the size of the arrow symbols displayed at the tip of the three axes.
  • VistaDisplay Size (Length): specifies the length and width of the working plane proxy.

Guión

Los objetos proxy del plano de trabajo se pueden utilizar en macros y desde la consola de Python utilizando la siguiente función:

If the Draft Workbench is active the FreeCAD application object has a DraftWorkingPlane property which stores the current working plane. The Placement from the getPlacement method of the DraftWorkingPlane object can be used to create an aligned working plane proxy. The 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()