]> SALOME platform Git repositories - modules/shaper.git/blob - src/ModelAPI/Test/TestExternalConstruction.py
Salome HOME
d2463a3766ab678171fe4348b7af455102f9d392
[modules/shaper.git] / src / ModelAPI / Test / TestExternalConstruction.py
1 # The test for correct referencing for Part feature of whole construction result created in PartSet
2
3 from salome.shaper import model
4
5 model.begin()
6 partSet = model.moduleDocument()
7 Sketch_1 = model.addSketch(partSet, model.defaultPlane("XOZ"))
8 SketchLine_1 = Sketch_1.addLine(-104, 73, 102, 265)
9 SketchLine_2 = Sketch_1.addLine(102, 265, 192, -1)
10 SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
11 SketchLine_3 = Sketch_1.addLine(192, -1, -104, 73)
12 SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint())
13 SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_1.startPoint(), SketchLine_3.endPoint())
14 model.do()
15 Part_1 = model.addPart(partSet)
16 Part_1_doc = Part_1.document()
17 Revolution_1 = model.addRevolution(Part_1_doc, [model.selection("COMPOUND", "PartSet/Sketch_1")], model.selection("EDGE", "PartSet/Sketch_1/Edge-SketchLine_3"), 360, 0)
18 model.end()
19
20 assert(model.checkPythonDump())