mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-13 10:10:34 +05:00
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:
parent
8a7faf3ee5
commit
c314469058
@ -31,13 +31,22 @@ import salome
|
|||||||
import geompyDC
|
import geompyDC
|
||||||
from salome import *
|
from salome import *
|
||||||
|
|
||||||
|
# retrieve GEOM engine in try/except block
|
||||||
|
# to avoid problems in some cases, e.g. when generating documentation
|
||||||
|
try:
|
||||||
|
# get GEOM engine
|
||||||
geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
|
geom = lcc.FindOrLoadComponent( "FactoryServer", "GEOM" )
|
||||||
|
# initialize GEOM with current study
|
||||||
geom.init_geom( salome.myStudy )
|
geom.init_geom( salome.myStudy )
|
||||||
|
|
||||||
# Export the methods of geompyDC
|
# export the methods of geompyDC
|
||||||
for k in dir( geom ):
|
for k in dir( geom ):
|
||||||
if k[0] == '_': continue
|
if k[0] == '_': continue
|
||||||
globals()[k] = getattr( geom, k )
|
globals()[k] = getattr( geom, k )
|
||||||
|
pass
|
||||||
del k
|
del k
|
||||||
from geompyDC import ShapeType, GEOM, kind, info, PackData, ReadTexture, EnumToLong
|
from geompyDC import ShapeType, GEOM, kind, info, PackData, ReadTexture, EnumToLong
|
||||||
|
pass
|
||||||
|
except:
|
||||||
|
geom = None
|
||||||
|
pass
|
||||||
|
@ -73,9 +73,14 @@
|
|||||||
|
|
||||||
## @}
|
## @}
|
||||||
|
|
||||||
|
# initialize SALOME session in try/except block
|
||||||
|
# to avoid problems in some cases, e.g. when generating documentation
|
||||||
|
try:
|
||||||
import salome
|
import salome
|
||||||
salome.salome_init()
|
salome.salome_init()
|
||||||
from salome import *
|
from salome import *
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
from salome_notebook import *
|
from salome_notebook import *
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user