+# Copyright (C) 2016-2019 CEA/DEN, 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
+#
+
import sys, pickle, tempfile, shutil
from os import path, getpid, environ, remove, system
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
-import utilityFunctions as uF
-import genereCrack, Zset, output, zcracks_ui
+from . import utilityFunctions as uF
+from . import genereCrack, Zset, output, zcracks_ui
-from output import message, init
-from zcracks_ui import Ui_Zui
+from .output import message, init
+from .zcracks_ui import Ui_Zui
# ---------------------
if str(string).replace(' ','')=='':
out=[]
else:
- out=map(typ, str(string).split())
+ out=list(map(typ, str(string).split()))
return(out)
def addExtension(string, extension):
else:
obj.setText(self.data[self.lineEditNames[cont]])
- self.ui.CBQuad.setChecked(True if 'quad' in self.data.keys() and self.data['quad'] else False)
- self.ui.CBBarsoum.setChecked(True if 'barsoum' in self.data.keys() and self.data['barsoum'] else False)
- self.ui.CBIs2D.setChecked(True if 'is2D' in self.data.keys() and self.data['is2D'] else False)
- self.ui.CBRefine.setChecked(True if 'refine' in self.data.keys() and self.data['refine'] else False)
+ self.ui.CBQuad.setChecked(True if 'quad' in list(self.data.keys()) and self.data['quad'] else False)
+ self.ui.CBBarsoum.setChecked(True if 'barsoum' in list(self.data.keys()) and self.data['barsoum'] else False)
+ self.ui.CBIs2D.setChecked(True if 'is2D' in list(self.data.keys()) and self.data['is2D'] else False)
+ self.ui.CBRefine.setChecked(True if 'refine' in list(self.data.keys()) and self.data['refine'] else False)
self.setTableParameters()
if not test2:
message('A','No mesh file to visualize')
else:
- print medit+' %s' %meshFile2
+ print(medit+' %s' %meshFile2)
system(medit+' %s' %meshFile2)
else:
- print medit+' %s' %meshFile1
+ print(medit+' %s' %meshFile1)
system(medit+' %s' %meshFile1)
return()
else:
import SMESH, salome
#salome.salome_init()
- theStudy = salome.myStudy
from salome.smesh import smeshBuilder
- smesh = smeshBuilder.New(theStudy)
+ smesh = smeshBuilder.New()
([objetSain], status) = smesh.CreateMeshesFromMED(saneFile)