# -*- coding: utf-8 -*-
-# Copyright (C) 2007-2016 EDF R&D
+# Copyright (C) 2007-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
self.PB_MeshFile.setToolTip("source mesh from a file in disk")
#Ces parametres ne sont pas remis a rien par le clean
- self.paramsFile= os.path.abspath(os.path.join(os.environ["HOME"],".MGSurfOpt.dat"))
+ self.paramsFile= os.path.abspath(os.path.join(os.path.expanduser("~"),".MGSurfOpt.dat"))
self.LE_ParamsFile.setText(self.paramsFile)
self.LE_MeshFile.setText("")
self.LE_MeshSmesh.setText("")
v1.setDecimals(3)
self.SP_Tolerance.setValidator(v1)
self.SP_Tolerance.titleForWarning="Chordal Tolerance"
-
+
+ self.SP_MinSize.setDecimals(5)
+
self.resize(800, 600)
self.clean()
for slig in reversed(text.split(separator)):
lig=slig.strip()
#print "load ResumeData",lig
- if lig=="": continue #skip blanck lines
+ if lig=="": continue #skip blank lines
if lig[0]=="#": break
try:
tit,value=lig.split("=")
if fd.exec_():
infile = fd.selectedFiles()[0]
self.LE_MeshFile.setText(infile)
- self.fichierIn=str(infile).encode("latin-1")
+ self.fichierIn=str(infile)
self.MeshIn=""
self.LE_MeshSmesh.setText("")
+ self.__selectedMesh=None
def setParamsFileName(self):
fd = QFileDialog(self, "select a file", self.LE_ParamsFile.text(), "dat Files (*.dat);;All Files (*)")
if fd.exec_():
infile = fd.selectedFiles()[0]
self.LE_ParamsFile.setText(infile)
- self.paramsFile=str(infile).encode("latin-1")
+ self.paramsFile=str(infile)
def meshFileNameChanged(self):
self.fichierIn=str(self.LE_MeshFile.text())
except:
pass
- style = str(self.style).encode("latin-1")
+ style = str(self.style)
# Translation of old Yams options to new MG-SurfOpt options
if style == "0" :
self.commande+= " --optimisation only"
if self.SP_Memory.value() != 0 : self.commande+=" --max_memory %d" %self.SP_Memory.value()
if self.SP_Verbosity.value() != 3 : self.commande+=" --verbose %d" %self.SP_Verbosity.value()
- self.commande+=" --in " + self.fichierIn
- self.commande+=" --out " + self.fichierOut
+ self.commande+=' --in "' + self.fichierIn +'"'
+ self.commande+=' --out "' + self.fichierOut +'"'
print(self.commande)
return True