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