Borrador PlanoTrabajoProxy

From FreeCAD Documentation
Revision as of 07:13, 5 July 2021 by Maker (talk | contribs) (Created page with "Los objetos proxy del plano de trabajo se pueden utilizar en macros y desde la consola de Python utilizando la siguiente función:")

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.

Este objeto proxy puede usarse como una cara para cambiar rápidamente el plano de trabajo usando la herramienta Borrador SeleccionarPlano. La posición de la cámara y la visibilidad de los objetos en la vista 3D pueden guardarse en el objeto proxy, y restaurarse en cualquier momento cuando se utilice la herramienta Borrador SeleccionarPlano.

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.

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

Data

  • DatosPlacement: specifies the position of the proxy object and the corresponding working plane.
    • DatosPosition: specifies the coordinates of the proxy object.
    • DatosAngle: specifies the rotation angle of the proxy object.
    • DatosAxis: specifies the axis to use for the rotation angle.

View

  • VistaDisplay 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.
  • VistaArrow Size: specifies the size of the arrows indicating the three axes of the plane proxy.
  • VistaRestore 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.
  • VistaRestore 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.

Guión

Ver también: Borrador API y FreeCAD Fundamentos de 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:

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.

Ejemplo:

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