]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
more
authorcvw <cvw>
Fri, 17 May 2013 15:28:51 +0000 (15:28 +0000)
committercvw <cvw>
Fri, 17 May 2013 15:28:51 +0000 (15:28 +0000)
src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py
src/Tools/MGCleanerPlug/MGCleanerPlugDialog.ui
src/Tools/MGCleanerPlug/MGCleanerplug_plugin.py
src/Tools/YamsPlug/yamsplug_plugin.py

index 43b882e1385b7ce311fe65bb78e892e347bafef3..59d64fa831b7eb063bba265f6d861c9067c56da1 100644 (file)
@@ -38,8 +38,10 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget):
     self.fichierIn=""
     self.fichierOut=""
     self.MeshIn=""
+    self.commande=""
     self.num=1
-
+    self.__selectedMesh=None
+    
     # complex whith QResources: not used
     # The icon are supposed to be located in the $SMESH_ROOT_DIR/share/salome/resources/smesh folder,
     # other solution could be in the same folder than this python module file:
@@ -154,27 +156,26 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget):
     self.num+=1
     return True
 
-  def PBSavePressed(self, NomHypo=False):
+  def PBSavePressed(self):
     from datetime import datetime
-    if NomHypo: 
-      text = "# Params for Hypothese : Hypo_MGCleaner_"+str(self.num - 1)+"\n"
-    else:
-      text = "# Save intermediate params \n" 
+    if not(self.PrepareLigneCommande()): return
+    text = "# MGCleaner hypothesis parameters\n" 
     text += "# Params for mesh : " +  self.LE_MeshSmesh.text() +"\n"
     text += datetime.now().strftime("# Date : %d/%m/%y %H:%M:%S\n")
+    text += "# Command : "+self.commande+"\n"
     text += self.getResumeData(separator="\n")
     text += "\n\n"
 
     try:
-        f=open(self.paramsFile,"a")
+      f=open(self.paramsFile,"a")
     except:
-        QMessageBox.warning(self, "File", "Unable to open "+self.paramsFile)
-        return
+      QMessageBox.warning(self, "File", "Unable to open "+self.paramsFile)
+      return
     try:
-        f.write(text)
+      f.write(text)
     except:
-        QMessageBox.warning(self, "File", "Unable to write "+self.paramsFile)
-        return
+      QMessageBox.warning(self, "File", "Unable to write "+self.paramsFile)
+      return
     f.close()
 
   def PBSaveHypPressed(self):
@@ -343,7 +344,8 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget):
     QMessageBox.warning( self, "Unknown File", "File doesn't exist")
 
   def meshSmeshNameChanged(self):
-    self.MeshIn=str(self.LE_MeshSmesh.text())
+    """only change by GUI mouse selection, otherwise clear"""
+    #self.MeshIn=str(self.LE_MeshSmesh.text())
     #print "meshSmeshNameChanged", self.MeshIn
     self.__selectedMesh = None
     self.MeshIn=""
index 14c0a5cd2063a56046a880870183c27f1cfd760d..8b853509dd08b15d41d6ded4fb8ebeeb553cfdf1 100644 (file)
@@ -435,7 +435,7 @@ Default is not to mesh planes.</string>
         </rect>
        </property>
        <property name="title">
-        <string>You can control </string>
+        <string>You can control</string>
        </property>
 #1
        <widget class="QDoubleSpinBox" name="SP_MinHoleSize">
index 6e3a9981c358bff4fb602b3f7dae31d664c4d41e..3178fa52a99e81dd82e6e8f86b7c3ef80c923df1 100644 (file)
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 # Copyright (C) 2006-2013  EDF R&D
 #
 # This library is free software; you can redistribute it and/or
@@ -34,11 +35,12 @@ def MGCleanerLct(context):
   from PyQt4.QtGui import QFileDialog
   from PyQt4.QtGui import QMessageBox
   
+  #prior test to avoid unnecessary user GUI work with ending crash
   try :
       os.environ['DISTENE_LICENCE_FILE_FOR_MGCLEANER']
   except:
-      QMessageBox.warning(None,"Products","Distene's products MeshGemCleaner are not installed")
+      QMessageBox.warning(None,"Products","Distene's product MeshGem Cleaner is not installed.\nrequired environment variable:\nDISTENE_LICENCE_FILE_FOR_MGCLEANER='/.../dlim8.var.sh'")
       return
   import MGCleanerMonPlugDialog
-  window=MGCleanerMonPlugDialog.getDialog() 
+  window=MGCleanerMonPlugDialog.getDialog()
   window.show()
index cc0791afbc70283f54d8d54c1134e8ebb12f0bd9..f61ed050f9225cff5fc8008d22243c83baf2d227 100644 (file)
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 # Copyright (C) 2006-2013  EDF R&D
 #
 # This library is free software; you can redistribute it and/or
@@ -34,11 +35,12 @@ def YamsLct(context):
   from PyQt4.QtGui import QFileDialog
   from PyQt4.QtGui import QMessageBox
   
+  #prior test to avoid unnecessary user GUI work with ending crash
   try :
       os.environ['DISTENE_LICENCE_FILE_FOR_YAMS']
   except:
-      QMessageBox.warning(None,"Products","Distene's products Yams are not installed")
+      QMessageBox.warning(None,"Products","Distene's product Yams is not installed.\nrequired environment variable:\nDISTENE_LICENCE_FILE_FOR_YAMS='/.../dlim8.var.sh'")
       return
   import monYamsPlugDialog
-  window=monYamsPlugDialog.getDialog() 
+  window=monYamsPlugDialog.getDialog()
   window.show()