]> SALOME platform Git repositories - modules/shaper.git/blob - src/PythonAPI/doc/source/extrusion.rst
Salome HOME
[PythonAPI / doc] possible doc structuration example on extrusion feature
[modules/shaper.git] / src / PythonAPI / doc / source / extrusion.rst
1 Extrusion
2 ---------
3
4 .. testsetup::
5
6    import model
7    model.begin()
8    partset = model.moduleDocument()
9    part = model.addPart(partset).document()
10    plane = model.defaultPlane("XOY")
11    sketch = model.addSketch(part, plane)
12    p1 = sketch.addPoint(0, 0)
13    p2 = sketch.addPoint(0, 1)
14    p3 = sketch.addPoint(1, 1)
15    p4 = sketch.addPoint(1, 0)
16    sketch.addPolygon(p1.pointData(), p2.pointData(), p3.pointData(), p4.pointData())
17
18 Provided that a sketch has been created before an extrusion can then be created
19 by the following code:
20
21 .. doctest::
22    
23    >>> base = sketch.selectFace()
24    >>> extrusion = model.addExtrusion(part, base, 10)
25    >>> # Modification of the extrusion
26    >>> extrusion.setSize(20)
27    
28 All the ways to create an extrusion and the data access and modification methods 
29 of the extrusion are documented below
30
31 Create an extrusion
32 ...................
33    
34 .. autofunction:: model.features.extrusion.addExtrusion
35
36 Extrusion object
37 ................
38
39 .. autoclass:: model.features.extrusion.Extrusion
40    :members: