Salome HOME
Add .py extension to tests filenames
[modules/smesh.git] / doc / salome / examples / creating_meshes_ex04.py
index 33106c775ad4b0a66502e7d40d2b2c816e0c5833..86b4434810205a19faee70fbed96c049b9350f19 100644 (file)
@@ -1,7 +1,14 @@
 # Editing of a mesh
 
-import geompy
-import smesh
+import salome
+salome.salome_init()
+import GEOM
+from salome.geom import geomBuilder
+geompy = geomBuilder.New()
+
+import SMESH, SALOMEDS
+from salome.smesh import smeshBuilder
+smesh =  smeshBuilder.New()
 
 def PrintMeshInfo(theMesh):
     aMesh = theMesh.GetMesh()
@@ -39,8 +46,7 @@ tria.Compute()
 PrintMeshInfo(tria)
 
 # remove a local hypothesis
-mesh = tria.GetMesh()
-mesh.RemoveHypothesis(edge, hyp4)
+tria.RemoveHypothesis(hyp4, edge)
 
 # compute the mesh
 tria.Compute()