# Bare border volumes
-from smesh import *
-SetCurrentStudy(salome.myStudy)
+
+import salome
+salome.salome_init()
+import GEOM
+from salome.geom import geomBuilder
+geompy = geomBuilder.New(salome.myStudy)
+
+import SMESH, SALOMEDS
+from salome.smesh import smeshBuilder
+smesh = smeshBuilder.New(salome.myStudy)
+import salome_notebook
+
box = geompy.MakeBoxDXDYDZ(100, 30, 10)
# the smallest face of the box
geompy.addToStudy( box, "box" )
geompy.addToStudyInFather( box, face, "face" )
-mesh = Mesh(box)
+mesh = smesh.Mesh(box)
mesh.AutomaticHexahedralization();
# remove half of mesh faces from the smallest face
mesh.RemoveElements( faceToRemove )
# make a group of volumes missing the removed faces
-bareGroup = mesh.MakeGroup("bare volumes", VOLUME, FT_BareBorderVolume)
+bareGroup = mesh.MakeGroup("bare volumes", SMESH.VOLUME, SMESH.FT_BareBorderVolume)
assert(bareGroup.Size() == len( faceToRemove))