Salome HOME
1ce58436dff5329821ed6c5eccb36f121c502ef4
[modules/shaper.git] / src / SketchPlugin / doc / examples / intersection.py
1 # -*- coding: utf-8 -*-
2
3 from salome.shaper import model
4
5 model.begin()
6 partSet = model.moduleDocument()
7 Part_1 = model.addPart(partSet)
8 Part_1_doc = Part_1.document()
9
10 Point_2 = model.addPoint(Part_1_doc, 10, 10, -10)
11 Point_3 = model.addPoint(Part_1_doc, 70, 70, 50)
12 Polyline_1 = model.addPolyline3D(Part_1_doc, [model.selection("VERTEX", "Point_1"), model.selection("VERTEX", "Point_2")], False)
13
14 Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
15 SketchIntersectionPoint_1 = Sketch_1.addIntersectionPoint(model.selection("EDGE", "Polyline_1_1/Edge_1"), True)
16
17 model.do()
18 model.end()