Salome HOME
Correct documentation bugs, adapt for 'Read The Docs' theme (bos #18858)
[modules/shaper.git] / src / SketchPlugin / doc / angleFeature.rst
1 .. |angle_constr.icon|    image:: images/angle_constr.png
2
3 Angle constraint
4 ================
5
6 Angle constraint fixes the angle between two lines.
7
8 | Angle between two lines is seen as an angle between two vectors.
9 | Each line is treated as a vector with start and end points equal to those of the line.
10
11 To create an Angle constraint in the active Sketch:
12
13 #. select in the Main Menu *Sketch - > Angle* item  or
14 #. click |angle_constr.icon| **Angle** button in Sketch toolbar:
15
16 Property panel:
17
18 .. image:: images/Angle_panel.png
19    :align: center
20
21 .. |angle_direct| image:: images/angle_direct.png
22 .. |angle_complement| image:: images/angle_complementary.png
23 .. |angle_backward| image:: images/angle_backward.png
24 .. |loc_left| image:: images/location_left.png
25 .. |loc_auto| image:: images/location_automatic.png
26 .. |loc_right| image:: images/location_right.png
27
28 Input fields:
29
30 - **Line 1** is the first line selected in the view;
31 - **Line 2** is the second line selected in the view;
32 - **Value** is an angle between the lines, can be modified to set the desirable value;
33 - **Angle type** is a type of angle measurement:
34    | |angle_direct| **Direct** is the least angle between two lines;
35    | |angle_complement| **Complementary** is 180°- Direct angle between two lines;
36    | |angle_backward| **Backward** is 360°- Direct angle between two lines.
37 - **Text location** is the position of the angle value label relatively to the angle line (in the view):
38    | |loc_left| **Left** inserts text to the left of the angle line;
39    | |loc_auto| **Automatic** inserts text it the middle of the angle line if it has enough length, otherwise - to the left;
40    | |loc_right| **Right** inserts text to the right of the angle line.
41
42 When both lines are selected, the angle value is displayed in the property panel and in the view.
43
44 When creating the constraint, after selection of two lines at the first time:
45
46 - drag the angle presentation in the view to the desired position and click once;
47 - set desirable angle value in the input field in the view and press **Enter** or just press **Enter** to keep the current angle
48
49 .. image:: images/Angle_field_view.png
50    :align: center
51
52 .. centered::
53    Angle input in the view
54
55 **TUI Commands**:
56
57 .. py:function:: Sketch_1.setAngle(Line1, Line2, Value)
58 .. py:function:: Sketch_1.setAngleComplementary(Line1, Line2, Value)
59 .. py:function:: Sketch_1.setAngleBackward(Line1, Line2, Value)
60
61     :param object: Line 1.
62     :param object: Line 2.
63     :param real: Value.
64     :return: Result object.
65
66 Result
67 """"""
68
69 Created Angle appears in the view.
70
71 .. image:: images/Angle_res.png
72            :align: center
73
74 .. centered::
75    Angle created
76
77 **See Also** a sample TUI Script of :ref:`tui_create_angle` operation.