X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fexamples%2Fcartesian_algo.py;h=dc0dc23cf585c29e8b665ecc7e4088d4d6c8fa1f;hb=2a9fe7357b58b3fb6610a40660aec2a12caaff5e;hp=b15455f2824bec19b4d8a553cb3f01cbe5cbf617;hpb=9a54694a0ab1e5cbc558a35c4606ceea4f7af2ef;p=modules%2Fsmesh.git diff --git a/doc/salome/examples/cartesian_algo.py b/doc/salome/examples/cartesian_algo.py index b15455f28..dc0dc23cf 100644 --- a/doc/salome/examples/cartesian_algo.py +++ b/doc/salome/examples/cartesian_algo.py @@ -1,14 +1,24 @@ # Usage of Body Fitting algorithm -from smesh import * -SetCurrentStudy(salome.myStudy) + +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) +import salome_notebook + # create a sphere sphere = geompy.MakeSphereR( 50 ) geompy.addToStudy( sphere, "sphere" ) # create a mesh and assign a "Body Fitting" algo -mesh = Mesh( sphere ) +mesh = smesh.Mesh( sphere ) cartAlgo = mesh.BodyFitted() # define a cartesian grid using Coordinates