Salome HOME
Remove coding information from the python scripts due to tuleap issue #16806
[modules/shaper.git] / src / FeaturesPlugin / doc / examples / pipe_binormal.py
1 from salome.shaper import model
2
3 model.begin()
4 partSet = model.moduleDocument()
5 Part_1 = model.addPart(partSet)
6 Part_1_doc = Part_1.document()
7 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOZ"))
8 SketchLine_1 = Sketch_1.addLine(72.2418524871355, 29.96679215537161, -69.82505995666611, 29.96679215537161)
9 SketchLine_2 = Sketch_1.addLine(-69.82505995666611, 29.96679215537161, -69.82505995666611, -40.02291624943114)
10 SketchLine_3 = Sketch_1.addLine(-69.82505995666611, -40.02291624943114, 72.2418524871355, -40.02291624943114)
11 SketchLine_4 = Sketch_1.addLine(72.2418524871355, -40.02291624943114, 72.2418524871355, 29.96679215537161)
12 SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint())
13 SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
14 SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint())
15 SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
16 SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result())
17 SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result())
18 SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result())
19 SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result())
20 model.do()
21 Point_2 = model.addPoint(Part_1_doc, 0, 100, 40)
22 Point_3 = model.addPoint(Part_1_doc, 0, 260, 60)
23 Interpolation_1_objects = [model.selection("VERTEX", "PartSet/Origin"), model.selection("VERTEX", "Point_1"), model.selection("VERTEX", "Point_2")]
24 Interpolation_1 = model.addInterpolation(Part_1_doc, Interpolation_1_objects, False, False)
25 Pipe_1 = model.addPipe(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2f-SketchLine_3f-SketchLine_4f")], model.selection("EDGE", "Interpolation_1_1"), model.selection("EDGE", "PartSet/OX"))
26 model.do()
27 model.end()