12.6Placement
Placement is how QW-Modeler and FreeCAD specifies the location and attitude (orientation) of an object in space. Each geometrical object and also QW-Objects such as ports, boxes etc. (instead of media objects) have the placement property. See Placement Settings chapter for more information about setting placement.
There are three forms of placement:
Angle, Axis and Position
Position and Yaw, Pitch and Roll
Matrix
Angle, Axis and 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 around an axis.
Placement = [Angle, Axis, Position]
Angle is a scalar indicating the amount of rotation of the object around Axis. Entered as degrees, but stored internally as radians.
Axis = (ax, ay, az) is a vector describing an axis of rotation:
Axis = (1, 0, 0) Þ X axis
Axis = (0, 1, 0) Þ Y axis
Axis = (0, 0, 1) Þ Z axis
Axis = (0.71, 0.71, 0) Þ y=x line
Position = (px, py, pz) is a vector describing the point from which the object's geometry will be calculated (in effect, a "local origin" for the object). Note that in scripts, Placement.Base is used to denote the Position component of a placement. The Property Editor calls this value "Position" and the Placement dialog calls it "Translation".
Position and Yaw, Pitch and 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, which are referred to as Euler angles or Tait-Bryan angles. Yaw, Pitch and Roll are common aviation terms for a body's orientation (or attitude).
Placement = [Position, Yaw-Pitch-Roll]
Position = (x, y, z) is a vector describing the point from which the object's geometry will be calculated (in effect, a "local origin" for 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.
Yaw is the rotation about the Z axis, that is to say a rotation from left to right. The yaw angle is the Psi y.
Pitch is rotation about the Y axis, that is to say nose-up and nose-down. The Pitch angle is the Phi j.
Roll is rotation about the X axis, that is to say wing up and down. The Roll angle is the Theta q.
Matrix
The third form of Placement describes the object's position and orientation with a 4x4 affine transformation matrix.
Placement = Matrix