Salome HOME
Merging with WPdev
[modules/smesh.git] / src / SMESH_SWIG / SMESH_GroupFromGeom2.py
index 5364365e3ca53b4aad7e8885a28e2b3aba848798..0e2636149393e10387c9fc6492c116793471e5f9 100755 (executable)
 #  Project                  : PAL/SALOME
 #============================================================================== 
 from SMESH_test1 import *
-import SMESH
+
 
 # Compute the mesh created in SMESH_test1
 
-smesh.Compute(mesh, box)
+mesh.Compute()
 
 # Create geometry groups on plane:
 aGeomGroup1 = geompy.CreateGroup(face , geompy.ShapeType["FACE"])
@@ -45,11 +45,11 @@ geompy.AddObject(aGeomGroup2, 10)
 geompy.addToStudy(aGeomGroup1, "Group on Faces")
 geompy.addToStudy(aGeomGroup2, "Group on Edges")
 
-aSmeshGroup1 = mesh.CreateGroupFromGEOM(SMESH.FACE, "SMESHGroup1", aGeomGroup1)
-aSmeshGroup2 = mesh.CreateGroupFromGEOM(SMESH.EDGE, "SMESHGroup2", aGeomGroup2)
+aSmeshGroup1 = mesh.GroupOnGeom(aGeomGroup1, "SMESHGroup1", smesh.FACE)
+aSmeshGroup2 = mesh.GroupOnGeom(aGeomGroup2, "SMESHGroup2", smesh.EDGE)
 
 print "Create aGroupOnShell - a group linked to a shell"
-aGroupOnShell = mesh.CreateGroupFromGEOM(SMESH.EDGE, "GroupOnShell", shell)
+aGroupOnShell = mesh.GroupOnGeom(shell, "GroupOnShell", smesh.EDGE)
 print "aGroupOnShell type =", aGroupOnShell.GetType()
 print "aGroupOnShell size =", aGroupOnShell.Size()
 print "aGroupOnShell ids :", aGroupOnShell.GetListOfID()
@@ -65,7 +65,7 @@ print "aGroupOnShell ids :", aGroupOnShell.GetListOfID()
 print " "
 
 print "Re-compute mesh, contents of aGroupOnShell changes again:"
-smesh.Compute(mesh, box)
+mesh.Compute()
 print "aGroupOnShell size =", aGroupOnShell.Size()
 print "aGroupOnShell ids :", aGroupOnShell.GetListOfID()