Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Get Non Blocks
1 # Get Non Blocks
2 
3 import salome
4 salome.salome_init()
5 import GEOM
6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
8 
9 # create solids
10 box = geompy.MakeBoxDXDYDZ(100, 100, 100)
11 cyl = geompy.MakeCylinderRH(100, 200)
12 
13 geompy.addToStudy(box, 'box')
14 geompy.addToStudy(cyl, 'cyl')
15 
16 # make a compound
17 compound = geompy.MakeCompound([box, cyl])
18 geompy.addToStudy(compound, 'compound')
19 
20 # explore the compound
21 pair = geompy.GetNonBlocks(compound)
22 
23 if pair[0] is not None:
24  geompy.addToStudyInFather(compound, pair[0], "GrNonBlocks")
25  pass
26 
27 if pair[1] is not None:
28  geompy.addToStudyInFather(compound, pair[1], "GrNonQuads")
29  pass

Download this script