]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketchPlugin/Test/Test1924.py
Salome HOME
Fix compilation errors (part 2)
[modules/shaper.git] / src / SketchPlugin / Test / Test1924.py
1 """
2     Test1924.py
3     Test case for issue #1924 "Wrong naming of multiple-rotated sketch edges on python dump"
4 """
5
6 from salome.shaper import model
7
8 model.begin()
9 partSet = model.moduleDocument()
10 Part_1 = model.addPart(partSet)
11 Part_1_doc = Part_1.document()
12
13 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
14 SketchLine_1 = Sketch_1.addLine(70, 120, 50, 25)
15 SketchLine_2 = Sketch_1.addLine(50, 25, 170, 50)
16 SketchPoint_1 = Sketch_1.addPoint(model.selection("VERTEX", "PartSet/Origin"))
17 SketchMultiRotation_1_objects = [SketchLine_1.result(), SketchLine_2.result()]
18 # names of rotated objects: "SketchLine_3", "SketchLine_4"
19 SketchMultiRotation_1 = Sketch_1.addRotation(SketchMultiRotation_1_objects, SketchPoint_1.coordinates(), 90, 2)
20 # line named "SketchLine_5"
21 SketchLine_5 = Sketch_1.addLine(0, 100, 100, 100)
22 # change number of rotated objects.
23 # names of rotated objects: "SketchLine_3", "SketchLine_4", "SketchLine_6", "SketchLine_7"
24 SketchMultiRotation_1.numberOfObjects().setValue(3)
25
26 model.end()
27
28 assert(model.checkPythonDump())