1from salome.shaper import model
2
3model.begin()
4partSet = model.moduleDocument()
5Sketch_1 = model.addSketch(partSet, model.defaultPlane("XOY"))
6SketchLine_1 = Sketch_1.addLine(50, 0, 0, 0)
7SketchLine_2 = Sketch_1.addLine(0, 0, 0, 50)
8SketchLine_3 = Sketch_1.addLine(0, 50, 50, 50)
9SketchLine_4 = Sketch_1.addLine(50, 50, 50, 0)
10SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_1.startPoint())
11SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
12SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint())
13SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
14SketchConstraintHorizontal_1 = Sketch_1.setHorizontal(SketchLine_1.result())
15SketchConstraintVertical_1 = Sketch_1.setVertical(SketchLine_2.result())
16SketchConstraintHorizontal_2 = Sketch_1.setHorizontal(SketchLine_3.result())
17SketchConstraintVertical_2 = Sketch_1.setVertical(SketchLine_4.result())
18model.do()
19
20Sketch_1_Copy = model.copySketch(partSet, Sketch_1)
21
22model.end()