]> SALOME platform Git repositories - modules/shaper.git/blob - src/PythonAPI/doc/source/index.rst
Salome HOME
[PythonAPI / doc] structuration of documentation
[modules/shaper.git] / src / PythonAPI / doc / source / index.rst
1 Shaper textual interface documentation
2 ======================================
3
4 Shaper provides two different textual interfaces that allows you to create
5 models through python scripts:
6
7 * a "direct" API, which allows you to create geometrical objects
8   without any parametric considerations
9
10 * a "parametric" API, which is very close to what is done
11   in the graphical interface and allows you to recalculate a model
12   when a parameter is changed 
13
14 Parametric API
15 --------------
16
17 This API is implemented in the model Python package. A script written
18 with the parametric API will typically begin with a code like below:
19
20 .. doctest:: 
21
22    >>> import model
23    >>> model.begin()
24    >>> partset = model.moduleDocument()
25    >>> part = model.addPart(partset).document()
26    >>> plane = model.defaultPlane("XOY")
27    >>> sketch = model.addSketch(part, plane)
28    >>> line = sketch.addLine(0, 0, 0, 1)
29
30
31 .. toctree::
32    :maxdepth: 2
33
34    sketcher
35    extrusion
36
37
38
39 Indices and tables
40 ==================
41
42 * :ref:`genindex`
43 * :ref:`modindex`