]> SALOME platform Git repositories - modules/shaper.git/blob - src/FeaturesPlugin/doc/rotationFeature.rst
Salome HOME
Copyright update 2022
[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 .. figure:: images/rotation_axis_32x32.png      
17    :align: left
18    :height: 24px
19
20 by axis and angle 
21
22 .. figure:: 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 .. figure:: images/Rotation1.png
34    :align: center
35
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; :ref:`transformation_subshapes`
41 - **Axis** defines the axis of rotation. The vector is an edge or axis selected in 3D OCC viewer or object browser;
42 - **Angle** defines the angle by which the object is rotated. 
43
44 **TUI Command**:
45
46 .. py:function:: model.addRotation(Part_doc, [shape], axis, angle)
47
48     :param part: The current part object.
49     :param list: A list of shapes in format *model.selection(TYPE, shape)*.
50     :param object: An axis in format *model.selection(TYPE, shape)*.
51     :param real: An angle.
52     :return: Rotated object.
53
54 Result
55 """"""
56
57 Result of operation is a rotated initial shape.
58
59 .. figure:: images/rotation_axis.png
60    :align: center
61
62    Rotation by axis and angle
63
64 **See Also** a sample TUI Script of :ref:`tui_rotation_axis` operation.
65
66 Rotation by center and points
67 -----------------------------
68
69 .. figure:: images/Rotation2.png
70    :align: center
71
72    Rotation by center and 2 points property panel
73
74 Input fields:
75
76 - **Main objects** panel contains shapes to be rotated. Shapes are selected in 3D OCC viewer or object browser; :ref:`transformation_subshapes`
77 - **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**.  
78
79 **TUI Command**:
80
81 .. py:function:: model.addRotation(Part_doc, [shape], point1, point2, point3)*
82
83     :param part: The current part object.
84     :param list: A list of shapes in format *model.selection(TYPE, shape)*.
85     :param object: An axis in format *model.selection(TYPE, shape)*.
86     :param object: Center vertex.
87     :param object: Start vertex.
88     :param object: End vertex.
89     :return: Rotated object.
90
91 Result
92 """"""
93
94 Result of operation is a rotated initial shape.
95
96 .. figure:: images/rotation_3points.png
97    :align: center
98
99    Rotation by center and 2 points
100
101 **See Also** a sample TUI Script of :ref:`tui_rotation_3points` operation.