From f99f2e7e520e83ec38381d1cd72ef8c8cf8a6111 Mon Sep 17 00:00:00 2001 From: Christophe Bourcier Date: Tue, 8 Jan 2019 15:15:24 +0100 Subject: [PATCH 01/12] Fix error in SurfOpt plugin caused by a decode() unneeded --- src/Tools/YamsPlug/monYamsPlugDialog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tools/YamsPlug/monYamsPlugDialog.py b/src/Tools/YamsPlug/monYamsPlugDialog.py index a28ca5129..4aac5cf7c 100644 --- a/src/Tools/YamsPlug/monYamsPlugDialog.py +++ b/src/Tools/YamsPlug/monYamsPlugDialog.py @@ -522,7 +522,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): self.commande+= " -O G" # This option has not been updated to the new option style yet deb=os.path.splitext(self.fichierIn) - self.fichierOut=deb[0].decode() + "_output.mesh" + self.fichierOut=deb[0] + "_output.mesh" tolerance=self.SP_toStr(self.SP_Tolerance) if not self.RB_Absolute.isChecked(): @@ -540,7 +540,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): 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.decode() + self.commande+=" --in " + self.fichierIn self.commande+=" --out " + self.fichierOut print(self.commande) From f5882cb24088610fb4f7d1cbcd41cb19a71bed2c Mon Sep 17 00:00:00 2001 From: Christophe Bourcier Date: Tue, 8 Jan 2019 15:16:15 +0100 Subject: [PATCH 02/12] Fix output formatting of Cleaner and SurfOpt plugins so that new lines are printed --- src/Tools/MGCleanerPlug/MGCleanerMonViewText.py | 5 +++-- src/Tools/YamsPlug/monViewText.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py b/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py index 99e322d31..393c9e209 100644 --- a/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py +++ b/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py @@ -120,11 +120,12 @@ class MGCleanerMonViewText(Ui_ViewExe, QDialog): def readFromStdErr(self): a=self.monExe.readAllStandardError() - self.TB_Exe.append(str(a.data())) + aa=a.data().decode(errors='ignore') + self.TB_Exe.append(aa) def readFromStdOut(self) : a=self.monExe.readAllStandardOutput() - aa=str(a.data()) + aa=a.data().decode(errors='ignore') self.TB_Exe.append(aa) def finished(self): diff --git a/src/Tools/YamsPlug/monViewText.py b/src/Tools/YamsPlug/monViewText.py index 3109bfe8a..84d640e8e 100644 --- a/src/Tools/YamsPlug/monViewText.py +++ b/src/Tools/YamsPlug/monViewText.py @@ -107,11 +107,12 @@ class MonViewText(Ui_ViewExe, QDialog): def readFromStdErr(self): a=self.monExe.readAllStandardError() - self.TB_Exe.append(str(a.data().encode())) + aa=a.data().decode(errors='ignore') + self.TB_Exe.append(aa) def readFromStdOut(self) : a=self.monExe.readAllStandardOutput() - aa=str(a.data()) + aa=a.data().decode(errors='ignore') self.TB_Exe.append(aa) def finished(self): From a38b958b273ded56f74a783859e0781aa49e8787 Mon Sep 17 00:00:00 2001 From: Christophe Bourcier Date: Mon, 14 Jan 2019 12:18:20 +0100 Subject: [PATCH 03/12] More fixes in Cleaner and SurfOpt: - fix decode error in case a GMF file is selected - fix save log error - fix wrong mesh used when changing from mesh object to mesh file. --- src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py | 5 +++-- src/Tools/MGCleanerPlug/MGCleanerMonViewText.py | 15 +++++++-------- src/Tools/YamsPlug/monViewText.py | 8 ++++---- src/Tools/YamsPlug/monYamsPlugDialog.py | 7 ++++--- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py b/src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py index 19d1c41ef..0818f537c 100644 --- a/src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py +++ b/src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py @@ -449,16 +449,17 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget): 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()) diff --git a/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py b/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py index 393c9e209..f2647a3fb 100644 --- a/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py +++ b/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py @@ -106,17 +106,16 @@ class MGCleanerMonViewText(Ui_ViewExe, QDialog): def saveFile(self): #recuperation du nom du fichier savedir=os.environ['HOME'] - fn = QFileDialog.getSaveFileName(None, self.trUtf8("Save File"),savedir) - if fn.isNull() : return + fn, mask = QFileDialog.getSaveFileName(None,"Save File",savedir) + if not fn: return ulfile = os.path.abspath(str(fn)) try: - f = open(fn, 'wb') - f.write(str(self.TB_Exe.toPlainText())) - f.close() + f = open(fn, 'wb') + f.write(self.TB_Exe.toPlainText().encode("utf-8")) + f.close() except IOError as why: - QMessageBox.critical(self, self.trUtf8('Save File'), - self.trUtf8('The file %1 could not be saved.
Reason: %2') - .arg(str(fn)).arg(str(why))) + QMessageBox.critical(self, 'Save File', + 'The file %s could not be saved.
Reason: %s'%(str(fn), str(why))) def readFromStdErr(self): a=self.monExe.readAllStandardError() diff --git a/src/Tools/YamsPlug/monViewText.py b/src/Tools/YamsPlug/monViewText.py index 84d640e8e..9d92a0c55 100644 --- a/src/Tools/YamsPlug/monViewText.py +++ b/src/Tools/YamsPlug/monViewText.py @@ -94,16 +94,16 @@ class MonViewText(Ui_ViewExe, QDialog): def saveFile(self): #recuperation du nom du fichier savedir=os.environ['HOME'] - fn = QFileDialog.getSaveFileName(None,"Save File",savedir) - if fn.isNull() : return + fn, mask = QFileDialog.getSaveFileName(None,"Save File",savedir) + if not fn: return ulfile = os.path.abspath(str(fn)) try: f = open(fn, 'wb') - f.write(str(self.TB_Exe.toPlainText())) + f.write(self.TB_Exe.toPlainText().encode("utf-8")) f.close() except IOError as why: QMessageBox.critical(self, 'Save File', - 'The file %1 could not be saved.
Reason: %2'%(str(fn), str(why))) + 'The file %s could not be saved.
Reason: %s'%(str(fn), str(why))) def readFromStdErr(self): a=self.monExe.readAllStandardError() diff --git a/src/Tools/YamsPlug/monYamsPlugDialog.py b/src/Tools/YamsPlug/monYamsPlugDialog.py index 4aac5cf7c..54298c2ff 100644 --- a/src/Tools/YamsPlug/monYamsPlugDialog.py +++ b/src/Tools/YamsPlug/monYamsPlugDialog.py @@ -413,16 +413,17 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): 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()) @@ -504,7 +505,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): 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" From a9e82592556a4568aab03c07c7116dbeb4366da1 Mon Sep 17 00:00:00 2001 From: Christophe Bourcier Date: Wed, 16 Jan 2019 14:15:48 +0100 Subject: [PATCH 04/12] Fix to allow Cleaner and SurfOpt to deal with directory with spaces --- src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py | 5 ++--- src/Tools/YamsPlug/monYamsPlugDialog.py | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py b/src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py index 0818f537c..c56cb30f0 100644 --- a/src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py +++ b/src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py @@ -553,11 +553,10 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget): self.commande="mg-cleaner.exe" verbosity=str(self.SP_Verbosity.value()) self.commande+=" --verbose " + verbosity - self.commande+=" --in " + self.fichierIn - #print "self.fichierIn",self.fichierIn,type(self.fichierIn) + self.commande+=' --in "' + self.fichierIn+'"' deb=os.path.splitext(str(self.fichierIn)) self.fichierOut=deb[0] + "_fix.mesh" - self.commande+=" --out "+self.fichierOut + self.commande+=' --out "'+self.fichierOut+'"' if self.RB_Fix1.isChecked(): self.commande+=" --mode fix" else: diff --git a/src/Tools/YamsPlug/monYamsPlugDialog.py b/src/Tools/YamsPlug/monYamsPlugDialog.py index 54298c2ff..a09ecbb8d 100644 --- a/src/Tools/YamsPlug/monYamsPlugDialog.py +++ b/src/Tools/YamsPlug/monYamsPlugDialog.py @@ -541,8 +541,8 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): 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 From c9afb20072e07eeea02c562e119a69e854d60ffb Mon Sep 17 00:00:00 2001 From: Christophe Bourcier Date: Wed, 16 Jan 2019 14:18:24 +0100 Subject: [PATCH 05/12] Fix to allow Cleaner and SurfOpt to be launched on files with special characters on Windows. Do not use an intermediate bat file to prevent bad unicode conversions. --- .../MGCleanerPlug/MGCleanerMonViewText.py | 29 ++----------------- src/Tools/YamsPlug/monViewText.py | 29 ++----------------- 2 files changed, 6 insertions(+), 52 deletions(-) diff --git a/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py b/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py index f2647a3fb..0271821e3 100644 --- a/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py +++ b/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py @@ -67,33 +67,10 @@ class MGCleanerMonViewText(Ui_ViewExe, QDialog): PP.pprint([str(i) for i in sorted(self.monExe.processEnvironment().toStringList()) if 'DISTENE' in i]) """ - cmds = '' - ext = '' - if sys.platform == "win32": - if os.path.exists(self.parent().fichierOut): - cmds += 'del %s\n' % self.parent().fichierOut - ext = '.bat' - else: - cmds += '#!/bin/bash\n' - cmds += 'pwd\n' - #cmds += 'which mg-cleaner.exe\n' - cmds += 'echo "DISTENE_LICENSE_FILE="$DISTENE_LICENSE_FILE\n' - cmds += 'echo "DLIM8VAR="$DLIM8VAR\n' - cmds += 'rm -f %s\n' % self.parent().fichierOut - ext = '.bash' - - cmds += 'echo %s\n' % txt #to see what is compute command - cmds += txt+'\n' - cmds += 'echo "END_OF_MGCleaner"\n' + if os.path.exists(self.parent().fichierOut): + os.remove(self.parent().fichierOut) - nomFichier = os.path.splitext(self.parent().fichierOut)[0] + ext - with open(nomFichier, 'w') as f: - f.write(cmds) - self.make_executable(nomFichier) - - if verbose: print(("INFO: MGCleaner launch script file: %s" % nomFichier)) - - self.monExe.start(nomFichier) + self.monExe.start(txt) self.monExe.closeWriteChannel() self.enregistreResultatsDone=False self.show() diff --git a/src/Tools/YamsPlug/monViewText.py b/src/Tools/YamsPlug/monViewText.py index 9d92a0c55..afbc87e3b 100644 --- a/src/Tools/YamsPlug/monViewText.py +++ b/src/Tools/YamsPlug/monViewText.py @@ -55,33 +55,10 @@ class MonViewText(Ui_ViewExe, QDialog): self.monExe.readyReadStandardError.connect( self.readFromStdErr ) self.monExe.finished.connect( self.finished ) - cmds = '' - ext = '' - if sys.platform == "win32": - if os.path.exists(self.parent().fichierOut): - cmds += 'del %s\n' % self.parent().fichierOut - ext = '.bat' - else: - cmds += '#!/bin/bash\n' - cmds += 'pwd\n' - #cmds += 'which mg-surfopt.exe\n' - cmds += 'echo "DISTENE_LICENSE_FILE="$DISTENE_LICENSE_FILE\n' - cmds += 'echo "DLIM8VAR="$DLIM8VAR\n' - cmds += 'rm -f %s\n' % self.parent().fichierOut - ext = '.bash' + if os.path.exists(self.parent().fichierOut): + os.remove(self.parent().fichierOut) - cmds += 'echo %s\n' % txt #to see what is compute command - cmds += txt+'\n' - cmds += 'echo "END_OF_MGSurfOpt"\n' - - nomFichier = os.path.splitext(self.parent().fichierOut)[0] + ext - with open(nomFichier, 'w') as f: - f.write(cmds) - self.make_executable(nomFichier) - - if verbose: print(("INFO: MGSurfOpt launch script file: %s" % nomFichier)) - - self.monExe.start(nomFichier) + self.monExe.start(txt) self.monExe.closeWriteChannel() self.enregistreResultatsDone=False self.show() From 47242d59348ca4a197c90b00459cfbd6527c2d88 Mon Sep 17 00:00:00 2001 From: Christophe Bourcier Date: Tue, 22 Jan 2019 15:32:06 +0100 Subject: [PATCH 06/12] Improve behaviour of Cleaner and SurfOpt in case of error and add a cancel button. --- .../MGCleanerPlug/MGCleanerMonViewText.py | 54 +++++++++++-------- src/Tools/MGCleanerPlug/MGCleanerViewText.ui | 11 +++- src/Tools/YamsPlug/ViewText.ui | 13 +++-- src/Tools/YamsPlug/monViewText.py | 37 ++++++++++--- 4 files changed, 82 insertions(+), 33 deletions(-) diff --git a/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py b/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py index 0271821e3..d0cf51e07 100644 --- a/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py +++ b/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py @@ -37,19 +37,24 @@ verbose = True force = os.getenv("FORCE_DISTENE_LICENSE_FILE") if force != None: - os.environ["DISTENE_LICENSE_FILE"] = force - os.environ["DLIM8VAR"] = "NOTHING" + os.environ["DISTENE_LICENSE_FILE"] = force + os.environ["DLIM8VAR"] = "NOTHING" class MGCleanerMonViewText(Ui_ViewExe, QDialog): """ Classe permettant la visualisation de texte """ - def __init__(self, parent, txt, ): + def __init__(self, parent, txt): QDialog.__init__(self,parent) self.setupUi(self) self.resize( QSize(1000,600).expandedTo(self.minimumSizeHint()) ) - #self.connect( self.PB_Ok,SIGNAL("clicked()"), self, SLOT("close()") ) self.PB_Ok.clicked.connect( self.theClose ) + # Button OK is disabled until computation is finished + self.PB_Ok.setEnabled(False) + # Button cancel allows to kill the computation + # It is disabled when the computation is finished + self.PB_Cancel.clicked.connect( self.cancelComputation ) + self.PB_Cancel.setToolTip("Cancel computation") self.PB_Save.clicked.connect( self.saveFile ) self.PB_Save.setToolTip("Save trace in log file") self.PB_Ok.setToolTip("Close view") @@ -58,21 +63,15 @@ class MGCleanerMonViewText(Ui_ViewExe, QDialog): self.monExe.readyReadStandardOutput.connect( self.readFromStdOut ) self.monExe.readyReadStandardError.connect( self.readFromStdErr ) self.monExe.finished.connect( self.finished ) + self.monExe.errorOccurred.connect( self.errorOccured ) - """ for test set environment - env = QProcessEnvironment().systemEnvironment() - env.insert("HELLO", "bonjour") #Add an environment variable for debug - self.monExe.setProcessEnvironment(env) - if verbose: - PP.pprint([str(i) for i in sorted(self.monExe.processEnvironment().toStringList()) if 'DISTENE' in i]) - """ - if os.path.exists(self.parent().fichierOut): os.remove(self.parent().fichierOut) self.monExe.start(txt) self.monExe.closeWriteChannel() - self.enregistreResultatsDone=False + self.hasBeenCanceled = False + self.anErrorOccured = False self.show() def make_executable(self, path): @@ -103,13 +102,26 @@ class MGCleanerMonViewText(Ui_ViewExe, QDialog): a=self.monExe.readAllStandardOutput() aa=a.data().decode(errors='ignore') self.TB_Exe.append(aa) - + def finished(self): - self.parent().enregistreResultat() - self.enregistreResultatsDone=True - + self.PB_Ok.setEnabled(True) + self.PB_Cancel.setEnabled(False) + exit_code = self.monExe.exitCode() + if exit_code == 0 and not self.anErrorOccured: + self.parent().enregistreResultat() + elif not self.hasBeenCanceled: + QMessageBox.critical(self, 'Computation failed', + 'The computation has failed.
Please, check the log message.') + pass + + def errorOccured(self): + # for instance if the executable is not found + self.anErrorOccured = True + self.finished() + + def cancelComputation(self): + self.hasBeenCanceled = True + self.monExe.kill() + def theClose(self): - if not self.enregistreResultatsDone: - self.parent().enregistreResultat() - self.enregistreResultatsDone=True - self.close() + self.close() diff --git a/src/Tools/MGCleanerPlug/MGCleanerViewText.ui b/src/Tools/MGCleanerPlug/MGCleanerViewText.ui index 8bec19a12..a2cd43e61 100644 --- a/src/Tools/MGCleanerPlug/MGCleanerViewText.ui +++ b/src/Tools/MGCleanerPlug/MGCleanerViewText.ui @@ -14,7 +14,7 @@ Run MGCleaner - + @@ -25,9 +25,16 @@ + + + Cancel + + + + - Save + Save log diff --git a/src/Tools/YamsPlug/ViewText.ui b/src/Tools/YamsPlug/ViewText.ui index 18fa63e46..a2cd43e61 100644 --- a/src/Tools/YamsPlug/ViewText.ui +++ b/src/Tools/YamsPlug/ViewText.ui @@ -11,10 +11,10 @@ - Run Yams + Run MGCleaner - + @@ -25,9 +25,16 @@ + + + Cancel + + + + - Save + Save log diff --git a/src/Tools/YamsPlug/monViewText.py b/src/Tools/YamsPlug/monViewText.py index afbc87e3b..c165085d0 100644 --- a/src/Tools/YamsPlug/monViewText.py +++ b/src/Tools/YamsPlug/monViewText.py @@ -29,6 +29,7 @@ import pprint as PP #pretty print from qtsalome import * # Import des panels + from ViewText_ui import Ui_ViewExe verbose = True @@ -46,21 +47,30 @@ class MonViewText(Ui_ViewExe, QDialog): QDialog.__init__(self,parent) self.setupUi(self) self.resize( QSize(1000,600).expandedTo(self.minimumSizeHint()) ) - # self.PB_Ok.clicked.connect(self.close) self.PB_Ok.clicked.connect( self.theClose ) + # Button OK is disabled until computation is finished + self.PB_Ok.setEnabled(False) + # Button cancel allows to kill the computation + # It is disabled when the computation is finished + self.PB_Cancel.clicked.connect( self.cancelComputation ) + self.PB_Cancel.setToolTip("Cancel computation") self.PB_Save.clicked.connect( self.saveFile ) + self.PB_Save.setToolTip("Save trace in log file") + self.PB_Ok.setToolTip("Close view") self.monExe=QProcess(self) self.monExe.readyReadStandardOutput.connect( self.readFromStdOut ) self.monExe.readyReadStandardError.connect( self.readFromStdErr ) self.monExe.finished.connect( self.finished ) + self.monExe.errorOccurred.connect( self.errorOccured ) if os.path.exists(self.parent().fichierOut): os.remove(self.parent().fichierOut) self.monExe.start(txt) self.monExe.closeWriteChannel() - self.enregistreResultatsDone=False + self.hasBeenCanceled = False + self.anErrorOccured = False self.show() def make_executable(self, path): @@ -93,11 +103,24 @@ class MonViewText(Ui_ViewExe, QDialog): self.TB_Exe.append(aa) def finished(self): - self.parent().enregistreResultat() - self.enregistreResultatsDone=True + self.PB_Ok.setEnabled(True) + self.PB_Cancel.setEnabled(False) + exit_code = self.monExe.exitCode() + if exit_code == 0 and not self.anErrorOccured: + self.parent().enregistreResultat() + elif not self.hasBeenCanceled: + QMessageBox.critical(self, 'Computation failed', + 'The computation has failed.
Please, check the log message.') + pass + + def errorOccured(self): + # for instance if the executable is not found + self.anErrorOccured = True + self.finished() + + def cancelComputation(self): + self.hasBeenCanceled = True + self.monExe.kill() def theClose(self): - if not self.enregistreResultatsDone: - self.parent().enregistreResultat() - self.enregistreResultatsDone=True self.close() From 694f17004aeb6db929bd01f0188afabce3af5b6d Mon Sep 17 00:00:00 2001 From: Christophe Bourcier Date: Thu, 24 Jan 2019 09:57:53 +0100 Subject: [PATCH 07/12] Small fixes in sphinx documentation of python plugins: - remove depedency to babel (only used to generated a date format) - add missing theme - remove warnings --- doc/salome/gui/SMESH/conf.py.in | 2 +- .../MGCleanerPlug/doc/Advanced_params.rst | 3 +- src/Tools/MGCleanerPlug/doc/CMakeLists.txt | 2 +- .../MGCleanerPlug/doc/Generics_params.rst | 14 ++++---- src/Tools/MGCleanerPlug/doc/conf.py.in | 18 ++++++---- src/Tools/MGCleanerPlug/doc/editHypo.rst | 6 ++-- src/Tools/MGCleanerPlug/doc/lct.rst | 4 +-- src/Tools/Verima/Doc/CMakeLists.txt | 2 +- src/Tools/Verima/Doc/conf.py.in | 18 ++++++---- src/Tools/YamsPlug/doc/Advanced_params.rst | 34 +++++++++---------- src/Tools/YamsPlug/doc/CMakeLists.txt | 2 +- src/Tools/YamsPlug/doc/Generics_params.rst | 18 +++++----- src/Tools/YamsPlug/doc/conf.py.in | 18 ++++++---- src/Tools/YamsPlug/doc/editHypo.rst | 6 ++-- src/Tools/YamsPlug/doc/lct.rst | 4 +-- src/Tools/ZCracksPlug/doc/CMakeLists.txt | 2 +- src/Tools/blocFissure/doc/CMakeLists.txt | 2 +- src/Tools/blocFissure/doc/conf.py.in | 6 ++-- 18 files changed, 88 insertions(+), 73 deletions(-) diff --git a/doc/salome/gui/SMESH/conf.py.in b/doc/salome/gui/SMESH/conf.py.in index 535e528f4..d11dbd5c4 100644 --- a/doc/salome/gui/SMESH/conf.py.in +++ b/doc/salome/gui/SMESH/conf.py.in @@ -178,7 +178,7 @@ htmlhelp_basename = 'smeshdoc' # ------------------------ # The paper size ('letter' or 'a4'). -latex_paper_size = 'a4' +#latex_paper_size = 'a4' # The font size ('10pt', '11pt' or '12pt'). latex_font_size = '10pt' diff --git a/src/Tools/MGCleanerPlug/doc/Advanced_params.rst b/src/Tools/MGCleanerPlug/doc/Advanced_params.rst index 34178cfd3..8d71500e1 100644 --- a/src/Tools/MGCleanerPlug/doc/Advanced_params.rst +++ b/src/Tools/MGCleanerPlug/doc/Advanced_params.rst @@ -1,7 +1,8 @@ -Advanced Remeshing Options +Advanced Remeshing Options ========================== See tooltips comments for each parameter. + See also :download:`MG-cleaner user manual `. .. image:: images/Advanced.png diff --git a/src/Tools/MGCleanerPlug/doc/CMakeLists.txt b/src/Tools/MGCleanerPlug/doc/CMakeLists.txt index 29993f024..9ad66df95 100755 --- a/src/Tools/MGCleanerPlug/doc/CMakeLists.txt +++ b/src/Tools/MGCleanerPlug/doc/CMakeLists.txt @@ -19,7 +19,7 @@ SALOME_CONFIGURE_FILE(conf.py.in conf.py) -SET(_cmd_options -c ${CMAKE_CURRENT_BINARY_DIR} -b html -d doctrees -D latex_paper_size=a4 ${CMAKE_CURRENT_SOURCE_DIR} docutils) +SET(_cmd_options -c ${CMAKE_CURRENT_BINARY_DIR} -b html -d doctrees ${CMAKE_CURRENT_SOURCE_DIR} docutils) SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd env_script "${SPHINX_EXECUTABLE}" "${_cmd_options}") ADD_CUSTOM_TARGET(html_docs_MGCleanerPlug COMMAND ${_cmd}) diff --git a/src/Tools/MGCleanerPlug/doc/Generics_params.rst b/src/Tools/MGCleanerPlug/doc/Generics_params.rst index 45133412c..8da4e2ae9 100644 --- a/src/Tools/MGCleanerPlug/doc/Generics_params.rst +++ b/src/Tools/MGCleanerPlug/doc/Generics_params.rst @@ -1,17 +1,15 @@ -Generic Options -================= +Generic Options +=============== These options are not meshing options but allow the user to configure control parameters for MG-Cleaner. - - **Verbosity Level** -This parameter (between 0 and 10) indicates the amount of information that MG-Cleaner prints during the run. - - -- **File** + This parameter (between 0 and 10) indicates the amount of information that MG-Cleaner prints during the run. -You can change the file used to store your favorite remeshing hypothesis. see paragraph :ref:`hypothesis-label` for further informations. +- **File** + + You can change the file used to store your favorite remeshing hypothesis. see paragraph :ref:`hypothesis-label` for further informations. .. image:: images/Generic.png :align: center diff --git a/src/Tools/MGCleanerPlug/doc/conf.py.in b/src/Tools/MGCleanerPlug/doc/conf.py.in index 0f6894ffd..560450bf1 100644 --- a/src/Tools/MGCleanerPlug/doc/conf.py.in +++ b/src/Tools/MGCleanerPlug/doc/conf.py.in @@ -12,6 +12,7 @@ # serve to show the default value. import sys, os +import sphinx # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it @@ -50,7 +51,7 @@ release = '@SALOMESMESH_VERSION@' # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. -today_fmt = '%B %d, %Y' +#today_fmt = '%B %d, %Y' # List of documents that shouldn't be included in the build. #unused_docs = [] @@ -80,10 +81,15 @@ pygments_style = 'sphinx' # Options for HTML output # ----------------------- -# The style sheet to use for HTML and HTML Help pages. A file of that name -# must exist either in Sphinx' static/ path, or in one of the custom paths -# given in html_static_path. -html_style = 'default.css' +# The theme to use for HTML and HTML Help pages. Major themes that come with +# Sphinx are currently 'default' and 'sphinxdoc'. +html_theme = 'default' if sphinx.version_info[:2] < (1,3) else 'classic' +themes_options = {} +themes_options['classic'] = { + 'body_max_width':'none', + 'body_min_width':0, +} +html_theme_options = themes_options.get(html_theme, {}) # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". @@ -108,7 +114,7 @@ html_style = 'default.css' # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. -html_last_updated_fmt = '%b %d, %Y' +#html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. diff --git a/src/Tools/MGCleanerPlug/doc/editHypo.rst b/src/Tools/MGCleanerPlug/doc/editHypo.rst index 5ab05f374..75bbe5182 100644 --- a/src/Tools/MGCleanerPlug/doc/editHypo.rst +++ b/src/Tools/MGCleanerPlug/doc/editHypo.rst @@ -1,8 +1,8 @@ .. _hypothesis-label: -=========================== -How to save MG-Cleaner Parameters -=========================== +================================= +How to save MG-Cleaner Parameters +================================= MG-Cleaner hypothesis is not meshing hypothesis for Salome, but hypothesis for MG-Cleaner. The current set of parameters is automatically written in the salome study object browser when you run computation. diff --git a/src/Tools/MGCleanerPlug/doc/lct.rst b/src/Tools/MGCleanerPlug/doc/lct.rst index c37726b9e..69383e76b 100644 --- a/src/Tools/MGCleanerPlug/doc/lct.rst +++ b/src/Tools/MGCleanerPlug/doc/lct.rst @@ -1,5 +1,5 @@ -Running MGCleaner Plug-in -===================== +Running MGCleaner Plug-in +========================= MGCleaner plug-in can be invoked via SMESH Plugin item in Mesh menu bar diff --git a/src/Tools/Verima/Doc/CMakeLists.txt b/src/Tools/Verima/Doc/CMakeLists.txt index 3e61d8fe9..4969b7784 100755 --- a/src/Tools/Verima/Doc/CMakeLists.txt +++ b/src/Tools/Verima/Doc/CMakeLists.txt @@ -19,7 +19,7 @@ SALOME_CONFIGURE_FILE(conf.py.in conf.py) -SET(_cmd_options -c ${CMAKE_CURRENT_BINARY_DIR} -b html -d doctrees -D latex_paper_size=a4 ${CMAKE_CURRENT_SOURCE_DIR} docutils) +SET(_cmd_options -c ${CMAKE_CURRENT_BINARY_DIR} -b html -d doctrees ${CMAKE_CURRENT_SOURCE_DIR} docutils) SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd env_script "${SPHINX_EXECUTABLE}" "${_cmd_options}") ADD_CUSTOM_TARGET(html_docs_Verima COMMAND ${_cmd}) diff --git a/src/Tools/Verima/Doc/conf.py.in b/src/Tools/Verima/Doc/conf.py.in index dd67de87c..d4b53b638 100644 --- a/src/Tools/Verima/Doc/conf.py.in +++ b/src/Tools/Verima/Doc/conf.py.in @@ -12,6 +12,7 @@ # serve to show the default value. import sys, os +import sphinx # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it @@ -50,7 +51,7 @@ release = '@SALOMESMESH_VERSION@' # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. -today_fmt = '%B %d, %Y' +#today_fmt = '%B %d, %Y' # List of documents that shouldn't be included in the build. #unused_docs = [] @@ -80,10 +81,15 @@ pygments_style = 'sphinx' # Options for HTML output # ----------------------- -# The style sheet to use for HTML and HTML Help pages. A file of that name -# must exist either in Sphinx' static/ path, or in one of the custom paths -# given in html_static_path. -html_style = 'default.css' +# The theme to use for HTML and HTML Help pages. Major themes that come with +# Sphinx are currently 'default' and 'sphinxdoc'. +html_theme = 'default' if sphinx.version_info[:2] < (1,3) else 'classic' +themes_options = {} +themes_options['classic'] = { + 'body_max_width':'none', + 'body_min_width':0, +} +html_theme_options = themes_options.get(html_theme, {}) # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". @@ -108,7 +114,7 @@ html_style = 'default.css' # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. -html_last_updated_fmt = '%b %d, %Y' +#html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. diff --git a/src/Tools/YamsPlug/doc/Advanced_params.rst b/src/Tools/YamsPlug/doc/Advanced_params.rst index d8a1f560c..c2af74a55 100644 --- a/src/Tools/YamsPlug/doc/Advanced_params.rst +++ b/src/Tools/YamsPlug/doc/Advanced_params.rst @@ -1,45 +1,45 @@ -Advanced Remeshing Options +Advanced Remeshing Options ========================== -.. note:: +.. note:: Be aware that no control of coherency is done when you set these parameters : for instance, geometrical approximation is only allowed when SurfOpt computes a mesh for finite elements but the GUI will let you choose geometrical approximation and compute a visualisation mesh. See Distene's documentation for more details : :download:`MeshGems-SurfOpt: The automatic surface remeshing tool of the MeshGems Suite `. - + - **Ridge detection** -if not set (ridge detection disabled ), MeshGems-SurfOpt will not try to detect any new ridge edge by its own mechanism : -it will consider as ridge only the ridges given in the mesh. All non-ridge edges that would have been detected as ridge by the Ridge angle parameter (see below split edge) will be considered as part of the same continuous patch. This option should not be checked when all the known ridges of the mesh are given and when all other possible ridges are not geometric ridges to take into account. + + if not set (ridge detection disabled ), MeshGems-SurfOpt will not try to detect any new ridge edge by its own mechanism : + it will consider as ridge only the ridges given in the mesh. All non-ridge edges that would have been detected as ridge by the Ridge angle parameter (see below split edge) will be considered as part of the same continuous patch. This option should not be checked when all the known ridges of the mesh are given and when all other possible ridges are not geometric ridges to take into account. - **Point smoothing** -When not set (point smoothing is disabled), MeshGems-SurfOpt will not try to move the initial given vertices (along an edge, a ridge or onto the surface), hence MeshGems-SurfOpt will only swap edges, remove vertices or add vertices (refines) to change the mesh. + + When not set (point smoothing is disabled), MeshGems-SurfOpt will not try to move the initial given vertices (along an edge, a ridge or onto the surface), hence MeshGems-SurfOpt will only swap edges, remove vertices or add vertices (refines) to change the mesh. - **Geometrical approximation** -this field as well as the Chordal deviation tolerance parameter,enables the user to bound the maximal chordal deviation allowed. it avoids having sharp angles. , that is, the maximal distance allowed between the detected curve and the plane of the corresponding mesh face. It avoids having faces too far away from the curve they represent. + + this field as well as the Chordal deviation tolerance parameter,enables the user to bound the maximal chordal deviation allowed. it avoids having sharp angles. , that is, the maximal distance allowed between the detected curve and the plane of the corresponding mesh face. It avoids having faces too far away from the curve they represent. .. image:: images/Tolerance.png :align: center - This parameter P enables the user to specify the maximal chordal deviation E relatively to the local curvature. the maximal chordal deviation will be set to E=P x r (r is the radius of the circumcercle) if the units parameter is set to relative or E=P if the units parameter is set to absolute. - - **Ridge angle** -This parameter specifies the angular values for the automatic detection of ridges and corners. A ridge is automatically detected if the angle between the normal vectors of two adjacent faces exceeds this value. - + This parameter specifies the angular values for the automatic detection of ridges and corners. A ridge is automatically detected if the angle between the normal vectors of two adjacent faces exceeds this value. - **Maximal/Minimal size around vertices** -These two parameters allow the user to prescribe a Maximal/Minimal size for the mesh elements, ie the lengths of the edges. - + These two parameters allow the user to prescribe a Maximal/Minimal size for the mesh elements, ie the lengths of the edges. - **Mesh gradation** -This parameter P controls the element size variation : MeshGems-SurfOpt will avoid having two adjacent edges which sizes vary more than the given gradation. A size correction is applied to the size map : if two adjacent edges are respectively e1 and e2 long and e2 > Pxe1, then, the new size for the second edge will be set to P x e1. -**This procedure is deactivated if P=-1** + This parameter P controls the element size variation : MeshGems-SurfOpt will avoid having two adjacent edges which sizes vary more than the given gradation. A size correction is applied to the size map : if two adjacent edges are respectively e1 and e2 long and e2 > Pxe1, then, the new size for the second edge will be set to P x e1. + **This procedure is deactivated if P=-1** - **Split edge** -If this option is activated, MeshGems-SurfOpt creates new vertices placed on the curved surface and adds them to elements. -It may be used to obtain higher order elements. + + If this option is activated, MeshGems-SurfOpt creates new vertices placed on the curved surface and adds them to elements. + It may be used to obtain higher order elements. diff --git a/src/Tools/YamsPlug/doc/CMakeLists.txt b/src/Tools/YamsPlug/doc/CMakeLists.txt index 1b9442d8f..c977be265 100755 --- a/src/Tools/YamsPlug/doc/CMakeLists.txt +++ b/src/Tools/YamsPlug/doc/CMakeLists.txt @@ -19,7 +19,7 @@ SALOME_CONFIGURE_FILE(conf.py.in conf.py) -SET(_cmd_options -c ${CMAKE_CURRENT_BINARY_DIR} -b html -d doctrees -D latex_paper_size=a4 ${CMAKE_CURRENT_SOURCE_DIR} docutils) +SET(_cmd_options -c ${CMAKE_CURRENT_BINARY_DIR} -b html -d doctrees ${CMAKE_CURRENT_SOURCE_DIR} docutils) SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd env_script "${SPHINX_EXECUTABLE}" "${_cmd_options}") ADD_CUSTOM_TARGET(html_docs_YamsPlug COMMAND ${_cmd}) diff --git a/src/Tools/YamsPlug/doc/Generics_params.rst b/src/Tools/YamsPlug/doc/Generics_params.rst index 29453af2e..0dce217ad 100644 --- a/src/Tools/YamsPlug/doc/Generics_params.rst +++ b/src/Tools/YamsPlug/doc/Generics_params.rst @@ -1,21 +1,19 @@ -Generic Options -================= +Generic Options +=============== These options are not meshing options but allow the user to configure control parameters for MeshGems-SurfOpt. - - **Verbosity Level** -This parameter (between 0 and 10) indicates the amount of information that MeshGems-SurfOpt prints during the run. - + This parameter (between 0 and 10) indicates the amount of information that MeshGems-SurfOpt prints during the run. - **Memory Size** -You usually don't have to set this parameter but you can choose to limit the amount of memory used by MeshGems-SurfOpt -- It requires 370 bytes per node. Or, if you try to enrich a already big mesh (up to 2 millions nodes), you exceptionally, need to allocate more memory. - - -- **File** -You can change the file used to store remeshing hypotheses, see :ref:`hypothesis-label` for further information. + You usually don't have to set this parameter but you can choose to limit the amount of memory used by MeshGems-SurfOpt -- It requires 370 bytes per node. Or, if you try to enrich a already big mesh (up to 2 millions nodes), you exceptionally, need to allocate more memory. + +- **File** + + You can change the file used to store remeshing hypotheses, see :ref:`hypothesis-label` for further information. .. image:: images/Generic.png :align: center diff --git a/src/Tools/YamsPlug/doc/conf.py.in b/src/Tools/YamsPlug/doc/conf.py.in index 29d094d19..2a4b99286 100644 --- a/src/Tools/YamsPlug/doc/conf.py.in +++ b/src/Tools/YamsPlug/doc/conf.py.in @@ -12,6 +12,7 @@ # serve to show the default value. import sys, os +import sphinx # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it @@ -50,7 +51,7 @@ release = '@SALOMESMESH_VERSION@' # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. -today_fmt = '%B %d, %Y' +#today_fmt = '%B %d, %Y' # List of documents that shouldn't be included in the build. #unused_docs = [] @@ -80,10 +81,15 @@ pygments_style = 'sphinx' # Options for HTML output # ----------------------- -# The style sheet to use for HTML and HTML Help pages. A file of that name -# must exist either in Sphinx' static/ path, or in one of the custom paths -# given in html_static_path. -html_style = 'default.css' +# The theme to use for HTML and HTML Help pages. Major themes that come with +# Sphinx are currently 'default' and 'sphinxdoc'. +html_theme = 'default' if sphinx.version_info[:2] < (1,3) else 'classic' +themes_options = {} +themes_options['classic'] = { + 'body_max_width':'none', + 'body_min_width':0, +} +html_theme_options = themes_options.get(html_theme, {}) # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". @@ -108,7 +114,7 @@ html_style = 'default.css' # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. -html_last_updated_fmt = '%b %d, %Y' +#html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. diff --git a/src/Tools/YamsPlug/doc/editHypo.rst b/src/Tools/YamsPlug/doc/editHypo.rst index 3770d70c2..20074cd3b 100644 --- a/src/Tools/YamsPlug/doc/editHypo.rst +++ b/src/Tools/YamsPlug/doc/editHypo.rst @@ -1,8 +1,8 @@ .. _hypothesis-label: -=========================== -How to save MeshGems-SurfOpt Parameters -=========================== +======================================= +How to save MeshGems-SurfOpt Parameters +======================================= MeshGems-SurfOpt hypothesis is not a meshing hypothesis for Salome, but an hypothesis for MeshGems-SurfOpt. The current set of parameters is automatically written in the salome study object browser when you run computation. diff --git a/src/Tools/YamsPlug/doc/lct.rst b/src/Tools/YamsPlug/doc/lct.rst index 0f1a012d2..1f2861927 100644 --- a/src/Tools/YamsPlug/doc/lct.rst +++ b/src/Tools/YamsPlug/doc/lct.rst @@ -1,5 +1,5 @@ -Running MeshGems-SurfOpt Plug-in -===================== +Running MeshGems-SurfOpt Plug-in +================================ MeshGems-SurfOpt plug-in can be invoked via SMESH Plugin item in Mesh menu bar diff --git a/src/Tools/ZCracksPlug/doc/CMakeLists.txt b/src/Tools/ZCracksPlug/doc/CMakeLists.txt index 5a0c007f8..623baeaa5 100755 --- a/src/Tools/ZCracksPlug/doc/CMakeLists.txt +++ b/src/Tools/ZCracksPlug/doc/CMakeLists.txt @@ -19,7 +19,7 @@ SALOME_CONFIGURE_FILE(conf.py.in conf.py) -SET(_cmd_options -c ${CMAKE_CURRENT_BINARY_DIR} -b html -d doctrees -D latex_paper_size=a4 ${CMAKE_CURRENT_SOURCE_DIR} docutils) +SET(_cmd_options -c ${CMAKE_CURRENT_BINARY_DIR} -b html -d doctrees ${CMAKE_CURRENT_SOURCE_DIR} docutils) SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd env_script "${SPHINX_EXECUTABLE}" "${_cmd_options}") ADD_CUSTOM_TARGET(html_docs_ZCracksPlug COMMAND ${_cmd}) diff --git a/src/Tools/blocFissure/doc/CMakeLists.txt b/src/Tools/blocFissure/doc/CMakeLists.txt index e88021eb8..dd06084bd 100755 --- a/src/Tools/blocFissure/doc/CMakeLists.txt +++ b/src/Tools/blocFissure/doc/CMakeLists.txt @@ -19,7 +19,7 @@ SALOME_CONFIGURE_FILE(conf.py.in conf.py) -SET(_cmd_options -c ${CMAKE_CURRENT_BINARY_DIR} -b html -d doctrees -D latex_paper_size=a4 ${CMAKE_CURRENT_SOURCE_DIR} docutils) +SET(_cmd_options -c ${CMAKE_CURRENT_BINARY_DIR} -b html -d doctrees ${CMAKE_CURRENT_SOURCE_DIR} docutils) SALOME_GENERATE_ENVIRONMENT_SCRIPT(_cmd env_script "${SPHINX_EXECUTABLE}" "${_cmd_options}") ADD_CUSTOM_TARGET(html_docs_blocFissure COMMAND ${_cmd}) diff --git a/src/Tools/blocFissure/doc/conf.py.in b/src/Tools/blocFissure/doc/conf.py.in index accd55b19..d6db7e5ce 100644 --- a/src/Tools/blocFissure/doc/conf.py.in +++ b/src/Tools/blocFissure/doc/conf.py.in @@ -50,7 +50,7 @@ release = '@SALOMESMESH_VERSION@' # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. -today_fmt = '%B %d, %Y' +#today_fmt = '%B %d, %Y' # List of documents that shouldn't be included in the build. #unused_docs = [] @@ -105,11 +105,11 @@ html_theme = 'default' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +#html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. -html_last_updated_fmt = '%b %d, %Y' +#html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. From a536eb53113234d879b7aaad743a83207d9d6731 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 9 Jan 2019 14:37:31 +0300 Subject: [PATCH 08/12] 54499: SALOME crash at mesh evaluation --- src/StdMeshers/StdMeshers_Quadrangle_2D.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx index 19461a774..c59949550 100644 --- a/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx +++ b/src/StdMeshers/StdMeshers_Quadrangle_2D.cxx @@ -965,8 +965,7 @@ bool StdMeshers_Quadrangle_2D::Evaluate(SMESH_Mesh& aMesh, //int nbFaces4 = (nbhoriz-1-kdh)*(nbvertic-1-kdv); int nbFaces4 = (nbhoriz-1)*(nbvertic-1); - std::vector aVec(SMDSEntity_Last); - for (int i=SMDSEntity_Node; i aVec(SMDSEntity_Last,0); if (IsQuadratic) { aVec[SMDSEntity_Quad_Triangle] = nbFaces3; aVec[SMDSEntity_Quad_Quadrangle] = nbFaces4; @@ -1718,6 +1717,8 @@ bool StdMeshers_Quadrangle_2D::checkNbEdgesForEvaluate(SMESH_Mesh& aMes } } list::iterator ite = sideEdges.begin(); + if ( nbSides >= (int)aNbNodes.size() ) + return false; aNbNodes[nbSides] = 1; for (; ite!=sideEdges.end(); ite++) { SMESH_subMesh * sm = aMesh.GetSubMesh(*ite); From 2e145f7188233d9e7790f6336109c13dd8140ab2 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 8 Feb 2019 14:26:12 +0300 Subject: [PATCH 09/12] Increment version: 9.2.1 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b29146d6..00c863561 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC) SET(${PROJECT_NAME_UC}_MAJOR_VERSION 9) SET(${PROJECT_NAME_UC}_MINOR_VERSION 2) -SET(${PROJECT_NAME_UC}_PATCH_VERSION 0) +SET(${PROJECT_NAME_UC}_PATCH_VERSION 1) SET(${PROJECT_NAME_UC}_VERSION ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION}) SET(${PROJECT_NAME_UC}_VERSION_DEV 0) From 7cef49499886e7cdb58bc796a593896099b6b2d7 Mon Sep 17 00:00:00 2001 From: rnv Date: Wed, 30 Jan 2019 19:50:05 +0300 Subject: [PATCH 10/12] Fix for "23678: [CEA 13186] messages in the python window" issue. --- src/SMESH_I/SMESH_Gen_i.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index 86f9daa3b..e04476d35 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -3982,6 +3982,9 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, cmd+="\" \""; cmd+=meshfile; cmd+="\""; +#ifdef WIN32 + cmd+=" 2>NUL"; +#endif system(cmd.ToCString()); // MED writer to be used by storage process From 4ad3dc98c81ee5c81e3ea1c1a3dc8b79ab9c11f0 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 25 Feb 2019 15:57:57 +0300 Subject: [PATCH 11/12] Increment version: 9.2.2 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 00c863561..f51c52f5b 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC) SET(${PROJECT_NAME_UC}_MAJOR_VERSION 9) SET(${PROJECT_NAME_UC}_MINOR_VERSION 2) -SET(${PROJECT_NAME_UC}_PATCH_VERSION 1) +SET(${PROJECT_NAME_UC}_PATCH_VERSION 2) SET(${PROJECT_NAME_UC}_VERSION ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION}) SET(${PROJECT_NAME_UC}_VERSION_DEV 0) From f1ee2beab1bf81ee333f9486a8f47dc11ebd0d89 Mon Sep 17 00:00:00 2001 From: rnv Date: Thu, 28 Feb 2019 20:11:53 +0300 Subject: [PATCH 12/12] Close HDF data set. --- src/SMESH_I/SMESH_PreMeshInfo.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SMESH_I/SMESH_PreMeshInfo.cxx b/src/SMESH_I/SMESH_PreMeshInfo.cxx index 989de27e6..f479f4866 100644 --- a/src/SMESH_I/SMESH_PreMeshInfo.cxx +++ b/src/SMESH_I/SMESH_PreMeshInfo.cxx @@ -456,6 +456,7 @@ bool SMESH_PreMeshInfo::readPreInfoFromHDF() mapOfNames ); } } + infoHdfGroup->CloseOnDisk(); } aFile->CloseOnDisk();