X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=doc%2Fsalome%2Fexamples%2Fquality_controls_ex08.py;h=541af64a3220053bbef14b31940daa61e6eda7e6;hp=77e7e4c9454548aa88c53a285e5d7efa8a2942e3;hb=13b8c96957cd060f6e76f73c9248b941beff0d6d;hpb=9a54694a0ab1e5cbc558a35c4606ceea4f7af2ef diff --git a/doc/salome/examples/quality_controls_ex08.py b/doc/salome/examples/quality_controls_ex08.py index 77e7e4c94..541af64a3 100644 --- a/doc/salome/examples/quality_controls_ex08.py +++ b/doc/salome/examples/quality_controls_ex08.py @@ -1,7 +1,17 @@ # 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 @@ -10,7 +20,7 @@ face = geompy.SubShapeAllSorted( box, geompy.ShapeType["FACE"])[0] 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 @@ -19,5 +29,5 @@ faceToRemove = faceFaces[: len(faceFaces)/2] 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))