To produce a Translation in the Main Menu select Operations - > Transformation - > Translation
This Operation makes a translation of an Object. To translate a shape you need to define the base shape and the coordinates of the vector of translation. Create a copy checkbox allows to keep the initial object, otherwise it will be removed.
The Result of all operations will be any GEOM_Object.
Firstly you can define an Object and the vector coordinates along the axes.
TUI Command: geompy.MakeTranslation(Shape, DX, DY, DZ), where Shape is a shape to be translated, DX, DY, DZ are components of translation vector.
Arguments: Name + one or several objects + 3 values (coordinates).
Advanced option: Set presentation parameters and subshapes from arguments.
Secondly you can define an Object and the start and the end points of the vector.
TUI Command: geompy.MakeTranslationTwoPoints(Object, Point1, Point2)
Arguments: Name + one or several objects + 2 vertices
Advanced option: Set presentation parameters and subshapes from arguments.
Finally you can define an Object and the vector. The object will be translated by the length of the vector.
TUI Command: geompy.MakeTranslationVector(Object, Vector)
Activate Distance checkbox and Distance field allow defining the custom distance of translation.
TUI Command for translation by vector and custom distance: geompy.MakeTranslationVectorDistance(Object, Vector, Distance)
Arguments: Name + one or several objects + 1 vector.
Advanced option: Set presentation parameters and subshapes from arguments.
Example:
The initial shape (grey)
The resulting shape (yellow)
Our TUI Scripts provide you with useful examples of the use of Transformation Operations.