mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-14 17:48:34 +05:00
7961b83044
This reverts commit 3cd92817cb
.
30 lines
650 B
Python
30 lines
650 B
Python
# Get Non Blocks
|
|
|
|
import salome
|
|
salome.salome_init()
|
|
import GEOM
|
|
from salome.geom import geomBuilder
|
|
geompy = geomBuilder.New(salome.myStudy)
|
|
|
|
# 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
|