5 gg = salome.ImportComponentGUI("GEOM")
7 # create a box and a sphere
8 box = geompy.MakeBoxDXDYDZ(200, 200, 200)
9 sphere = geompy.MakeSphereR(100)
12 compound = geompy.MakeCompound([box, sphere])
14 # get all the blocks of the given compound, by criteria: min_nb_faces <= nb. of faces <= max_nb_faces
17 make_block_explode = geompy.MakeBlockExplode(compound, min_nb_faces, max_nb_faces)
19 # add objects in the study
20 id_compound = geompy.addToStudy(compound, "Compound")
21 id_make_block_explode = geompy.addToStudyInFather(compound, make_block_explode[0], "MakeBlockExplode")
24 gg.createAndDisplayGO(id_compound)
25 gg.createAndDisplayGO(id_make_block_explode)
26 gg.setDisplayMode(id_make_block_explode,1)