Salome HOME
another mistake
[modules/geom.git] / doc / docutils / overview.rst
1
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 General presentation of the GEOM python package
4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5
6 The GEOM python package essentially contains:
7
8 * Utility functions to handle GEOM items in Salome study (see ``geomtools.py``).
9
10   - add a shape to a study, remove from the study
11   - display a shape in a viewer, erase the shape from the viewers
12   - completly delete a shape (undisplay, unpublish, and destroy the shape)
13   - helper functions to manage the selection in the object browser
14 * Wrapping functions to help the usage of GEOM tools:
15
16   - a sketcher module to create sketches from the python API (see
17     ``sketcher.py``)
18 * The visualization of structural elements: a function to create
19   geometrical 3D representations of mechanical models called
20   "structural elements" (see package ``structelem``)
21
22 The functions are distributed in the python package
23 ``salome.geom``. The specification of the programming interface of
24 this package is detailled in the part :doc:`Documentation of the
25 programming interface (API)</docapi>` of this documentation.
26
27 .. note::
28    The main package ``salome`` contains other sub-packages that are
29    distributed with the other SALOME modules. For example, the KERNEL
30    module provides the python package ``salome.kernel`` and SMESH the
31    package ``salome.smesh``.
32
33 Visualization of structural elements (package ``structelem``)
34 -------------------------------------------------------------
35
36 The usage of the visualization of structural elements can be
37 appreciated with this set of instructions:
38
39 .. code-block:: python
40
41    from salome.geom.structelem import TEST_StructuralElement
42    TEST_StructuralElement()
43
44 This creates the geometrical objects displayed in the study below:
45
46 .. image:: /images/salome-geom-structuralelements.png
47    :align: center
48
49 Manipulate GEOM object in the study (module ``geomtools``)
50 ----------------------------------------------------------
51
52 The usage of the ``geomtools`` module can be appreciated with this set
53 of instructions:
54
55 .. code-block:: python
56
57    from salome.geom.geomtools import TEST_createAndDeleteShape
58    TEST_createAndDeleteShape()
59
60 This test executes the following procedure:
61
62 * Create, publish, and display a cylinder
63 * Create, publish, and display a sphere
64 * Create a box, publish it in a folder "boxset", and display it with a
65   "pink" color.
66 * Erase the sphere from the viewer (the sphere still exists in the study)
67 * Delete the cylinder (the cylinder is no longer displayed and does
68   not exist any more, neither in the study nor the GEOM componet.
69
70 At the end of the execution of this test, you should have in the
71 SALOME session:
72
73 * the box, in a dedicated folder of the study, and displayed in the
74   viewer
75 * the sphere, in the standard place of the study, and not displayed