Salome HOME
a3ba96ba2d70a1317a66778eff26099a0b4cc664
[modules/shaper.git] / src / SketchPlugin / doc / examples / trim.py
1 # -*- coding: utf-8 -*-
2
3 from salome.shaper import model
4 from salome.shaper import geom
5
6 model.begin()
7 partSet = model.moduleDocument()
8 Part_1 = model.addPart(partSet)
9 Part_1_doc = Part_1.document()
10 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
11
12 SketchCircle_1 = Sketch_1.addCircle(40, 45, 30)
13
14 SketchPoint_1 = Sketch_1.addPoint(20, 70)
15 SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchPoint_1.coordinates(), SketchCircle_1.results()[1])
16
17 SketchLine_1 = Sketch_1.addLine(17, 7, 80, 70)
18
19 GeomPoint = geom.Pnt2d(47, 75)
20 Sketch_1.addTrim(SketchCircle_1, GeomPoint)
21
22 model.do()
23 model.end()