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)
14 # create two faces of the box
15 box1 = geompy.MakeBox(0., 0., 0., 20., 20., 15.)
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(4)
34 algo2D = mesh.Quadrangle()
36 algo_local = mesh.Segment(edge1)
37 algo_local.Arithmetic1D(1, 4)
38 algo_local.Propagation()
43 # FirstNodeID1, SecondNodeID1, LastNodeID1,
44 # FirstNodeID2, SecondNodeID2, LastNodeID2, CreatePolygons, CreatePolyedrs
45 mesh.SewFreeBorders(6, 21, 5, 1, 12, 3, 0, 0)