Salome HOME
Cosmetics. Move XML files to the separate folder inside a corresponding project in VS.
[modules/shaper.git] / src / SketchPlugin / doc / rectangleFeature.rst
index c2afc18021a7ea2339ed1271237f3d648d73c65c..c2a9abef88c960c34d7d60cc7102d8da4a9d1061 100644 (file)
@@ -1,10 +1,50 @@
+.. _create_sketch_rectangle:
 
 Rectangle
 =========
 
+.. |rectangle.icon|    image:: images/Rectangle.png
 
-.. image:: images/Rectangle.png
-  :align: center
+Rectangle feature creates a rectangle by two opposite points in the current Sketch.
 
-.. centered::
-  Create a rectangle
+The result is represented in form of four Lines which compose a rectangle.
+Two lines have Vertical constraint and two others have Horizontal constraint.
+
+To add a new Rectangle to the Sketch:
+
+#. select in the Main Menu *Sketch - > Rectangle* item  or
+#. click |rectangle.icon| **Rectangle** button in Sketch toolbar:
+
+The following property panel appears:
+
+.. figure:: images/Rectangle_panel.png
+   :align: center
+
+   Rectangle
+
+Click in the view once to set the first corner, then move the mouse and click a second time to set the opposite corner.
+If an existing object is clicked, a constraint for the point will be created automatically.
+
+Start and end points coordinates are displayed in the property panel.
+
+**TUI Command**:
+
+.. py:function:: Sketch_1.addRectangle(X1, Y1, X2, Y2)
+
+    :param real: X1 value.
+    :param real: Y1 value.
+    :param real: X2 value.
+    :param real: Y2 value.
+    :return: Result object.
+
+Result
+""""""
+
+Created rectangle appears in the view.
+
+.. figure:: images/Rectangle_res.png
+   :align: center
+
+   Rectangle created
+
+**See Also** a sample TUI Script of :ref:`tui_create_rectangle` operation.