Placement API/es: Difference between revisions

From FreeCAD Documentation
(Created page with "Una ubicación en FreeCAD es un objeto definiendo una posición y rotación. The Placement concept is explained in detail here: Placement.")
No edit summary
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
{{VeryImportantMessage|(October 2019) Do not edit this page. The information is incomplete and outdated. For the latest API, see the [https://www.freecadweb.org/api autogenerated API documentation], or generate the documentation yourself, see [[Source documentation|Source documentation]].}}

Una ubicación en FreeCAD es un objeto definiendo una posición y rotación.
Una ubicación en FreeCAD es un objeto definiendo una posición y rotación.


The Placement concept is explained in detail here: [[Placement/es|Placement]].
The Placement concept is explained in detail here: [[Placement/es|Placement]].


Una ubicación se puede añadir a un objeto de FreeCAD, para orientarlo/posicionarlo en el documento. Por ejemplo:
Example of setting a document object's Placement:
{{Code|code=
myObj = FreeCAD.ActiveDocument.ActiveObject
pl = FreeCAD.Placement()
myObj = FreeCAD.ActiveDocument.ActiveObject
pl.move(FreeCAD.Vector(2,0,0))
pl = FreeCAD.Placement()
pl.move(FreeCAD.Vector(2,0,0))
myObj.Placement = pl
myObj.Placement = pl
}}


{{APIClass|Placement| ) o (Placement) o (Matrix) o (Base, Rotation) o (Base,Rotation,Center) o (Base,Axis,Angle|Construye una ubicación, vacía o con los argumentos dados, o como una copia de la ubicación dada.}}
{{APIProperty/es|Base|Un vector representando la posición de la Ubicación.}}
{{APIProperty/es|Rotation|Una cuaterna representando la rotación de la Ubicación.}}
{{APIFunction/es|inverse| |Calcula la ubicación inversa|Una ubicación.}}
{{APIFunction/es|move|Vector|Mueve la Ubicación a lo largo del vector dado|Nada}}
{{APIFunction/es|multVec|Vector|Aplica la ubicación al vector dado|El vector resultante.}}
{{APIFunction/es|multiply|Placement|Multiplica esta Ubicación con otra|La Ubicación resultante.}}
{{APIFunction/es|toMatrix| | |Una matriz representando la transformación de la Ubicación.}}


{{Userdocnavi{{#translation:}}}}
{{APIClass|Placement| ) or (Placement) or (Matrix) or (Base, Rotation) or (Base,Rotation,Center) or (Base,Axis,Angle|Constructs a placement, empty or with the given arguments, or as a copy of the given placement.}}
[[Category:API{{#translation:}}]]
{{APIProperty|Base|a vector representing the Placement's position.}}
[[Category:Poweruser Documentation{{#translation:}}]]
{{APIProperty|Rotation|a quaternion representing the Placement's rotation.}}
{{APIFunction|inverse| |computes the inverse placement|a placement.}}
{{APIFunction|move|Vector|moves the Placement along the given vector|nothing}}
{{APIFunction|multVec|Vector|applies the Placement to the given vector|the resulting vector.}}
{{APIFunction|multiply|Placement|multiplies this placement with another one|the resulting placement.}}
{{APIFunction|toMatrix| | |a matrix representing the Placement's transformation.}}

[[Category:API]]

{{clear}}
{{clear}}
<languages/>

Latest revision as of 21:15, 5 November 2021

(October 2019) Do not edit this page. The information is incomplete and outdated. For the latest API, see the autogenerated API documentation, or generate the documentation yourself, see Source documentation.

Una ubicación en FreeCAD es un objeto definiendo una posición y rotación.

The Placement concept is explained in detail here: Placement.

Una ubicación se puede añadir a un objeto de FreeCAD, para orientarlo/posicionarlo en el documento. Por ejemplo:

myObj = FreeCAD.ActiveDocument.ActiveObject
pl = FreeCAD.Placement()
pl.move(FreeCAD.Vector(2,0,0))
myObj.Placement = pl
Placement( ) o (Placement) o (Matrix) o (Base, Rotation) o (Base,Rotation,Center) o (Base,Axis,Angle)

Description: Construye una ubicación, vacía o con los argumentos dados, o como una copia de la ubicación dada.

Base

Devuelve: Un vector representando la posición de la Ubicación.


Rotation

Devuelve: Una cuaterna representando la rotación de la Ubicación.


inverse ( )

Descripción: Calcula la ubicación inversa

Devuelve: Una ubicación.


move ( Vector )

Descripción: Mueve la Ubicación a lo largo del vector dado

Devuelve: Nada


multVec ( Vector )

Descripción: Aplica la ubicación al vector dado

Devuelve: El vector resultante.


multiply ( Placement )

Descripción: Multiplica esta Ubicación con otra

Devuelve: La Ubicación resultante.


toMatrix ( )

Descripción:

Devuelve: Una matriz representando la transformación de la Ubicación.