X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fexamples%2Fdefining_hypotheses_ex11.py;h=a57d0781dd5784c335893ca02d172433589e2f43;hb=13e344b8720248d920a39505004bb9a889a0b2d7;hp=961a56d9cdbf3852e445af5d1f99a6e39fb17133;hpb=54182913fbb9df65a3f4cc96f55db3618835ecd8;p=modules%2Fsmesh.git diff --git a/doc/salome/examples/defining_hypotheses_ex11.py b/doc/salome/examples/defining_hypotheses_ex11.py index 961a56d9c..a57d0781d 100644 --- a/doc/salome/examples/defining_hypotheses_ex11.py +++ b/doc/salome/examples/defining_hypotheses_ex11.py @@ -6,11 +6,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Prepare geometry @@ -27,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 + +# 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()