# -*- 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
# Modules Eficas
import os, subprocess
+import tempfile
from YamsPlugDialog_ui import Ui_YamsPlugDialog
from monViewText import MonViewText
from PyQt4.QtGui import *
self.connect(self.LE_ParamsFile,SIGNAL("returnPressed()"),self.paramsFileNameChanged)
def PBHelpPressed(self):
+ import SalomePyQt
+ sgPyQt = SalomePyQt.SalomePyQt()
try :
mydir=os.environ["SMESH_ROOT_DIR"]
except Exception:
QMessageBox.warning(self, "Help", "Help unavailable $SMESH_ROOT_DIR not found")
return
- maDoc=mydir+"/share/doc/salome/gui/SMESH/yams/_downloads/mg-surfopt_user_manual.pdf"
- command="xdg-open "+maDoc+";"
- subprocess.call(command, shell=True)
+
+ maDoc=mydir+"/share/doc/salome/gui/SMESH/yams/index.html"
+ sgPyQt.helpContext(maDoc,"")
+
+ #maDoc=mydir+"/share/doc/salome/gui/SMESH/yams/_downloads/mg-surfopt_user_manual.pdf"
+ #command="xdg-open "+maDoc+";"
+ #subprocess.call(command, shell=True)
def PBOKPressed(self):
if not(self.PrepareLigneCommande()):
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):
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()
self.CB_Ridge.setChecked(True)
self.CB_Point.setChecked(True)
self.CB_SplitEdge.setChecked(False)
- self.SP_MaxSize.setProperty("value", -2.0)
- self.SP_MinSize.setProperty("value", -2.0)
+ self.SP_MaxSize.setProperty("value", 100)
+ self.SP_MinSize.setProperty("value", 5)
self.SP_Verbosity.setProperty("value", 3)
self.SP_Memory.setProperty("value", 0)
self.PBMeshSmeshPressed()
def getDialog():
"""
This function returns a singleton instance of the plugin dialog.
- It is mandatory in order to call show witout a parent ...
+ It is mandatory in order to call show without a parent ...
"""
global __dialog
if __dialog is None: