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, 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
+
===============================================================================
"""
smeshInst = None
engine = None
doLcc = False
+created = False
## This class allows to create, load or manipulate meshes
# It has a set of methods to create load or copy meshes, to combine several meshes.
global engine
global smeshInst
global doLcc
- #print "__new__", engine, smeshInst, doLcc
+ #print "==== __new__", engine, smeshInst, doLcc
if smeshInst is None:
# smesh engine is either retrieved from engine, or created
# FindOrLoadComponent called:
# 1. CORBA resolution of server
# 2. the __new__ method is called again
- #print "smeshInst = lcc.FindOrLoadComponent ", engine, smeshInst, doLcc
+ #print "==== smeshInst = lcc.FindOrLoadComponent ", engine, smeshInst, doLcc
smeshInst = salome.lcc.FindOrLoadComponent( "FactoryServer", "SMESH" )
else:
# FindOrLoadComponent not called
if smeshInst is None:
# smeshBuilder instance is created from lcc.FindOrLoadComponent
- #print "smeshInst = super(smeshBuilder,cls).__new__(cls) ", engine, smeshInst, doLcc
+ #print "==== smeshInst = super(smeshBuilder,cls).__new__(cls) ", engine, smeshInst, doLcc
smeshInst = super(smeshBuilder,cls).__new__(cls)
else:
# smesh engine not created: existing engine found
- #print "existing ", engine, smeshInst, doLcc
+ #print "==== existing ", engine, smeshInst, doLcc
pass
-
+ #print "====1 ", smeshInst
return smeshInst
+ #print "====2 ", smeshInst
return smeshInst
def __init__(self):
- #print "__init__"
- SMESH._objref_SMESH_Gen.__init__(self)
+ global created
+ #print "--------------- smeshbuilder __init__ ---", created
+ if not created:
+ created = True
+ SMESH._objref_SMESH_Gen.__init__(self)
## Dump component to the Python script
# This method overrides IDL function to allow default values for the parameters.