import salome
import geompy
-import StdMeshers
+
import SMESH
from SMESH import *
+import StdMeshers
+
+## import NETGENPlugin module if possible
+noNETGENPlugin = 0
+try:
+ import NETGENPlugin
+except ImportError:
+ noNETGENPlugin = 1
+ pass
+
+
## Types of algo
REGULAR = 1
PYTHON = 2
if algoType == MEFISTO:
self.Create(mesh, geom, "MEFISTO_2D")
elif algoType == NETGEN:
+ if noNETGENPlugin:
+ print "Warning: NETGENPlugin module has not been imported."
self.Create(mesh, geom, "NETGEN_2D", "libNETGENEngine.so")
self.algoType = algoType
import GHS3DPlugin
self.Create(mesh, geom, "GHS3D_3D" , "libGHS3DEngine.so")
elif algoType == FULL_NETGEN:
+ if noNETGENPlugin:
+ print "Warning: NETGENPlugin module has not been imported."
self.Create(mesh, geom, "NETGEN_2D3D", "libNETGENEngine.so")
self.algoType = algoType
## Private constructor.
def __init__(self, mesh, is3D, geom=0):
+ if noNETGENPlugin:
+ print "Warning: NETGENPlugin module has not been imported."
+
self.is3D = is3D
if is3D:
self.Create(mesh, geom, "NETGEN_2D3D", "libNETGENEngine.so")