Salome HOME
Update documentation of arcs.
[modules/shaper.git] / src / SketchPlugin / doc / rectangleFeature.rst
1 .. _create_sketch_rectangle:
2 .. |rectangle.icon|    image:: images/rectangle.png
3
4 Rectangle
5 =========
6
7 Rectangle feature creates a rectangle by two opposite points in the current Sketch.
8
9 The result is represented in form of four Lines which compose a rectangle.
10 Two lines have Vertical constraint and two others have Horizontal constraint.
11
12 To add a new Rectangle to the Sketch:
13
14 #. select in the Main Menu *Sketch - > Rectangle* item  or
15 #. click |rectangle.icon| **Rectangle** button in Sketch toolbar:
16
17 The following property panel appears:
18
19 .. image:: images/Rectangle_panel.png
20   :align: center
21
22 .. centered::
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 .. image:: images/Rectangle_res.png
46            :align: center
47
48 .. centered::
49    Rectangle created
50
51 **See Also** a sample TUI Script of :ref:`tui_create_rectangle` operation.