Salome HOME
Documentation: use 'figure' instead of 'image'; improve caption layout; fix warnings.
[modules/shaper.git] / src / SketchPlugin / doc / SketchPlugin.rst
index 627ca479a579a2cbff2b742226fa3d06b2be60db..af4cefe57be960111ca2cb96c8aedc0e0376e77b 100644 (file)
@@ -5,6 +5,8 @@
 Sketch plug-in
 ================
 
+.. |SketchButton.icon|    image:: images/SketchButton.png
+
 Sketch plug-in includes features for creation of 2D shapes.
 
 The sketch creation takes the following steps:
@@ -19,17 +21,11 @@ Sketch can be created in the active part or in a partset (if there is no active
 To create a Sketch:
 
 #. select in the Main Menu *Sketch - > Sketch* item  or
-#. click **Sketch** button in Sketch toolbar:
-
-.. image:: images/SketchButton.png
-   :align: center
-
-.. centered::
-   **Sketch**  button
+#. click |SketchButton.icon| **Sketch** button in Sketch toolbar:
 
 First define a plane for the sketch:
 
-.. image:: images/PlaneDefinition.png
+.. figure:: images/PlaneDefinition.png
    :align: center
 
 - specify plane size (equal to 25 in the example above);
@@ -37,22 +33,25 @@ First define a plane for the sketch:
 
 Note that coordinate planes will be suggested for selection if no convenient objects for plane selection are displayed in the viewer:
 
-.. image:: images/CoordinatePlanes.png
+.. figure:: images/CoordinatePlanes.png
    :align: center
 
 After the plane for sketch is selected, the following property panel will be opened:
 
-.. image:: images/SketchPanel.png
+.. figure:: images/SketchPanel.png
    :align: center
 
-.. centered::
-  Sketch general panel
+   Sketch general panel
 
 - **Reversed** check box - allows reversing the sketch plane normal;
 - **Set plane view** button - switches the viewer to the top view for the sketch plane;
 - **Show geometrical constraints** check box - displays/hides geometrical constraints:
 - **Show dimensional constraints** check box - displays/hides dimensional constraints; 
 - **Show existing expressions** check box - displays/hides expressions.
+- **Show free points** check box - highlights free points in the current sketch if it is checked.
+- **Automatic constraints** - automatically create horizontal or vertical constraints if angle between created line and horizontal or vertical less then angular tolerance (defined in preferences).
+- **Change sketch plane** button - allows to change working plane of the current sketch.
+- **Show remaining DoFs** button - highlights all sketch edges which are not fully constrained.
 
 Now it is possible to:
 
@@ -68,9 +67,13 @@ The Result of operation will be a COMPOUND. In the object tree, Result node is l
 
 The Name is assigned automatically: **Sketch_1**, **Sketch_2**, ... both for Feature and Result.
 
-**TUI Command**:  *Sketch_1 = model.addSketch(PartOrPartSet, plane)*
+**TUI Command**:
 
-**Arguments**:    Part or PartSet + plane.
+.. py:function:: model.addSketch(PartOrPartSet, plane)
+
+    :param part: The current part object.
+    :param object: A plane.
+    :return: Result object.
 
 .. _sketch_objects:
 
@@ -87,6 +90,9 @@ The plug-in includes the following features for creation of 2D objects:
    rectangleFeature.rst
    circleFeature.rst
    arcFeature.rst
+   ellipseFeature.rst
+   arcEllipseFeature.rst
+   bsplineFeature.rst
 
 .. _sketch_constraints:
 
@@ -99,19 +105,17 @@ The goal of constraints creation is to fix sketch geometry, i.e. set degrees of
 
 If all degrees of freedom are eliminated, the sketch is fixed and displayed with green color.
 
-.. image:: images/Sketch_fixed.png
+.. figure:: images/Sketch_fixed.png
    :align: center
 
-.. centered::
-  Fixed Sketch
+   Fixed Sketch
 
 If any degrees of freedom remain unsolved, the sketch is under-constrained and displayed with red color.
 
-.. image:: images/Sketch_underconstrained.png
+.. figure:: images/Sketch_underconstrained.png
    :align: center
 
-.. centered::
-  Underconstrained Sketch
+   Underconstrained Sketch
 
 The plug-in includes the following constraints:
 
@@ -137,6 +141,25 @@ The plug-in includes the following constraints:
 
 .. _sketch_operations:
 
+Overconstraned state
+--------------------
+
+Sketcher comes into overconstrained state when an extra constraint was defined. The following picture shows an example of the overconstrained state:
+
+.. figure:: images/Overconstrained.png
+   :align: center
+
+   Overconstrained Sketch
+
+When Sketcher gets this state then:
+
+- buttons Apply and Cancel for the whole Sketcher are blocked;
+- a constraint which causes the overconstraint state is highlightid by red color;
+- a warning message in sketcher Property Panel is shown with recomendation what to do in this case;
+- an additional Undo button is shown under the warning messages;
+
+After undoing the last operation or deletion of a conflicting constraint Sketcher will be reverted into a normal state.
+
 Operations
 ----------
 Operations modify existing features of the sketch or create new ones by copying them.
@@ -155,3 +178,4 @@ The plug-in includes the following operations:
    translationFeature.rst
    rotationFeature.rst
    sketchDrawer.rst
+   sketchCopy.rst