Placement

Overview
Placement is how FreeCAD specifies the location and attitude (orientation) of an object in space. Placement can be specified in multiple forms and manipulated via scripting, the Properties pane or the Placement dialog (Edit menu).

Accessing the Placement Attribute
An object's Placement attributes can be accessed and modified in 3 ways:







Angle, Axis and Position
Placement = [Angle, Axis, Position]

The first form of Placement fixes an object's location in space with a Position, and describes it's orientation as a single rotation about an axis. Angle = r is a scalar indicating the amount of rotation of the object about Axis. Entered as degrees, but stored internally as radians.

Axis = (ax,ay,az) is a unit vector describing an axis of rotation (See Note about axis of rotation). Examples are: (1,0,0)      ==> about X axis (0,1,0)      ==> about Y axis (0,0,1)      ==> about Z axis (0.71,0.71,0) ==> about the line y=x Position = (x,y,z) is a Vector describing the world coordinates of the reference point of the object.

Position and Yaw, Pitch and Roll
Placement = [Position, Yaw-Pitch-Roll]

The second form of Placement fixes an object's location in space with a Position (as in the first form), but describes it's orientation using Yaw, Pitch and Roll angles (Yaw, Pitch, Roll). These angles are sometimes referred to as Euler angles or Tait-Bryan angles (Euler angles). Yaw, Pitch and Roll are common aviation terms for a body's orientation (or attitude).

Position = (x,y,z) is a Vector describing the world coordinates of the reference point of the object.

Yaw-Pitch-Roll = (y,p,r) is a tuple that specifies the attitude of the object. Values for y,p,r  specify degrees of rotation about each of the z,y,x axis (see note).

Matrix
Placement = Matrix

The third form of Placement describes the object's position and orientation with a 4x4 affine transformation matrix (Affine Transformation).

Matrix =

((r11,r12,r13,t1),   (r21,r22,r23,t2),    (r31,r32,r33,t3),    (0,0,0,1)), with rij specifying rotation and ti specifying translation.

The Placement Dialog
The Placement Dialog is invoked from the Edit menu. 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 objects 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.

Examples
Rotations about a single axis:

Before Rotation (top view)

After Rotation about Z (top view)

After Rotation about y=x (right view)

Rotation with offset centre point:

Before Rotation (top view)

After Rotation about Z (top view)

Rotation using Euler angles:

Before Rotation

After Rotation

Issues

 * As of version 0.13, update of Placement properties in the Data tab has been disabled for objects created with PartDesign. Placement functionality will eventually be handled in the Assembly workbench.

More

 * This tutorial: Aeroplane covers the mechanics of changing an object's Placement extensively.
 * A step-by-step explanation of the Placement Dialog can be found here Tasks_Placement.