1 #==============================================================================
3 # Bug (from script, bug) : SMESH_GroupFromGeom.py, PAL6945
4 # Modified : 25/11/2004
5 # Author : Kovaltchuk Alexey
7 #==============================================================================
8 from SMESH_test1 import *
11 # Compute the mesh created in SMESH_test1
13 smesh.Compute(mesh, box)
15 # Create geometry groups on plane:
16 aGeomGroup1 = geompy.CreateGroup(face , geompy.ShapeType["FACE"])
17 geompy.AddObject(aGeomGroup1, 1)
19 aGeomGroup2 = geompy.CreateGroup(face , geompy.ShapeType["EDGE"])
21 geompy.AddObject(aGeomGroup2, 3)
22 geompy.AddObject(aGeomGroup2, 6)
23 geompy.AddObject(aGeomGroup2, 8)
24 geompy.AddObject(aGeomGroup2, 10)
26 geompy.addToStudy(aGeomGroup1, "Group on Faces")
27 geompy.addToStudy(aGeomGroup2, "Group on Edges")
29 aSmeshGroup1 = mesh.CreateGroupFromGEOM(SMESH.FACE, "SMESHGroup1", aGeomGroup1)
30 aSmeshGroup2 = mesh.CreateGroupFromGEOM(SMESH.EDGE, "SMESHGroup2", aGeomGroup2)
32 print "Create aGroupOnShell - a group linked to a shell"
33 aGroupOnShell = mesh.CreateGroupFromGEOM(SMESH.EDGE, "GroupOnShell", shell)
34 print "aGroupOnShell type =", aGroupOnShell.GetType()
35 print "aGroupOnShell size =", aGroupOnShell.Size()
36 print "aGroupOnShell ids :", aGroupOnShell.GetListOfID()
40 print "Modify <LocalLength> hypothesis: 100 -> 50"
42 print "Contents of aGroupOnShell changes:"
43 print "aGroupOnShell size =", aGroupOnShell.Size()
44 print "aGroupOnShell ids :", aGroupOnShell.GetListOfID()
48 print "Re-compute mesh, contents of aGroupOnShell changes again:"
49 smesh.Compute(mesh, box)
50 print "aGroupOnShell size =", aGroupOnShell.Size()
51 print "aGroupOnShell ids :", aGroupOnShell.GetListOfID()
53 salome.sg.updateObjBrowser(1);