Salome HOME
581fed89643ea290b72f5325e650acf53b2ce606
[modules/smesh.git] / src / Tools / Verima / Scripts / bb.py
1 # Get Information About Mesh by GetMeshIn
2 import salome
3 import smesh
4 import SMESH, SALOMEDS
5
6 salome.salome_init()
7 theStudy = salome.myStudy
8 smesh.SetCurrentStudy(theStudy)
9
10 aMesh,aResult = smesh.CreateMeshesFromMED('/tmp/MASSIF.new.med')
11 print aResult, aMesh
12
13 monMesh=aMesh[0]
14
15 # Get Information About Group by GetMeshInfo
16 print "\nInformation about group by GetMeshInfo:"
17 lGroups=monMesh.GetGroups()
18 print lGroups
19 for g in lGroups :
20     print g.GetName()
21 info = smesh.GetMeshInfo(lGroups[0])
22 keys = info.keys(); keys.sort()
23 for i in keys:
24   print "  %s  :  %d" % ( i, info[i] )
25   pass
26 #