5 salome.salome_init_without_session()
7 from salome.geom import geomBuilder
8 geompy = geomBuilder.New()
10 import SMESH, SALOMEDS
11 from salome.smesh import smeshBuilder
12 smesh = smeshBuilder.New()
13 import salome_notebook
16 box = geompy.MakeBoxDXDYDZ(100, 30, 10)
17 # the smallest face of the box
18 face = geompy.SubShapeAllSorted( box, geompy.ShapeType["FACE"])[0]
20 geompy.addToStudy( box, "box" )
21 geompy.addToStudyInFather( box, face, "face" )
23 mesh = smesh.Mesh(box)
24 mesh.AutomaticHexahedralization();
26 # remove half of mesh faces from the smallest face
27 faceFaces = mesh.GetSubMeshElementsId(face)
28 faceToRemove = faceFaces[: len(faceFaces) // 2]
29 mesh.RemoveElements( faceToRemove )
31 # make a group of volumes missing the removed faces
32 bareGroup = mesh.MakeGroup("bare volumes", SMESH.VOLUME, SMESH.FT_BareBorderVolume)
33 assert(bareGroup.Size() == len( faceToRemove))