Salome HOME
Corrections for the user's manual from the English language point of view
[modules/shaper.git] / src / SketchPlugin / doc / distanceFeature.rst
1
2 Distance constraint
3 ===================
4
5 Distance constraint fixes the distance between two objects.
6
7 The constraint can be defined between such objects as point, line, line or arc end point, center of circle or arc.
8
9 To create a Distance constraint in the active Sketch:
10
11 #. select in the Main Menu *Sketch - > Distance* item  or
12 #. click **Distance** button in Sketch toolbar:
13
14 .. image:: images/distance.png
15    :align: center
16
17 .. centered::
18    **Distance**  button
19
20 Property panel:
21
22 .. image:: images/Distance_panel.png
23    :align: center
24
25 Input fields:
26
27 - **First object** is the first object selected in the view;
28 - **Second object** is the second object selected in the view;
29 - **Value** is a distance between the objects, can be modified to set the desirable value;
30 - **Text location** is a position of the distance value label relating to extension line (in the view):
31    .. image:: images/location_left.png
32       :align: left
33    **Left** inserts text to the left of the distance extension line;
34
35    .. image:: images/location_automatic.png
36       :align: left
37    **Automatic** inserts text in the middle of the distance extension line if it has enough length, otherwise - to the left;
38
39    .. image:: images/location_right.png
40       :align: left
41    **Right** inserts text to the right of the distance extension line;
42 - **Keep orientation** fixes the relative position between selected objects.
43
44 When both objects are selected, the distance value is displayed in the property panel and in the view.
45
46 When creating a constraint after selection of two objects for the first time:
47
48 - drag the distance presentation in the view to the desired position and click once;
49 - set the desirable distance value in the input field and press **Enter** or just press **Enter** to keep the current distance.
50
51 .. image:: images/Distance_field_view.png
52    :align: center
53
54 .. centered::
55    Distance input in the view
56
57 **TUI Command**: *Sketch_1.setDistance(FirstObject, SecondObject, Value, KeepOrientation)*
58
59 **Arguments**:  2 objects + distance value + keep orientation flag
60
61 Result
62 """"""
63
64 Created Distance appears in the view.
65
66 .. image:: images/Distance_res.png
67            :align: center
68
69 .. centered::
70    Distance created
71
72 **See Also** a sample TUI Script of :ref:`tui_create_distance` operation.