Salome HOME
Task 2.12. New entities: ellipses and arcs of ellipses (issue #3003)
[modules/shaper.git] / src / SketchPlugin / doc / examples / split.py
1 from salome.shaper import model
2 from salome.shaper import geom
3
4 model.begin()
5 partSet = model.moduleDocument()
6 Part_1 = model.addPart(partSet)
7 Part_1_doc = Part_1.document()
8 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
9
10 SketchCircle_1 = Sketch_1.addCircle(44, 44, 29)
11
12 SketchPoint_1 = Sketch_1.addPoint(15, 44)
13 SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchCircle_1.results()[1])
14 SketchPoint_2 = Sketch_1.addPoint(44, 73)
15 SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchPoint_2.coordinates(), SketchCircle_1.results()[1])
16 SketchPoint_3 = Sketch_1.addPoint(64, 23)
17 SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchPoint_3.coordinates(), SketchCircle_1.results()[1])
18
19 GeomPoint = geom.Pnt2d(22, 65)
20 Sketch_1.addSplit(SketchCircle_1, GeomPoint)
21
22 model.do()
23 model.end()