1 .. _featureTranslation:
2 .. |translation_vector_32x32.icon| image:: images/translation_vector_32x32.png
7 **Translation** feature translates a selected shape.
9 To create a Translation in the active part:
11 #. select in the Main Menu *Part - > Translation* item or
12 #. click |translation_vector_32x32.icon| **Translation** button in the toolbar
14 The Vector of translation can be defined in three different ways:
16 .. image:: images/translation_vector_32x32.png
18 by by axis and distance
20 .. image:: images/translation_dxyz_32x32.png
24 .. image:: images/translation_2pt_32x32.png
28 Translation by axis and distance
29 --------------------------------
31 .. image:: images/Translation2.png
35 Translation by axis and distance property panel
39 - **Main objects** panel contains shapes to be translated. The shapes are selected in 3D OCC viewer or object browser;
40 - **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;
41 - **Distance** defines the distance along the **Vector of translation**.
45 .. py:function:: model.addTranslation(Part_doc, [shape], axis, dist)
47 :param part: The current part object.
48 :param list: A list of shapes in format *model.selection(TYPE, shape)*.
49 :param object: axis in format *model.selection(TYPE, shape)*.
50 :param real: Distance value.
51 :return: Result object.
56 The result of operation is a shifted initial shape.
58 .. image:: images/translation_XYZ.png
62 Translation by axis and distance
64 **See Also** a sample TUI Script of a :ref:`tui_translation_vector` operation.
69 .. image:: images/Translation1.png
73 Translation by vector property panel
77 - **Main objects** panel contains shapes to be translated. The shapes are selected in 3D OCC viewer or object browser;
78 - **DX**, **DY**, **DZ** define vector using coordinates along the axis.
82 .. py:function:: model.addTranslation(Part_1_doc, [shape], DX, DY, DZ)
84 :param part: The current part object.
85 :param list: A list of shapes in format *model.selection(TYPE, shape)*.
86 :param real: dX value.
87 :param real: dY value.
88 :param real: dZ value.
89 :return: Result object.
94 The result of operation is a shifted initial shape.
96 .. image:: images/translation_vector.png
100 Translation by vector
102 **See Also** a sample TUI Script of :ref:`tui_translation_DXDYDZ` operation.
105 Translation by two points
106 -------------------------
108 .. image:: images/Translation3.png
112 Translation by two points property panel
116 - **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser;
117 - **Start point** defines start vector point as point or vertex selected in 3D OCC viewer or object browser;
118 - **End point** defines end vector point as point or vertex selected in 3D OCC viewer or object browser;
122 .. py:function:: model.addTranslation(Part_doc, [shape], point1, point2)
124 :param part: The current part object.
125 :param list: A list of shapes in format *model.selection(TYPE, shape)*.
126 :param object: A point in format *model.selection(TYPE, shape)*.
127 :param object: A point in format *model.selection(TYPE, shape)*.
128 :return: Result object.
133 The result of operation is a shifted initial shape.
135 .. image:: images/translation_2points.png
139 Translation by two points
141 **See Also** a sample TUI Script of :ref:`tui_translation_2points` operation.