Salome HOME
Merge Python 3 porting.
[modules/smesh.git] / doc / salome / examples / modifying_meshes_ex15.py
index 22aba54cccd1fde1a3077b837ad940037b0887d0..2656ea300bc2d625d2cb0ca2cc4ccfece26793ca 100644 (file)
@@ -33,20 +33,20 @@ 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 )
 if not n == node000:
-    raise "FindNodeClosestTo() returns " + str( n ) + " != " + str( node000 )
+    raise Exception("FindNodeClosestTo() returns " + str( n ) + " != " + str( node000 ))
 
 # move node000 to a new location
 x,y,z = -10, -10, -10
 n = mesh.MoveNode( n,x,y,z )
 if not n:
-    raise "MoveNode() returns " + n
+    raise Exception("MoveNode() returns " + n)
 
 # check the coordinates of the node000
 xyz = mesh.GetNodeXYZ( node000 )
 if not ( xyz[0] == x and xyz[1] == y and xyz[2] == z) :
-    raise "Wrong coordinates: " + str( xyz ) + " != " + str( [x,y,z] )
+    raise Exception("Wrong coordinates: " + str( xyz ) + " != " + str( [x,y,z] ))