X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fexamples%2Fdefining_hypotheses_ex11.py;h=2510ed6f0b75275e70dd9dd6196aaaee79dc203f;hb=f3a96580b4f2cc2ef59e8dfcd8ed3e2bab8513af;hp=be550477883fd1d0a6056f90f8fecb4c872d1b0a;hpb=9a54694a0ab1e5cbc558a35c4606ceea4f7af2ef;p=modules%2Fsmesh.git diff --git a/doc/salome/examples/defining_hypotheses_ex11.py b/doc/salome/examples/defining_hypotheses_ex11.py index be5504778..2510ed6f0 100644 --- a/doc/salome/examples/defining_hypotheses_ex11.py +++ b/doc/salome/examples/defining_hypotheses_ex11.py @@ -2,7 +2,15 @@ # Project triangles from one meshed face to another mesh on the same box -from smesh import * +import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) + +import SMESH, SALOMEDS +from salome.smesh import smeshBuilder +smesh = smeshBuilder.New(salome.myStudy) # Prepare geometry @@ -19,13 +27,14 @@ geompy.addToStudy( box, 'box' ) geompy.addToStudyInFather( box, Face_1, 'Face_1' ) geompy.addToStudyInFather( box, Face_2, 'Face_2' ) -# Make the source mesh with Netgem2D -src_mesh = Mesh(Face_1, "Source mesh") + +# Make the source mesh triangulated by MEFISTO +src_mesh = smesh.Mesh(Face_1, "Source mesh") src_mesh.Segment().NumberOfSegments(15) src_mesh.Triangle() src_mesh.Compute() -# Mesh the target mesh using the algoritm Projection1D2D +# Mesh the target mesh using the algorithm Projection1D2D tgt_mesh = smesh.Mesh(Face_2, "Target mesh") tgt_mesh.Projection1D2D().SourceFace(Face_1,src_mesh) tgt_mesh.Compute()