X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fexamples%2Fdefining_hypotheses_ex08.py;fp=doc%2Fsalome%2Fexamples%2Fdefining_hypotheses_ex08.py;h=34fcbc37789f885feaa07b77de169fbcf349c28b;hb=54182913fbb9df65a3f4cc96f55db3618835ecd8;hp=43877342714d94b94d2549504d4762605193af08;hpb=1cd84a9d45de44f8fd0af83dbe52d83b47131e04;p=modules%2Fsmesh.git diff --git a/doc/salome/examples/defining_hypotheses_ex08.py b/doc/salome/examples/defining_hypotheses_ex08.py index 438773427..34fcbc377 100644 --- a/doc/salome/examples/defining_hypotheses_ex08.py +++ b/doc/salome/examples/defining_hypotheses_ex08.py @@ -1,16 +1,23 @@ # Propagation -from geompy import * -import smesh +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) # create a box -box = MakeBoxDXDYDZ(10., 10., 10.) -addToStudy(box, "Box") +box = geompy.MakeBoxDXDYDZ(10., 10., 10.) +geompy.addToStudy(box, "Box") # get one edge of the box to put local hypothesis on -p5 = MakeVertex(5., 0., 0.) -EdgeX = GetEdgeNearPoint(box, p5) -addToStudyInFather(box, EdgeX, "Edge [0,0,0 - 10,0,0]") +p5 = geompy.MakeVertex(5., 0., 0.) +EdgeX = geompy.GetEdgeNearPoint(box, p5) +geompy.addToStudyInFather(box, EdgeX, "Edge [0,0,0 - 10,0,0]") # create a hexahedral mesh on the box hexa = smesh.Mesh(box, "Box : hexahedrical mesh")