1 # Sew Conform Free Borders
7 from salome.geom import geomBuilder
8 geompy = geomBuilder.New(salome.myStudy)
10 import SMESH, SALOMEDS
11 from salome.smesh import smeshBuilder
12 smesh = smeshBuilder.New(salome.myStudy)
13 import salome_notebook
16 # create two faces of the box
17 box1 = geompy.MakeBox(0., 0., -10., 20., 20., 15.)
18 facesList1 = geompy.SubShapeAll(box1, geompy.ShapeType["FACE"])
21 box2 = geompy.MakeBox(0., 5., 0., 20., 20., 15.)
22 facesList2 = geompy.SubShapeAll(box2, geompy.ShapeType["FACE"])
25 edgesList = geompy.SubShapeAll(face2, geompy.ShapeType["EDGE"])
28 aComp = geompy.MakeCompound([face1, face2])
29 geompy.addToStudy(aComp, "Two faces")
31 # create a mesh on two faces
32 mesh = smesh.Mesh(aComp, "Two faces : quadrangle mesh")
34 algo1D = mesh.Segment()
35 algo1D.NumberOfSegments(9)
36 algo2D = mesh.Quadrangle()
38 algo_local = mesh.Segment(edge1)
39 algo_local.Arithmetic1D(1, 4)
40 algo_local.Propagation()
44 # sew conform free borders
45 # FirstNodeID1, SecondNodeID1, LastNodeID1, FirstNodeID2, SecondNodeID2
46 mesh.SewConformFreeBorders(5, 45, 6, 3, 24)