6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
8 gg = salome.ImportComponentGUI("GEOM")
10 # create a box and a sphere
11 box = geompy.MakeBoxDXDYDZ(200, 200, 200)
12 sphere = geompy.MakeSphereR(100)
15 compound = geompy.MakeCompound([box, sphere])
17 # get all the blocks of the given compound, by criteria: min_nb_faces <= nb. of faces <= max_nb_faces
20 make_block_explode = geompy.MakeBlockExplode(compound, min_nb_faces, max_nb_faces)
22 # add objects in the study
23 id_compound = geompy.addToStudy(compound, "Compound")
24 id_make_block_explode = geompy.addToStudyInFather(compound, make_block_explode[0], "MakeBlockExplode")
27 gg.createAndDisplayGO(id_compound)
28 gg.createAndDisplayGO(id_make_block_explode)
29 gg.setDisplayMode(id_make_block_explode,1)