2 # Project triangles from one meshed face to another mesh on the same box
5 salome.salome_init_without_session()
7 from salome.geom import geomBuilder
8 from salome.smesh import smeshBuilder
10 geom_builder = geomBuilder.New()
11 smesh_builder = smeshBuilder.New()
16 box = geom_builder.MakeBoxDXDYDZ(100, 100, 100)
18 # Get geom faces to mesh with triangles in the 1ts and 2nd meshes
19 faces = geom_builder.SubShapeAll(box, geom_builder.ShapeType["FACE"])
20 # 2 adjacent faces of the box
24 geom_builder.addToStudy( box, 'box' )
25 geom_builder.addToStudyInFather( box, Face_1, 'Face_1' )
26 geom_builder.addToStudyInFather( box, Face_2, 'Face_2' )
28 # Make the source mesh triangulated by MEFISTO
29 src_mesh = smesh_builder.Mesh(Face_1, "Source mesh")
30 src_mesh.Segment().NumberOfSegments(15)
34 # Mesh the target mesh using the algorithm Projection1D2D
35 tgt_mesh = smesh_builder.Mesh(Face_2, "Target mesh")
36 tgt_mesh.Projection1D2D().SourceFace(Face_1,src_mesh)