Salome HOME
-algo=smesh.xxxx ==> algo.smeshBuilder.xxxx
[modules/smesh.git] / src / SMESH_SWIG / smesh.py
index ab9a6f031c90f85558387f9722ba7447a7c03258..9fb73ab1168d82e16a2cda765c513c8f1f69b7d2 100644 (file)
@@ -43,11 +43,13 @@ try:
     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( ":" ):
     #
@@ -85,28 +87,30 @@ if smesh:
 
 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
+
 ===============================================================================
 """