3 # Project triangles from one meshed face to another mesh on the same box
8 from salome.geom import geomBuilder
9 geompy = geomBuilder.New()
11 import SMESH, SALOMEDS
12 from salome.smesh import smeshBuilder
13 smesh = smeshBuilder.New()
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' )
31 # Make the source mesh triangulated by MEFISTO
32 src_mesh = smesh.Mesh(Face_1, "Source mesh")
33 src_mesh.Segment().NumberOfSegments(15)
37 # Mesh the target mesh using the algorithm Projection1D2D
38 tgt_mesh = smesh.Mesh(Face_2, "Target mesh")
39 tgt_mesh.Projection1D2D().SourceFace(Face_1,src_mesh)