6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
8 gg = salome.ImportComponentGUI("GEOM")
11 box = geompy.MakeBoxDXDYDZ(200, 200, 200)
13 # The list of IDs (IDList) for suppress faces
15 sup_faces = geompy.SubShapeAllSortedCentres(box, geompy.ShapeType["FACE"])
17 # get indices of the sub-shape
18 f1_id = geompy.GetSubShapeID(box, sup_faces[3])
20 # remove faces from the given object (shape)
21 result = geompy.SuppressFaces(box, [f1_id])
23 # add objects in the study
24 id_box = geompy.addToStudy(box, "Box")
25 id_result = geompy.addToStudy(result, "Result")
28 gg.createAndDisplayGO(id_box)
29 gg.setDisplayMode(id_box,1)
30 gg.createAndDisplayGO(id_result)
31 gg.setDisplayMode(id_result,1)