Salome HOME
Correct documentation bugs, adapt for 'Read The Docs' theme (bos #18858)
[modules/shaper.git] / src / SketchPlugin / doc / lengthFeature.rst
1 .. _sketchLength:
2 .. |length.icon|    image:: images/Length.png
3
4 Length constraint
5 =================
6
7 Length constraint fixes the length of lines, such as standalone line or rectangle side.
8
9 To create a Length constraint in the active Sketch:
10
11 #. select in the Main Menu *Sketch - > Length* item  or
12 #. click |length.icon| **Length** button in Sketch toolbar:
13
14 Property panel:
15
16 .. image:: images/Length_panel.png
17    :align: center
18
19 .. |location_left| image:: images/location_left.png
20 .. |location_auto| image:: images/location_automatic.png
21 .. |location_right| image:: images/location_right.png
22
23 Input fields:
24
25 - **Line** is the the line object selected in the view;
26 - **Value** is a line length, can be modified to set the desirable value;
27 - **Text location** is a position of the length value label relating to extension line (in the view):
28    | |location_left| **Left** inserts text to the left of the length extension line;
29    | |location_auto| **Automatic** inserts text in the middle of the length extension line if it has enough length, otherwise - to the left;
30    | |location_right| **Right** inserts text to the right of the length extension line.
31
32 When the line is selected, the length value is displayed in the property panel and in the view.
33
34 When creating the constraint, after selection of a line for the first time:
35
36 - drag the length presentation in the view to the desired position and click once;
37 - set desirable length value in the input field in the view and press **Enter** or just press **Enter** to keep the current length.
38
39 .. image:: images/Length_field_view.png
40    :align: center
41
42 .. centered::
43    Length input in the view
44
45 **TUI Command**:
46
47 .. py:function:: Sketch_1.setLength(LineObject, Value)
48
49     :param object: A line.
50     :param real: Length value.
51     :return: Result object.
52
53 Result
54 """"""
55
56 Created Length appears in the view.
57
58 .. image:: images/Length_res.png
59            :align: center
60
61 .. centered::
62    Length created
63
64 **See Also** a sample TUI Script of :ref:`tui_create_length` operation.