2013-02-12 17:35:16 +06:00
|
|
|
# Get Non Blocks
|
|
|
|
|
|
|
|
import salome
|
2021-08-12 11:43:44 +05:00
|
|
|
salome.salome_init_without_session()
|
2013-04-04 13:06:43 +06:00
|
|
|
import GEOM
|
|
|
|
from salome.geom import geomBuilder
|
2017-06-13 14:57:14 +05:00
|
|
|
geompy = geomBuilder.New()
|
2013-02-12 17:35:16 +06:00
|
|
|
|
|
|
|
# create solids
|
|
|
|
box = geompy.MakeBoxDXDYDZ(100, 100, 100)
|
|
|
|
cyl = geompy.MakeCylinderRH(100, 200)
|
|
|
|
|
|
|
|
geompy.addToStudy(box, 'box')
|
|
|
|
geompy.addToStudy(cyl, 'cyl')
|
|
|
|
|
|
|
|
# make a compound
|
|
|
|
compound = geompy.MakeCompound([box, cyl])
|
|
|
|
geompy.addToStudy(compound, 'compound')
|
|
|
|
|
|
|
|
# explore the compound
|
|
|
|
pair = geompy.GetNonBlocks(compound)
|
|
|
|
|
|
|
|
if pair[0] is not None:
|
|
|
|
geompy.addToStudyInFather(compound, pair[0], "GrNonBlocks")
|
|
|
|
pass
|
|
|
|
|
|
|
|
if pair[1] is not None:
|
|
|
|
geompy.addToStudyInFather(compound, pair[1], "GrNonQuads")
|
|
|
|
pass
|