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 pxyz = geompy.MakeVertex( 5., 5., 40.)
15 sketcher1 = geompy.MakeSketcher("Sketcher:F 0 0:TT 70 0:TT 70 70:TT 0 70:WW")
16 sketcher2 = geompy.MakeSketcher("Sketcher:F 20 20:TT 50 20:TT 50 50:TT 20 50:WW")
19 # create a face from two wires
20 face = geompy.MakeFaces([sketcher1, sketcher2],isPlanarFace)
23 prism = geompy.MakePrism(face, p0, pxyz)
25 # explode the prism into faces
26 prism_faces = geompy.SubShapeAllSortedCentres(prism, geompy.ShapeType["FACE"])
28 # create a shell from a set of faces
29 shell = geompy.MakeShell([prism_faces[0], prism_faces[2], prism_faces[3],
30 prism_faces[7], prism_faces[9]])
32 # add objects in the study
33 id_shell = geompy.addToStudy(shell,"Shell")
36 gg.createAndDisplayGO(id_shell)
37 gg.setDisplayMode(id_shell,1)