Salome HOME
Cosmetics. Move XML files to the separate folder inside a corresponding project in VS.
[modules/shaper.git] / src / SketchPlugin / doc / rectangleFeature.rst
1 .. _create_sketch_rectangle:
2
3 Rectangle
4 =========
5
6 .. |rectangle.icon|    image:: images/Rectangle.png
7
8 Rectangle feature creates a rectangle by two opposite points in the current Sketch.
9
10 The result is represented in form of four Lines which compose a rectangle.
11 Two lines have Vertical constraint and two others have Horizontal constraint.
12
13 To add a new Rectangle to the Sketch:
14
15 #. select in the Main Menu *Sketch - > Rectangle* item  or
16 #. click |rectangle.icon| **Rectangle** button in Sketch toolbar:
17
18 The following property panel appears:
19
20 .. figure:: images/Rectangle_panel.png
21    :align: center
22
23    Rectangle
24
25 Click in the view once to set the first corner, then move the mouse and click a second time to set the opposite corner.
26 If an existing object is clicked, a constraint for the point will be created automatically.
27
28 Start and end points coordinates are displayed in the property panel.
29
30 **TUI Command**:
31
32 .. py:function:: Sketch_1.addRectangle(X1, Y1, X2, Y2)
33
34     :param real: X1 value.
35     :param real: Y1 value.
36     :param real: X2 value.
37     :param real: Y2 value.
38     :return: Result object.
39
40 Result
41 """"""
42
43 Created rectangle appears in the view.
44
45 .. figure:: images/Rectangle_res.png
46    :align: center
47
48    Rectangle created
49
50 **See Also** a sample TUI Script of :ref:`tui_create_rectangle` operation.