1 # Borders at Multiconnection 2D
8 # create a compound of two glued boxes
9 box1 = geompy.MakeBox(0., 0., 0., 20., 20., 15.)
10 box2 = geompy.MakeTranslation(box1, 0., 20., 0)
11 comp = geompy.MakeCompound([box1, box2])
12 box = geompy.MakeGlueFaces(comp, 0.000001)
13 idbox = geompy.addToStudy(box, "box")
16 mesh = smesh.Mesh(box, "Box compound : 2D triangle mesh")
18 algo.NumberOfSegments(5)
19 algo = mesh.Triangle()
20 algo.MaxElementArea(20.)
23 # Criterion : MULTI-CONNECTION 2D = 3
26 aFilter = smesh.GetFilter(smesh.FACE, smesh.FT_MultiConnection2D, smesh.FT_EqualTo, nb_conn)
28 anIds = mesh.GetIdsFromFilter(aFilter)
31 print "Criterion: Borders at multi-connection 2D = ", nb_conn, " Nb = ", len(anIds)
33 for i in range(len(anIds)):
34 if j > 20: j = 1; print ""
41 aGroup = mesh.CreateEmptyGroup(smesh.FACE, "Borders at multi-connection 2D = " + `nb_conn`)
44 salome.sg.updateObjBrowser(1)