Salome HOME
Merge branch 'master' into cgt/devCEA
[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    >>> from salome.shaper 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 Features
31 ........
32
33 This API provides functions for creating the features listed below.
34 These functions return an interface to the feature that allow
35 to modify the feature and retrieve data from it.
36
37 .. toctree::
38    :maxdepth: 1
39    :glob:
40
41    sketcher
42    model/*
43
44 Indices and tables
45 ==================
46
47 * :ref:`genindex`
48 * :ref:`modindex`