Placement API/es: Difference between revisions
No edit summary |
(Updating to match new version of source page) |
||
Line 1: | Line 1: | ||
In FreeCAD, Placement defines an object's position and rotation. The Placement concept is explained in detail here: [[Placement|Placement]]. |
|||
Una ubicación en FreeCAD es un objeto definiendo una posición y rotación. 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: |
|||
myObj = FreeCAD.ActiveDocument.ActiveObject |
myObj = FreeCAD.ActiveDocument.ActiveObject |
||
pl = FreeCAD.Placement() |
pl = FreeCAD.Placement() |
||
Line 6: | Line 7: | ||
myObj.Placement = pl |
myObj.Placement = pl |
||
⚫ | |||
⚫ | |||
{{APIProperty/es|Rotation|Una cuaterna representando la rotación de la Ubicación.}} |
|||
⚫ | |||
⚫ | |||
⚫ | |||
{{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.}} |
|||
⚫ | |||
{{languages/es | {{en|Placement_API}} }} |
|||
⚫ | |||
{{APIProperty|Rotation|a quaternion representing the Placement's rotation.}} |
|||
⚫ | |||
⚫ | |||
⚫ | |||
{{APIFunction|multiply|Placement|multiplies this placement with another one|the resulting placement.}} |
|||
{{APIFunction|toMatrix| | |a matrix representing the Placement's transformation.}} |
|||
[[Category:API |
[[Category:API]] |
||
{{clear}} |
|||
<languages/> |
Revision as of 22:51, 15 November 2014
In FreeCAD, Placement defines an object's position and rotation. The Placement concept is explained in detail here: Placement.
Example of setting a document object's Placement:
myObj = FreeCAD.ActiveDocument.ActiveObject pl = FreeCAD.Placement() pl.move(FreeCAD.Vector(2,0,0)) myObj.Placement = pl
Placement( ) or (Placement) or (Matrix) or (Base, Rotation) or (Base,Rotation,Center) or (Base,Axis,Angle)
Description: Constructs a placement, empty or with the given arguments, or as a copy of the given placement.
Description: applies the Placement to the given vector
Returns: the resulting vector.
Description: multiplies this placement with another one
Returns: the resulting placement.