Salome HOME
bos #28736 Prevent running HOMARD-related tests in case if MEDFile is built with...
[modules/smesh.git] / doc / salome / examples / modifying_meshes_ex15.py
index efd5cfbf9b051a20e33693316dbbb31c44f7189a..7d62245e8768bc03df600b30cc0c7a892d8e98eb 100644 (file)
@@ -2,14 +2,14 @@
 
 
 import salome
-salome.salome_init()
+salome.salome_init_without_session()
 
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 
 box = geompy.MakeBoxDXDYDZ(200, 200, 200)
@@ -33,7 +33,7 @@ for vId in geompy.SubShapeAllIDs( box, geompy.ShapeType["VERTEX"]):
     pass
 
 if not node000:
-    raise "node000 not found"
+    raise Exception("node000 not found")
 
 # find node000 using a dedicated function 
 n = mesh.FindNodeClosestTo( -1,-1,-1 )