3 \page tui_viewing_meshes_page Viewing Meshes
6 \anchor tui_viewing_mesh_infos
7 <h2>Viewing Mesh Infos</h2>
15 box = geompy.MakeBox(0., 0., 0., 20., 20., 20.)
16 geompy.addToStudy(box, "box")
17 [Face_1,Face_2,Face_3,Face_4,Face_5,Face_5] = geompy.SubShapeAll(box, geompy.ShapeType["FACE"])
20 tetra = smesh.Mesh(box, "MeshBox")
22 algo1D = tetra.Segment()
23 algo1D.NumberOfSegments(3)
25 algo2D = tetra.Triangle()
26 algo2D.MaxElementArea(10.)
28 algo3D = tetra.Tetrahedron(smesh.NETGEN)
29 algo3D.MaxElementVolume(900.)
34 # print information about the mesh
35 print "Information about mesh:"
36 print "Number of nodes : ", tetra.NbNodes()
37 print "Number of edges : ", tetra.NbEdges()
38 print "Number of faces : ", tetra.NbFaces()
39 print " triangles : ", tetra.NbTriangles()
40 print " quadrangles : ", tetra.NbQuadrangles()
41 print " polygons : ", tetra.NbPolygons()
42 print "Number of volumes : ", tetra.NbVolumes()
43 print " tetrahedrons: ", tetra.NbTetras()
44 print " hexahedrons : ", tetra.NbHexas()
45 print " prisms : ", tetra.NbPrisms()
46 print " pyramids : ", tetra.NbPyramids()
47 print " polyhedrons : ", tetra.NbPolyhedrons()
49 # Get Information About Mesh by GetMeshInfo
50 print "\nInformation about mesh by GetMeshInfo:"
51 info = smesh.GetMeshInfo(tetra)
52 keys = info.keys(); keys.sort()
54 print " %s : %d" % ( i, info[i] )
58 group = tetra.CreateEmptyGroup( SMESH.FACE, 'Group' )
59 nbAdd = group.Add( [ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76 ] )
61 # Get Information About Group by GetMeshInfo
62 print "\nInformation about group by GetMeshInfo:"
63 info = smesh.GetMeshInfo(group)
64 keys = info.keys(); keys.sort()
66 print " %s : %d" % ( i, info[i] )
70 Regular_1D_1_1 = tetra.Segment(geom=Face_1)
71 Nb_Segments_1 = Regular_1D_1_1.NumberOfSegments(5)
72 Nb_Segments_1.SetDistrType( 0 )
73 Quadrangle_2D = tetra.Quadrangle(geom=Face_1)
74 isDone = tetra.Compute()
75 submesh = Regular_1D_1_1.GetSubMesh()
77 # Get Information About SubMesh by GetMeshInfo
78 print "\nInformation about Submesh by GetMeshInfo:"
79 info = smesh.GetMeshInfo(submesh)
80 keys = info.keys(); keys.sort()
82 print " %s : %d" % ( i, info[i] )