]> SALOME platform Git repositories - modules/shaper.git/blob - src/PythonAPI/doc/source/index.rst
Salome HOME
91677e73d4111e95a4232aaa4805de063cc997e9
[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 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
40    sketcher
41
42    connection
43    construction
44    exchange
45
46    boolean
47    partition
48    extrusion
49    revolution
50    placement
51    rotation
52    translation
53    group
54
55    parameter
56    partset
57
58 Indices and tables
59 ==================
60
61 * :ref:`genindex`
62 * :ref:`modindex`