Salome HOME
Correct documentation bugs, adapt for 'Read The Docs' theme (bos #18858)
[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    :height: 24px
19
20 by axis and angle 
21
22 .. image:: images/rotation_3pt_32x32.png    
23    :align: left
24    :height: 24px
25
26 by center and 2 points
27
28 --------------------------------------------------------------------------------
29
30 Rotation by axis and angle
31 --------------------------
32
33 .. image:: images/Rotation1.png
34   :align: center
35
36 .. centered::
37   Rotation by axis and angle property panel
38
39 Input fields:
40
41 - **Main objects** panel contains shapes to be rotated. Shapes are selected in 3D OCC viewer or object browser;
42 - **Axis** defines the axis of rotation. The vector is an edge or axis selected in 3D OCC viewer or object browser;
43 - **Angle** defines the angle by which the object is rotated. 
44
45 **TUI Command**:
46
47 .. py:function:: model.addRotation(Part_doc, [shape], axis, angle)
48
49     :param part: The current part object.
50     :param list: A list of shapes in format *model.selection(TYPE, shape)*.
51     :param object: An axis in format *model.selection(TYPE, shape)*.
52     :param real: An angle.
53     :return: Rotated object.
54
55 Result
56 """"""
57
58 Result of operation is a rotated initial shape.
59
60 .. image:: images/rotation_axis.png
61    :align: center
62
63 .. centered::
64    Rotation by axis and angle
65
66 **See Also** a sample TUI Script of :ref:`tui_rotation_axis` operation.
67
68 Rotation by center and points
69 -----------------------------
70
71 .. image:: images/Rotation2.png
72   :align: center
73
74 .. centered::
75   Rotation by center and 2 points property panel
76
77 Input fields:
78
79 - **Main objects** panel contains shapes to be rotated. Shapes are selected in 3D OCC viewer or object browser;
80 - **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**.  
81
82 **TUI Command**:
83
84 .. py:function:: model.addRotation(Part_doc, [shape], point1, point2, point3)*
85
86     :param part: The current part object.
87     :param list: A list of shapes in format *model.selection(TYPE, shape)*.
88     :param object: An axis in format *model.selection(TYPE, shape)*.
89     :param object: Center vertex.
90     :param object: Start vertex.
91     :param object: End vertex.
92     :return: Rotated object.
93
94 Result
95 """"""
96
97 Result of operation is a rotated initial shape.
98
99 .. image:: images/rotation_3points.png
100    :align: center
101
102 .. centered::
103    Rotation by center and 2 points
104
105 **See Also** a sample TUI Script of :ref:`tui_rotation_3points` operation.