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