13.6Placement Settings

Placement is how QW-Modeler (FreeCAD) specifies the location and attitude (orientation) of an object in space. See Placement chapter for more information.

Placement can be specified in multiple forms and manipulated via scripting, the Property Editor pane or the Placement dialogue (using Edit®Placement... command from main menu or  button near Placement property in the Property Editor).


     


The Placement dialogue can be invoked using Edit®Placement... command from main menu or  button near Placement property in the Property Editor. It is used to precisely rotate/translate objects. It is also used when we need to create a sketch on a "non standard" plane or change a sketch's orientation to a new plane.

The Translation section adjusts the object's location in space. The Center section adjusts the rotational axis to one that does not pass through the object's reference point. The Rotation section adjusts the rotational angle(s) and the method of specifying those angles.

The Apply incremental changes to object placement tick box is useful when translations/rotations are to be made relative the object's current position/attitude, rather than to the original position/attitude. Ticking this box resets the dialog's input fields to zero, but does not change the object's orientation or location. Subsequent entries do change the orientation/location, but are applied from the object's current position.



Using in Script


Placement
usage in python script: construction of a placement, empty or with the given arguments, or as a copy of the given placement:


pl = App.Placement()

pl = App.Placement(Placement)

pl = App.Placement(Matrix)

pl = App.Placement(Base, Rotation)

pl = App.Placement(Base, Rotation, Center)


Python API:

App.Placement(App.Vector(px, py, pz), App.Rotation(App.Vector(ax, ay, az), Angle))

 

App.Placement(App.Vector(px, py, pz), App.Rotation(App.Vector(ax, ay, az), Angle), App.Vector(CenterX, CenterY, CenterZ))


Example:

pl = App.Placement(App.Vector(18, 16, 31), App.Rotation(App.Vector(1, 0, 0), 90))

 

pl = App.Placement(App.Vector(18, 16, 31), App.Rotation(App.Vector(1, 0, 0), 90), App.Vector(10, 20, 30))