Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 from SMESH_test1 import *
00033
00034
00035
00036
00037 mesh.Compute()
00038
00039
00040 aGeomGroup1 = geompy.CreateGroup(face , geompy.ShapeType["FACE"])
00041 geompy.AddObject(aGeomGroup1, 1)
00042
00043 aGeomGroup2 = geompy.CreateGroup(face , geompy.ShapeType["EDGE"])
00044
00045 geompy.AddObject(aGeomGroup2, 3)
00046 geompy.AddObject(aGeomGroup2, 6)
00047 geompy.AddObject(aGeomGroup2, 8)
00048 geompy.AddObject(aGeomGroup2, 10)
00049
00050 geompy.addToStudy(aGeomGroup1, "Group on Faces")
00051 geompy.addToStudy(aGeomGroup2, "Group on Edges")
00052
00053 aSmeshGroup1 = mesh.GroupOnGeom(aGeomGroup1, "SMESHGroup1", smesh.FACE)
00054 aSmeshGroup2 = mesh.GroupOnGeom(aGeomGroup2, "SMESHGroup2", smesh.EDGE)
00055
00056 print "Create aGroupOnShell - a group linked to a shell"
00057 aGroupOnShell = mesh.GroupOnGeom(shell, "GroupOnShell", smesh.EDGE)
00058 print "aGroupOnShell type =", aGroupOnShell.GetType()
00059 print "aGroupOnShell size =", aGroupOnShell.Size()
00060 print "aGroupOnShell ids :", aGroupOnShell.GetListOfID()
00061
00062 print " "
00063
00064 print "Modify <LocalLength> hypothesis: 100 -> 50"
00065 hypLen1.SetLength(50)
00066 print "Contents of aGroupOnShell changes:"
00067 print "aGroupOnShell size =", aGroupOnShell.Size()
00068 print "aGroupOnShell ids :", aGroupOnShell.GetListOfID()
00069
00070 print " "
00071
00072 print "Re-compute mesh, contents of aGroupOnShell changes again:"
00073 mesh.Compute()
00074 print "aGroupOnShell size =", aGroupOnShell.Size()
00075 print "aGroupOnShell ids :", aGroupOnShell.GetListOfID()
00076
00077 salome.sg.updateObjBrowser(1);