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