Placement API: Difference between revisions
(Marked this version for translation) |
((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) |
||
Line 2: | Line 2: | ||
<translate> |
<translate> |
||
<!--T:5--> |
<!--T:5--> |
||
{{VeryImportantMessage|( |
{{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]].}} |
||
<!--T:1--> |
<!--T:1--> |
Revision as of 00:35, 2 October 2019
(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.
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.