addGraphicTransformation

Syntax

<Path>.addGraphicTransformation(Position:length[3], RotationAngle:real, RotationAxis:real[3], RotationCenter:length[3], Scale:real/real[3])

The method addGraphicTransformation adds an additional transformation to an existing transformation of the designated graphic of the object designated by <Path>.

Note:

The method deactivates graphic inheritance.

Note:

You cannot assign the method when the graphic is an automatically generated graphic group or when the graphic is located in an automatically generated graphic group.

Let’s suppose that a graphic is translated by the coordinates (3, 0, 0) from its origin and its basic orientation, and rotated by 30° around its y-axis.

Applying the method addGraphicTransformation to this graphic with a translation of (2, 0, 0) and a uniform scaling factor of 2 results in a graphic translation which first translates it by the coordinates (3, 0, 0), then rotates it by 30° around the y-axis, then translates it by (2, 0, 0), and finally scales the resulting translation by a factor of 2 in all directions. Note the sequence is important. It is, for example, not possible to combine the translations into one.

Parameters

  • The parameter Position is an array of data type length which sets the position of the graphic.

  • The parameter RotationAngle of data type real sets its rotation angle.

  • The parameter RotationAxis is an array of data type real which sets the rotation axis of the graphic.

  • The parameter RotationCenter is an array of data type length which sets the rotation center of the graphic.

  • The parameter Scale sets the scale of the graphic. You can either specify a single parameter of data type real, which sets a uniform scaling, or an array of data type real with three values, which set the scaling factors along the X-axis, the Y-axis, and the Z-axis.

Example

MyStation.getGraphic("default", [1,4]).addGraphicTransformation([3,2,1], 30, [0,0,-1], [2,0,0], 2) 
MyStation.getGraphic("deco", [1,4]).addGraphicTransformation([3,2,1], 30, [0,0,-1], [2,0,0], 2)

Related Topics

Tab Transformation

_3D.getGraphic