8 # create open shell: a box without one plane
9 box = geompy.MakeBox(0., 0., 0., 20., 20., 15.)
10 FaceList = geompy.SubShapeAll(box, geompy.ShapeType["FACE"])
11 FaceList.remove(FaceList[5])
12 box = geompy.MakeShell(FaceList)
13 idbox = geompy.addToStudy(box, "box")
16 mesh = smesh.Mesh(box, "Mesh_Length_1D")
18 algo.NumberOfSegments(5)
19 algo = mesh.Triangle()
20 algo.MaxElementArea(20.)
23 # Criterion : Length > 3.
26 aFilter = smesh.GetFilter(smesh.EDGE, smesh.FT_Length, smesh.FT_MoreThan, length_margin)
27 anIds = mesh.GetIdsFromFilter(aFilter)
30 print "Criterion: Edges length > ", length_margin, " Nb = ", len(anIds)
32 for i in range(len(anIds)):
33 if j > 20: j = 1; print ""
40 aGroup = mesh.GetMesh().CreateGroup(smesh.EDGE, "Edges with length > " + `length_margin`)
43 salome.sg.updateObjBrowser(1)