3 # Project triangles from one meshed face to another mesh on the same box
8 from salome.geom import geomBuilder
9 geompy = geomBuilder.New(salome.myStudy)
11 import SMESH, SALOMEDS
12 from salome.smesh import smeshBuilder
13 smesh = smeshBuilder.New(salome.myStudy)
18 box = geompy.MakeBoxDXDYDZ(100, 100, 100)
20 # Get geom faces to mesh with triangles in the 1ts and 2nd meshes
21 faces = geompy.SubShapeAll(box, geompy.ShapeType["FACE"])
22 # 2 adjacent faces of the box
26 geompy.addToStudy( box, 'box' )
27 geompy.addToStudyInFather( box, Face_1, 'Face_1' )
28 geompy.addToStudyInFather( box, Face_2, 'Face_2' )
30 # Make the source mesh with Netgem2D
31 src_mesh = smesh.Mesh(Face_1, "Source mesh")
32 src_mesh.Segment().NumberOfSegments(15)
36 # Mesh the target mesh using the algoritm Projection1D2D
37 tgt_mesh = smesh.Mesh(Face_2, "Target mesh")
38 tgt_mesh.Projection1D2D().SourceFace(Face_1,src_mesh)