0021308: EDF 1923 SMESH: Remove hard-coded dependency of the external mesh plugins from the SMESH module

* Improve documentation for meshing plug-ins (in particular, dynamically added methods)
This commit is contained in:
vsr 2012-08-22 05:52:38 +00:00
parent 8a7faf3ee5
commit c314469058
2 changed files with 26 additions and 12 deletions

View File

@ -31,13 +31,22 @@ import salome
import geompyDC import geompyDC
from salome import * from salome import *
geom = lcc.FindOrLoadComponent("FactoryServer", "GEOM") # retrieve GEOM engine in try/except block
geom.init_geom(salome.myStudy) # to avoid problems in some cases, e.g. when generating documentation
try:
# Export the methods of geompyDC # get GEOM engine
for k in dir(geom): geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
if k[0] == '_':continue # initialize GEOM with current study
globals()[k]=getattr(geom,k) geom.init_geom( salome.myStudy )
del k
from geompyDC import ShapeType, GEOM, kind, info, PackData, ReadTexture, EnumToLong
# export the methods of geompyDC
for k in dir( geom ):
if k[0] == '_': continue
globals()[k] = getattr( geom, k )
pass
del k
from geompyDC import ShapeType, GEOM, kind, info, PackData, ReadTexture, EnumToLong
pass
except:
geom = None
pass

View File

@ -73,9 +73,14 @@
## @} ## @}
import salome # initialize SALOME session in try/except block
salome.salome_init() # to avoid problems in some cases, e.g. when generating documentation
from salome import * try:
import salome
salome.salome_init()
from salome import *
except:
pass
from salome_notebook import * from salome_notebook import *