1 .. _featureTranslation:
6 **Translation** feature translates a selected shape.
8 To create a Translation in the active part:
10 #. select in the Main Menu *Part - > Translation* item or
11 #. click **Translation** button in the toolbar
13 .. image:: images/translation_vector_32x32.png
17 **Translation** button
19 The Vector of translation can be defined in three different ways:
21 .. image:: images/translation_vector_32x32.png
23 by by axis and distance
25 .. image:: images/translation_dxyz_32x32.png
29 .. image:: images/translation_2pt_32x32.png
33 Translation by axis and distance
34 --------------------------------
36 .. image:: images/Translation2.png
40 Translation by axis and distance property panel
44 - **Main objects** panel contains shapes to be translated. The shapes are selected in 3D OCC viewer or object browser;
45 - **Axis** defines a vector along which the object will be translated. The vector is an edge or axis selected in 3D OCC viewer or object browser;
46 - **Distance** defines the distance along the **Vector of translation**.
48 **TUI Command**: *model.addTranslation(Part_doc, [shape], axis, dist)*
50 **Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + axis in format *model.selection(TYPE, shape)*+ real (distance value).
55 The result of operation is a shifted initial shape.
57 .. image:: images/translation_XYZ.png
61 Translation by axis and distance
63 **See Also** a sample TUI Script of a :ref:`tui_translation_vector` operation.
68 .. image:: images/Translation1.png
72 Translation by vector property panel
76 - **Main objects** panel contains shapes to be translated. The shapes are selected in 3D OCC viewer or object browser;
77 - **DX**, **DY**, **DZ** define vector using coordinates along the axis.
79 **TUI Command**: *model.addTranslation(Part_1_doc, [shape], DX, DY, DZ)*
81 **Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + 3 real (coordinate values).
86 The result of operation is a shifted initial shape.
88 .. image:: images/translation_vector.png
94 **See Also** a sample TUI Script of :ref:`tui_translation_DXDYDZ` operation.
97 Translation by two points
98 -------------------------
100 .. image:: images/Translation3.png
104 Translation by two points property panel
108 - **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser;
109 - **Start point** defines start vector point as point or vertex selected in 3D OCC viewer or object browser;
110 - **End point** defines end vector point as point or vertex selected in 3D OCC viewer or object browser;
112 **TUI Command**: *model.addTranslation(Part_doc, [shape], point1, point2)*
114 **Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + 2 points in format *model.selection(TYPE, shape)*.
119 The result of operation is a shifted initial shape.
121 .. image:: images/translation_2points.png
125 Translation by two points
127 **See Also** a sample TUI Script of :ref:`tui_translation_2points` operation.