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