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 import salome
00025 import geompy
00026 import smesh
00027
00028
00029
00030
00031 box = geompy.MakeBox(0., 0., 0., 10., 20., 30.)
00032 subShapeList = geompy.SubShapeAll(box, geompy.ShapeType["FACE"])
00033
00034 FaceList = []
00035 for i in range( 5 ):
00036 FaceList.append( subShapeList[ i ] )
00037
00038 aComp = geompy.MakeCompound( FaceList )
00039 aBox = geompy.Sew( aComp, 1. )
00040 idbox = geompy.addToStudy( aBox, "box" )
00041
00042 aBox = salome.IDToObject( idbox )
00043
00044
00045 smesh.SetCurrentStudy(salome.myStudy)
00046
00047 mesh = smesh.Mesh(aBox, "Mesh_freebord")
00048
00049 algoReg = mesh.Segment()
00050 hypNbSeg = algoReg.NumberOfSegments(5)
00051
00052 algoMef = mesh.Triangle()
00053 hypArea = algoMef.MaxElementArea(20)
00054
00055
00056 mesh.Compute()
00057
00058
00059
00060
00061 aCriterion = smesh.GetCriterion(smesh.EDGE, smesh.FT_FreeEdges)
00062
00063 aGroup = mesh.MakeGroupByCriterion("Free edges", aCriterion)
00064
00065 anIds = aGroup.GetIDs()
00066
00067
00068 print "Criterion: Free edges Nb = ", len( anIds )
00069 for i in range( len( anIds ) ):
00070 print anIds[ i ]
00071
00072 salome.sg.updateObjBrowser(1)