<html><head><title>Placement API/cs</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link type='text/css' href='wiki.css' rel='stylesheet'></head><body><h1>Placement API/cs</h1></div> <div id="mw-content-text" lang="cs" dir="ltr" class="mw-content-ltr"><hr/><div class="mw-parser-output"><p>In FreeCAD, Placement defines an object's position and rotation. The Placement concept is explained in detail here: <a href="Placement.html" title="Placement">Placement</a>. </p><p>Example of setting a document object's Placement: </p> <pre>myObj = FreeCAD.ActiveDocument.ActiveObject pl = FreeCAD.Placement() pl.move(FreeCAD.Vector(2,0,0)) myObj.Placement = pl </pre> <p><br /> </p> <div class="api"> <div class="function"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Class.png" class="image"><img alt="Class.png" src="Class.png" width="16" height="16" /></a> <big><b>Placement</b></big> ( <i> ) or (Placement) or (Matrix) or (Base, Rotation) or (Base,Rotation,Center) or (Base,Axis,Angle</i> )</div> <div class="description"> <p><small><b>Description</b>:</small> Constructs a placement, empty or with the given arguments, or as a copy of the given placement. </p> </div> </div> <p><br /> </p> <div class="api"> <div class="function"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Property.png" class="image"><img alt="Property.png" src="Property.png" width="16" height="16" /></a> <big><b>Base</b></big></div> <div class="description"> <p><small><b>Returns</b>:</small> a vector representing the Placement's position. </p> </div> </div> <p><br /> </p> <div class="api"> <div class="function"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Property.png" class="image"><img alt="Property.png" src="Property.png" width="16" height="16" /></a> <big><b>Rotation</b></big></div> <div class="description"> <p><small><b>Returns</b>:</small> a quaternion representing the Placement's rotation. </p> </div> </div> <p><br /> </p> <div class="api"> <div class="function"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Method.png" class="image"><img alt="Method.png" src="Method.png" width="16" height="16" /></a> <big><b>inverse</b></big> ( <i> </i> )</div> <div class="description"> <p><small><b>Description</b>:</small> computes the inverse placement </p><p><small><b>Returns</b>:</small> a placement. </p> </div> </div> <p><br /> </p> <div class="api"> <div class="function"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Method.png" class="image"><img alt="Method.png" src="Method.png" width="16" height="16" /></a> <big><b>move</b></big> ( <i>Vector</i> )</div> <div class="description"> <p><small><b>Description</b>:</small> moves the Placement along the given vector </p><p><small><b>Returns</b>:</small> nothing </p> </div> </div> <p><br /> </p> <div class="api"> <div class="function"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Method.png" class="image"><img alt="Method.png" src="Method.png" width="16" height="16" /></a> <big><b>multVec</b></big> ( <i>Vector</i> )</div> <div class="description"> <p><small><b>Description</b>:</small> applies the Placement to the given vector </p><p><small><b>Returns</b>:</small> the resulting vector. </p> </div> </div> <p><br /> </p> <div class="api"> <div class="function"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Method.png" class="image"><img alt="Method.png" src="Method.png" width="16" height="16" /></a> <big><b>multiply</b></big> ( <i>Placement</i> )</div> <div class="description"> <p><small><b>Description</b>:</small> multiplies this placement with another one </p><p><small><b>Returns</b>:</small> the resulting placement. </p> </div> </div> <p><br /> </p> <div class="api"> <div class="function"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Method.png" class="image"><img alt="Method.png" src="Method.png" width="16" height="16" /></a> <big><b>toMatrix</b></big> ( <i> </i> )</div> <div class="description"> <p><small><b>Description</b>:</small> </p><p><small><b>Returns</b>:</small> a matrix representing the Placement's transformation. </p> </div> </div> <div style="clear:both"></div> </div> </div> </div><div class="printfooter"> Online version: "<a dir="ltr" href="https://www.freecadweb.org/wiki/index.php?title=Placement_API/cs&oldid=174201">http://www.freecadweb.org/wiki/index.php?title=Placement_API/cs&oldid=174201</a>"</div> <div id="catlinks" class="catlinks" data-mw="interface"></div><div class="visualClear"></div> </div> </div> <div id="mw-navigation"> <h2>Navigation menu</h2> </body></html>