Salome HOME
38bef70b99389a4170cbba9fb4378b469d261530
[modules/shaper.git] / src / FeaturesPlugin / doc / rotationFeature.rst
1
2 Rotation
3 ========
4
5 The feature **Rotation** makes rotation of a selected shape.
6
7 To create Rotation in the active part:
8
9 #. select in the Main Menu *Part - > Rotation* item  or
10 #. click **Rotation** button in the toolbar
11
12 .. image:: images/rotation.png      
13    :align: center
14
15 .. centered::
16    **Rotation** button 
17
18 Two rotation algorithms are:
19
20   .. image:: images/rotation_axis_32x32.png      
21     :align: left
22   by axis and angle 
23
24   .. image:: images/rotation_3pt_32x32.png    
25     :align: left
26   by center and 2 points
27
28 Rotation by axis and angle
29 --------------------------
30
31 .. image:: images/Rotation1.png
32   :align: center
33
34 .. centered::
35   Rotation by axis and angle property panel
36
37 Input fields:
38
39 - **Main objects** panel contains shapes to be rotated. Shapes are selected in 3D OCC viewer or object browser;
40 - **Axis** defines the axis of rotation. Vector is edge, axis selected in 3D OCC viewer or object browser;
41 - **Angle** defines the angle by which the object is rotated. 
42
43 **TUI Command**:  *model.addRotation(Part_doc, [shape], axis, angle)*
44
45 **Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + axis in format *model.selection(TYPE, shape)*+ real (angle value).
46
47 Result
48 """"""
49
50 Result of operation is rotated initial shape.
51
52 .. image:: images/rotation_axis.png
53    :align: center
54
55 .. centered::
56    Rotation by axis and angle
57
58 **See Also** a sample TUI Script of a :ref:`tui_rotation_axis` operation.
59
60 Rotation by center and points
61 -----------------------------
62
63 .. image:: images/Rotation2.png
64   :align: center
65
66 .. centered::
67   Rotation by center and 2 points property panel
68
69 Input fields:
70
71 - **Main objects** panel contains shapes to be rotated. Shapes are selected in 3D OCC viewer or object browser;
72 - **Center point**, **Start point**, **End point** define 3 points or vertices selected in 3D OCC viewer or object browser. Rotation axis will pass through the **Center point** and will be will be orthogonal to a plane defined by three points. Rotation Angle is the angle between two vectors directed from the **Center point** to **Start point** and **End point**.  
73
74 **TUI Command**:  *model.addRotation(Part_doc, [shape], point1, point2, point3)*
75
76 **Arguments**: part + list of shapes in format *model.selection(TYPE, shape)* + 3 points in format *model.selection(TYPE, shape)*.
77
78 Result
79 """"""
80
81 Result of operation is rotated initial shape.
82
83 .. image:: images/rotation_3points.png
84    :align: center
85
86 .. centered::
87    Rotation by center and 2 points
88
89 **See Also** a sample TUI Script of a :ref:`tui_rotation_3points` operation.