import salome
from salome import *
-import geompy
+import GEOM
+from salome.geom import geomBuilder
+geompy = geomBuilder.New(salome.myStudy)
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
engineSmesh = salome.lcc.FindOrLoadComponent( "FactoryServer", "SMESH" )
smesh = smeshBuilder.New(salome.myStudy, engineSmesh)
except:
+ print "exception in smesh.py: instance creation failed"
smesh = None
pass
# load plugins and add dynamically generated methods to Mesh class,
# the same for for global variables declared by plug-ins
+from salome.smesh.smeshBuilder import *
from salome.smesh.smeshBuilder import Mesh, algoCreator
for pluginName in os.environ[ "SMESH_MeshersList" ].split( ":" ):
#
print """
===============================================================================
-WARNING: |
-Usage of smesh.py is deprecated in SALOME V7.2! |
-smesh.py will be removed in a future version! |
-TODO: |
-The following changes in your scripts are required to avoid this message: |
- |
-replace |
-------- |
- |
-import smesh, SMESH, SALOMEDS |
-smesh.SetCurrentStudy(theStudy) |
- |
-with |
----- |
- |
-import SMESH, SALOMEDS |
-from salome.smesh import smeshBuilder |
-smesh = smeshBuilder.New(theStudy) |
- |
-you also need to modify some lines where smeshBuilder is used instead of smesh|
- |
-algo=smesh.xxxx ==> algo.smeshBuilder.xxxx |
- |
+WARNING:
+Usage of smesh.py is deprecated in SALOME V7.2!
+smesh.py will be removed in a future version!
+TODO:
+The following changes in your scripts are required to avoid this message:
+
+replace
+-------
+
+import smesh, SMESH
+smesh.SetCurrentStudy(theStudy)
+
+with
+----
+
+import SMESH
+from salome.smesh import smeshBuilder
+smesh = smeshBuilder.New(salome.myStudy)
+
+you also need to modify some lines where smeshBuilder is used instead of smesh
+
+algo=smesh.xxxx ==> algo=smeshBuilder.xxxx
+
+See also SMESH User's Guide for more details
+
===============================================================================
"""