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