X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FTools%2FYamsPlug%2FmonYamsPlugDialog.py;h=dba2a29cc5d4d5df14fb5d36a9b7c096f507c46e;hb=HEAD;hp=81bdfdf79e8ba31d2aded776d76743dc13a3a46f;hpb=385d4cede5f752d0eec26c306f3b5e14511e2a3d;p=modules%2Fsmesh.git diff --git a/src/Tools/YamsPlug/monYamsPlugDialog.py b/src/Tools/YamsPlug/monYamsPlugDialog.py index 81bdfdf79..49e5d4190 100644 --- a/src/Tools/YamsPlug/monYamsPlugDialog.py +++ b/src/Tools/YamsPlug/monYamsPlugDialog.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2019 EDF R&D +# Copyright (C) 2007-2024 CEA, EDF # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -69,7 +69,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): 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("") @@ -80,7 +80,9 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): 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() @@ -334,7 +336,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): 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("=") @@ -543,8 +545,13 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): self.commande+=' --in "' + self.fichierIn +'"' self.commande+=' --out "' + self.fichierOut +'"' - - print(self.commande) + + import SMeshHelper + key = SMeshHelper.GetMGLicenseKey( self.fichierIn ) + if key != "0": + self.commande+=' --key ' + key + + if verbose: print("INFO: MG-SurfOpt command:\n %s" % self.commande) return True def clean(self):