Salome HOME
another mistake
[modules/geom.git] / doc / docutils / overview.rst
index 3ca3a4b20f2dd3fc8ea16914834ad3dab67dc28e..c74a0aaed766c07a079244420e1056cb631dd65c 100644 (file)
@@ -5,17 +5,36 @@ General presentation of the GEOM python package
 
 The GEOM python package essentially contains:
 
+* Utility functions to handle GEOM items in Salome study (see ``geomtools.py``).
+
+  - add a shape to a study, remove from the study
+  - display a shape in a viewer, erase the shape from the viewers
+  - completly delete a shape (undisplay, unpublish, and destroy the shape)
+  - helper functions to manage the selection in the object browser
+* Wrapping functions to help the usage of GEOM tools:
+
+  - a sketcher module to create sketches from the python API (see
+    ``sketcher.py``)
 * The visualization of structural elements: a function to create
   geometrical 3D representations of mechanical models called
-  "structural elements".
-
-Note that these functions either encapsulate the python programming
-interface of GEOM core (the CORBA or SWIG interfaces for example) or
-extend existing utilities as the ``geompy.py`` module.
+  "structural elements" (see package ``structelem``)
 
 The functions are distributed in the python package
-``salome.geom``. For example, the usage of the visualization of
-structural elements can be appreciated with this set of instructions:
+``salome.geom``. The specification of the programming interface of
+this package is detailled in the part :doc:`Documentation of the
+programming interface (API)</docapi>` of this documentation.
+
+.. note::
+   The main package ``salome`` contains other sub-packages that are
+   distributed with the other SALOME modules. For example, the KERNEL
+   module provides the python package ``salome.kernel`` and SMESH the
+   package ``salome.smesh``.
+
+Visualization of structural elements (package ``structelem``)
+-------------------------------------------------------------
+
+The usage of the visualization of structural elements can be
+appreciated with this set of instructions:
 
 .. code-block:: python
 
@@ -27,12 +46,30 @@ This creates the geometrical objects displayed in the study below:
 .. image:: /images/salome-geom-structuralelements.png
    :align: center
 
-The specification of the programming interface of this package is
-detailled in the part :doc:`Documentation of the programming interface
-(API)</docapi>` of this documentation.
+Manipulate GEOM object in the study (module ``geomtools``)
+----------------------------------------------------------
 
-.. note::
-   The main package ``salome`` contains other sub-packages that are
-   distributed with the other SALOME modules. For example, the KERNEL
-   module provides the python package ``salome.kernel`` and SMESH the
-   package ``salome.smesh``.
+The usage of the ``geomtools`` module can be appreciated with this set
+of instructions:
+
+.. code-block:: python
+
+   from salome.geom.geomtools import TEST_createAndDeleteShape
+   TEST_createAndDeleteShape()
+
+This test executes the following procedure:
+
+* Create, publish, and display a cylinder
+* Create, publish, and display a sphere
+* Create a box, publish it in a folder "boxset", and display it with a
+  "pink" color.
+* Erase the sphere from the viewer (the sphere still exists in the study)
+* Delete the cylinder (the cylinder is no longer displayed and does
+  not exist any more, neither in the study nor the GEOM componet.
+
+At the end of the execution of this test, you should have in the
+SALOME session:
+
+* the box, in a dedicated folder of the study, and displayed in the
+  viewer
+* the sphere, in the standard place of the study, and not displayed