X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FTools%2FYamsPlug%2FmonYamsPlugDialog.py;h=37a15f6cc591b6ded93d34d83430cbd8253c8c4c;hp=076030b594b516e6f31c58579a95bd7c843c41ec;hb=c445ce74d816a2f89830ef0527a7ef9e76144c5e;hpb=26a602248d57062471f1a9c6a2c8c7aaf7b1495f diff --git a/src/Tools/YamsPlug/monYamsPlugDialog.py b/src/Tools/YamsPlug/monYamsPlugDialog.py index 076030b59..37a15f6cc 100644 --- a/src/Tools/YamsPlug/monYamsPlugDialog.py +++ b/src/Tools/YamsPlug/monYamsPlugDialog.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2013 EDF R&D +# Copyright (C) 2007-2016 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. +# 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 @@ -22,6 +22,7 @@ # Modules Eficas import os, subprocess +import tempfile from YamsPlugDialog_ui import Ui_YamsPlugDialog from monViewText import MonViewText from PyQt4.QtGui import * @@ -430,7 +431,9 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): self.fichierIn="" def prepareFichier(self): - self.fichierIn="/tmp/ForSurfOpt_"+str(self.num)+".meshb" + self.fichierIn=tempfile.mktemp(suffix=".meshb",prefix="ForSurfOpt_") + if os.path.exists(self.fichierIn): + os.remove(self.fichierIn) self.__selectedMesh.ExportGMF(self.__selectedMesh, self.fichierIn, True) def PrepareLigneCommande(self): @@ -485,7 +488,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): if self.SP_Ridge.value() != 45.0 : self.commande+=" --ridge_angle %f"%self.SP_Ridge.value() if self.SP_MaxSize.value() != 100 : self.commande+=" --max_size %f" %self.SP_MaxSize.value() if self.SP_MinSize.value() != 5 : self.commande+=" --min_size %f" %self.SP_MinSize.value() - if self.SP_Gradation.value() != 1.3 : self.commande+=" --gradation %f" %self.SP_MaxSize.value() + if self.SP_Gradation.value() != 1.3 : self.commande+=" --gradation %f" %self.SP_Gradation.value() 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()