1 # Sew Meshes Border to Side
7 from salome.geom import geomBuilder
8 geompy = geomBuilder.New()
10 import SMESH, SALOMEDS
11 from salome.smesh import smeshBuilder
12 smesh = smeshBuilder.New()
14 # create two faces of a box
15 box1 = geompy.MakeBox(0., 0., -10., 30., 20., 25.)
16 facesList1 = geompy.SubShapeAll(box1, geompy.ShapeType["FACE"])
19 box2 = geompy.MakeBox(0., 5., 0., 20., 20., 15.)
20 facesList2 = geompy.SubShapeAll(box2, geompy.ShapeType["FACE"])
23 edgesList = geompy.SubShapeAll(face2, geompy.ShapeType["EDGE"])
26 aComp = geompy.MakeCompound([face1, face2])
27 geompy.addToStudy(aComp, "Two faces")
29 # create a mesh on two faces
30 mesh = smesh.Mesh(aComp, "Two faces : quadrangle mesh")
32 algo1D = mesh.Segment()
33 algo1D.NumberOfSegments(9)
34 algo2D = mesh.Quadrangle()
36 algo_local = mesh.Segment(edge1)
37 algo_local.Arithmetic1D(1, 4)
38 algo_local.Propagation()
43 # FirstNodeIDOnFreeBorder, SecondNodeIDOnFreeBorder, LastNodeIDOnFreeBorder,
44 # FirstNodeIDOnSide, LastNodeIDOnSide,
45 # CreatePolygons, CreatePolyedrs
46 mesh.SewBorderToSide(5, 45, 6, 113, 109, 0, 0)