1 .. _featureTranslation:
2 .. |translation_vector_32x32.icon| image:: images/translation_vector_32x32.png
8 **Translation** feature translates a selected shape.
10 To create a Translation in the active part:
12 #. select in the Main Menu *Part - > Translation* item or
13 #. click |translation_vector_32x32.icon| **Translation** button in the toolbar
15 The Vector of translation can be defined in three different ways:
17 .. image:: images/translation_vector_32x32.png
21 by by axis and distance
23 .. image:: images/translation_dxyz_32x32.png
29 .. image:: images/translation_2pt_32x32.png
35 --------------------------------------------------------------------------------
37 Translation by axis and distance
38 --------------------------------
40 .. image:: images/Translation2.png
44 Translation by axis and distance property panel
48 - **Main objects** panel contains shapes to be translated. The shapes are selected in 3D OCC viewer or object browser;
49 - **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;
50 - **Distance** defines the distance along the **Vector of translation**.
54 .. py:function:: model.addTranslation(Part_doc, [shape], axis, dist)
56 :param part: The current part object.
57 :param list: A list of shapes in format *model.selection(TYPE, shape)*.
58 :param object: axis in format *model.selection(TYPE, shape)*.
59 :param real: Distance value.
60 :return: Result object.
65 The result of operation is a shifted initial shape.
67 .. image:: images/translation_XYZ.png
71 Translation by axis and distance
73 **See Also** a sample TUI Script of a :ref:`tui_translation_vector` operation.
78 .. image:: images/Translation1.png
82 Translation by vector property panel
86 - **Main objects** panel contains shapes to be translated. The shapes are selected in 3D OCC viewer or object browser;
87 - **DX**, **DY**, **DZ** define vector using coordinates along the axis.
91 .. py:function:: model.addTranslation(Part_1_doc, [shape], DX, DY, DZ)
93 :param part: The current part object.
94 :param list: A list of shapes in format *model.selection(TYPE, shape)*.
95 :param real: dX value.
96 :param real: dY value.
97 :param real: dZ value.
98 :return: Result object.
103 The result of operation is a shifted initial shape.
105 .. image:: images/translation_vector.png
109 Translation by vector
111 **See Also** a sample TUI Script of :ref:`tui_translation_DXDYDZ` operation.
114 Translation by two points
115 -------------------------
117 .. image:: images/Translation3.png
121 Translation by two points property panel
125 - **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser;
126 - **Start point** defines start vector point as point or vertex selected in 3D OCC viewer or object browser;
127 - **End point** defines end vector point as point or vertex selected in 3D OCC viewer or object browser;
131 .. py:function:: model.addTranslation(Part_doc, [shape], point1, point2)
133 :param part: The current part object.
134 :param list: A list of shapes in format *model.selection(TYPE, shape)*.
135 :param object: A point in format *model.selection(TYPE, shape)*.
136 :param object: A point in format *model.selection(TYPE, shape)*.
137 :return: Result object.
142 The result of operation is a shifted initial shape.
144 .. image:: images/translation_2points.png
148 Translation by two points
150 **See Also** a sample TUI Script of :ref:`tui_translation_2points` operation.