Create Extrusion by bounding planes

 1from salome.shaper import model
 2
 3model.begin()
 4partSet = model.moduleDocument()
 5Part_1 = model.addPart(partSet)
 6Part_1_doc = Part_1.document()
 7Sketch_1 = model.addSketch(Part_1_doc, model.standardPlane("XOY"))
 8SketchCircle_1 = Sketch_1.addCircle(0, 0, 50)
 9model.do()
10Plane_4 = model.addPlane(Part_1_doc,
11                         model.selection("FACE", "PartSet/XOY"),
12                         model.selection("EDGE", "PartSet/OX"),
13                         45)
14Plane_5 = model.addPlane(Part_1_doc,
15                        model.selection("FACE", "PartSet/XOY"),
16                        model.selection("EDGE", "PartSet/OX"),
17                        315)
18Extrusion_1 = model.addExtrusion(Part_1_doc,
19                                 [model.selection("COMPOUND", "Sketch_1")],
20                                 model.selection(),
21                                 model.selection("FACE", "Plane_2"),
22                                 50,
23                                 model.selection("FACE", "Plane_1"),
24                                 50)
25model.do()
26model.end()

Download this script