Salome HOME
47099261a7ec899c36e100a510134189cd3f7e88
[modules/shaper.git] / src / FeaturesPlugin / doc / translationFeature.rst
1
2 Translation
3 ===========
4
5 The feature **Translation** makes translation of a selected shape.
6
7 To create Translation in the active part:
8
9 #. select in the Main Menu *Part - > Translation* item  or
10 #. click **Translation** button in the toolbar
11
12 .. image:: images/translation_vector_32x32.png   
13    :align: center
14
15 .. centered::
16    **Translation** button 
17
18 The Vector of translation can be defined in three different ways:
19
20   .. image:: images/translation_vector_32x32.png    
21     :align: left
22   by by axis and distance
23
24   .. image:: images/translation_dxyz_32x32.png      
25     :align: left
26   by vector 
27
28   .. image:: images/translation_2pt_32x32.png    
29     :align: left
30   by two points
31
32 Translation by axis and distance
33 --------------------------------
34
35 .. image:: images/Translation2.png
36   :align: center
37
38 .. centered::
39   Translation by axis and distance property panel
40
41 Input fields:
42
43 - **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser;
44 - **Axis**  defines vector along which the object will be translated. Vector is edge, axis selected in 3D OCC viewer or object browser;
45 - **Distance** defines the distance along the **Vector of translation**.
46
47 **TUI Command**:  *model.addTranslation(Part_doc, [shape], axis, dist)*
48
49 **Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + axis in format *model.selection(TYPE, shape)*+ real (distance value).
50
51 Result
52 """"""
53
54 Result of operation is shifted initial shape.
55
56 .. image:: images/translation_XYZ.png
57    :align: center
58
59 .. centered::
60    Translation by axis and distance
61
62 **See Also** a sample TUI Script of a :ref:`tui_translation_vector` operation.
63
64 Translation by vector
65 ---------------------
66
67 .. image:: images/Translation1.png
68   :align: center
69
70 .. centered::
71   Translation by vector property panel
72
73 Input fields:
74
75 - **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser;
76 - **DX**, **DY**, **DZ**  define vector using coordinates along the axis.
77
78 **TUI Command**:  *model.addTranslation(Part_1_doc, [shape], DX, DY, DZ)*
79
80 **Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + 3 real (coordinate values).
81
82 Result
83 """"""
84
85 Result of operation is shifted initial shape.
86
87 .. image:: images/translation_vector.png
88    :align: center
89
90 .. centered::
91    Translation by vector
92
93 **See Also** a sample TUI Script of a :ref:`tui_translation_DXDYDZ` operation.
94
95
96 Translation by two points
97 -------------------------
98
99 .. image:: images/Translation3.png
100   :align: center
101
102 .. centered::
103   Translation by two points property panel
104
105 Input fields:
106
107 - **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser;
108 - **Start point**  defines start vector point as point or vertex selected in 3D OCC viewer or object browser;
109 - **End point**  defines end vector point as point or vertex selected in 3D OCC viewer or object browser;
110   
111 **TUI Command**:  *model.addTranslation(Part_doc, [shape], point1, point2)*
112
113 **Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + 2 points in format *model.selection(TYPE, shape)*.
114
115 Result
116 """"""
117
118 Result of operation is shifted initial shape.
119
120 .. image:: images/translation_2points.png
121    :align: center
122
123 .. centered::
124    Translation by two points
125
126 **See Also** a sample TUI Script of a :ref:`tui_translation_2points` operation.
127