6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
8 gg = salome.ImportComponentGUI("GEOM")
11 p0 = geompy.MakeVertex(0. , 0. , 0. )
12 px = geompy.MakeVertex(100., 0. , 0. )
13 py = geompy.MakeVertex(0. , 100., 0. )
14 pz = geompy.MakeVertex(0. , 0. , 100.)
15 pxyz = geompy.MakeVertex(100., 100., 100.)
17 # create a vector from two points
18 vxy = geompy.MakeVector(px, py)
20 # create an arc from three points
21 arc = geompy.MakeArc(py, pz, px)
24 wire = geompy.MakeWire([vxy, arc])
27 edge = geompy.MakeEdge(p0, pxyz)
30 pipe = geompy.MakePipe(wire, edge)
32 # add objects in the study
33 id_wire = geompy.addToStudy(wire,"Wire")
34 id_edge = geompy.addToStudy(edge,"Edge")
35 id_pipe = geompy.addToStudy(pipe,"Pipe")
37 # display the wire, the edge (path) and the pipe
38 gg.createAndDisplayGO(id_wire)
39 gg.createAndDisplayGO(id_edge)
40 gg.createAndDisplayGO(id_pipe)
41 gg.setDisplayMode(id_pipe,1)