X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fgui%2FSMESH%2Finput%2Ftui_viewing_meshes.doc;h=7b2af8cb960d8d429e3a55ad68f2261ca0ba383f;hb=8a5f517e60c56d7ddbd35cfae74d69bac8edd36d;hp=59681c16b856af4458426206528e721d88eb313e;hpb=79b1ac2b6df9117f16f11d444b1f165d477a1813;p=modules%2Fsmesh.git
diff --git a/doc/salome/gui/SMESH/input/tui_viewing_meshes.doc b/doc/salome/gui/SMESH/input/tui_viewing_meshes.doc
index 59681c16b..7b2af8cb9 100644
--- a/doc/salome/gui/SMESH/input/tui_viewing_meshes.doc
+++ b/doc/salome/gui/SMESH/input/tui_viewing_meshes.doc
@@ -9,10 +9,12 @@
\code
import geompy
import smesh
+import SMESH
# create a box
box = geompy.MakeBox(0., 0., 0., 20., 20., 20.)
geompy.addToStudy(box, "box")
+[Face_1,Face_2,Face_3,Face_4,Face_5,Face_5] = geompy.SubShapeAll(box, geompy.ShapeType["FACE"])
# create a mesh
tetra = smesh.Mesh(box, "MeshBox")
@@ -26,10 +28,22 @@ algo2D.MaxElementArea(10.)
algo3D = tetra.Tetrahedron(smesh.NETGEN)
algo3D.MaxElementVolume(900.)
+# Creation of SubMesh
+Regular_1D_1_1 = tetra.Segment(geom=Face_1)
+Nb_Segments_1 = Regular_1D_1_1.NumberOfSegments(5)
+Nb_Segments_1.SetDistrType( 0 )
+Quadrangle_2D = tetra.Quadrangle(geom=Face_1)
+isDone = tetra.Compute()
+submesh = Regular_1D_1_1.GetSubMesh()
+
# compute the mesh
tetra.Compute()
-# print information about the mesh
+# Creation of group
+group = tetra.CreateEmptyGroup( SMESH.FACE, 'Group' )
+nbAdd = group.Add( [ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76 ] )
+
+# Print information about the mesh
print "Information about mesh:"
print "Number of nodes : ", tetra.NbNodes()
print "Number of edges : ", tetra.NbEdges()
@@ -43,5 +57,79 @@ print " hexahedrons : ", tetra.NbHexas()
print " prisms : ", tetra.NbPrisms()
print " pyramids : ", tetra.NbPyramids()
print " polyhedrons : ", tetra.NbPolyhedrons()
+
+# Get Information About Mesh by GetMeshInfo
+print "\nInformation about mesh by GetMeshInfo:"
+info = smesh.GetMeshInfo(tetra)
+keys = info.keys(); keys.sort()
+for i in keys:
+ print " %s : %d" % ( i, info[i] )
+ pass
+
+# Get Information About Group by GetMeshInfo
+print "\nInformation about group by GetMeshInfo:"
+info = smesh.GetMeshInfo(group)
+keys = info.keys(); keys.sort()
+for i in keys:
+ print " %s : %d" % ( i, info[i] )
+ pass
+
+# Get Information About SubMesh by GetMeshInfo
+print "\nInformation about Submesh by GetMeshInfo:"
+info = smesh.GetMeshInfo(submesh)
+keys = info.keys(); keys.sort()
+for i in keys:
+ print " %s : %d" % ( i, info[i] )
+ pass
\endcode
-*/
\ No newline at end of file
+
+
+
+
+\anchor tui_find_element_by_point
+