6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
9 # create a cylindric face and a curve(edge)
10 cylinder = geompy.MakeCylinderRH(100, 300)
11 [face_cyl] = geompy.SubShapes(cylinder, [3])
13 p1 = geompy.MakeVertex(200, 0, 100)
14 p2 = geompy.MakeVertex(200, 80, 100)
15 p3 = geompy.MakeVertex(200, 80, 180)
16 p4 = geompy.MakeVertex(130, 80, 180)
17 p5 = geompy.MakeVertex(90, 80, 240)
19 curve = geompy.MakeInterpol([p1, p2, p3, p4, p5], False, False)
21 # create a new object as projection of the
22 # given curve on the given cylindric face
23 projection = geompy.MakeProjection(curve, face_cyl)
25 # add objects in the study
26 geompy.addToStudy(cylinder, "cylinder")
27 geompy.addToStudyInFather(cylinder, face_cyl, "face_cyl")
28 geompy.addToStudy(p1, "p1")
29 geompy.addToStudy(p2, "p2")
30 geompy.addToStudy(p3, "p3")
31 geompy.addToStudy(p4, "p4")
32 geompy.addToStudy(p5, "p5")
33 geompy.addToStudy(curve, "curve")
34 geompy.addToStudy(projection, "projection")