]> SALOME platform Git repositories - modules/shaper.git/blob - src/FeaturesPlugin/doc/examples/pipe_simple.py
Salome HOME
Remove coding information from the python scripts due to tuleap issue #16806
[modules/shaper.git] / src / FeaturesPlugin / doc / examples / pipe_simple.py
1 from SketchAPI import *
2
3 from salome.shaper import model
4
5 model.begin()
6 partSet = model.moduleDocument()
7 Part_1 = model.addPart(partSet)
8 Part_1_doc = Part_1.document()
9 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("YOZ"))
10 SketchProjection_1 = Sketch_1.addProjection(model.selection("VERTEX", "PartSet/Origin"), False)
11 SketchPoint_1 = SketchProjection_1.createdFeature()
12 SketchCircle_1 = Sketch_1.addCircle(0, 0, 40)
13 SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_1.result(), SketchCircle_1.center())
14 SketchConstraintRadius_1 = Sketch_1.setRadius(SketchCircle_1.results()[1], 40)
15 model.do()
16 Edge_1 = model.addEdge(Part_1_doc, [model.selection("EDGE", "Sketch_1/SketchCircle_1_2")])
17 Sketch_2 = model.addSketch(Part_1_doc, model.standardPlane("XOZ"))
18 SketchProjection_2 = Sketch_2.addProjection(model.selection("EDGE", "PartSet/OX"), False)
19 SketchLine_1 = SketchProjection_2.createdFeature()
20 SketchArc_1 = Sketch_2.addArc(30, 0, 0, 0, 40.50885209855912, 28.09918197333542, True)
21 SketchConstraintCoincidence_2 = Sketch_2.setCoincident(SketchLine_1.result(), SketchArc_1.center())
22 SketchConstraintCoincidence_3 = Sketch_2.setCoincident(SketchAPI_Line(SketchLine_1).startPoint(), SketchArc_1.startPoint())
23 SketchConstraintRadius_2 = Sketch_2.setRadius(SketchArc_1.results()[1], 30)
24 model.do()
25 Pipe_1 = model.addPipe(Part_1_doc, [model.selection("EDGE", "Edge_1_1")], model.selection("EDGE", "Sketch_2/SketchArc_1_2"))
26 model.do()
27 model.end()