+# Copyright (C) 2016-2021 EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
from Zcracks import genereCrack, Zset
from Zcracks import utilityFunctions as uF
-import genereCube
+from . import genereCube
from math import sqrt
#tmpdir = "/local00/home/B27118/projets/Zcracks/Zcracks/casTests/tmpdir"
#if not os.path.isdir(tmpdir): os.mkdir(tmpdir)
-tmpdir=tempfile.mktemp(prefix='tmpZcracks')
-print "tmpdir=", tmpdir
+tmpdir=tempfile.mkdtemp(prefix='tmpZcracks')
+print("tmpdir=", tmpdir)
-meshgemsdir=os.environ('MESHGEMSHOME')
-if len(meshgemsdir) > 0:
- meshgems=string.split(meshgemsdir,os.sep)[-1]
- uF.removeFromSessionPath('LD_LIBRARY_PATH', meshgems)
+#meshgemsdir=os.environ('MESHGEMSHOME')
+#if len(meshgemsdir) > 0:
+ #meshgems=string.split(meshgemsdir,os.sep)[-1]
+ #uF.removeFromSessionPath('LD_LIBRARY_PATH', meshgems)
def LAUNCH(listCas=[]):
- if type(listCas)!=list: listCas=[listCas]
+ if not isinstance(listCas, list): listCas=[listCas]
N=20
L=1.
OK=[]
NOOK=[]
- for s in synthese.keys():
+ for s in synthese:
if synthese[s]:
OK.append(s)
else:
NOOK.append(s)
- print 'OK:'
- print OK
- print ' '
- print 'NOOK:'
- print NOOK
- print ' '
+ print('OK:')
+ print(OK)
+ print(' ')
+ print('NOOK:')
+ print(NOOK)
+ print(' ')
return(synthese)