From: rnc Date: Wed, 11 Sep 2013 15:01:13 +0000 (+0000) Subject: IMP: EDF 2680: New options for log files X-Git-Tag: V7_3_0a1~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=744c914fb53e3676e3ec45080046ef1274f43522;p=plugins%2Fhybridplugin.git IMP: EDF 2680: New options for log files The user can now choose to print the log in a file or in the standard output The user can choose to keep only log files, keep all working files or keep log files when computation fails only --- diff --git a/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_enforced_meshes.png b/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_enforced_meshes.png index 72ed777..c41c62e 100644 Binary files a/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_enforced_meshes.png and b/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_enforced_meshes.png differ diff --git a/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_enforced_vertices.png b/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_enforced_vertices.png index e86a73e..75126ee 100644 Binary files a/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_enforced_vertices.png and b/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_enforced_vertices.png differ diff --git a/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_parameters_advanced.png b/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_parameters_advanced.png index e99409e..6ad5f89 100644 Binary files a/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_parameters_advanced.png and b/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_parameters_advanced.png differ diff --git a/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_parameters_basic.png b/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_parameters_basic.png index e71688e..450a4a1 100644 Binary files a/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_parameters_basic.png and b/doc/salome/gui/GHS3DPLUGIN/images/ghs3d_parameters_basic.png differ diff --git a/doc/salome/gui/GHS3DPLUGIN/input/ghs3d_hypo.doc b/doc/salome/gui/GHS3DPLUGIN/input/ghs3d_hypo.doc index 0930956..bf6e194 100644 --- a/doc/salome/gui/GHS3DPLUGIN/input/ghs3d_hypo.doc +++ b/doc/salome/gui/GHS3DPLUGIN/input/ghs3d_hypo.doc @@ -17,12 +17,12 @@ To get a licence, visit http://www.distene.com/en/corp/eval-distene.html - Name - allows to define the name of the hypothesis (GHS3D Parameters by default). -- To mesh holes - if checked, the algorithm will +- Mesh holes - if checked, the algorithm will create mesh in the holes inside a solid shape, else only the outermost shape will be meshed. Volumic elements created within holes are bound to the solid. -- To make groups of domains - if checked, the algorithm will +- Make groups of domains - if checked, the algorithm will create groups of just generated elements corresponding to each mesh domain.
@@ -46,6 +46,8 @@ but can be time-consuming): \image html ghs3d_parameters_advanced.png +\subsection memory_settings Memory settings + - Maximum memory size - launches ghs3d software with work space limited to the specified amount of RAM, in Mbytes. If this option is checked off, the software will be launched with 7O% of the total RAM space. @@ -54,13 +56,11 @@ checked off, the software will be launched with 7O% of the total RAM space. the specified amount of work space, in Mbytes. If this option is checked off, the software will be started with 100 Megabytes of working space. +\subsection log Logs and debug + - Working directory - allows defining the folder for input and output files of ghs3d software, which are the files starting with "GHS3D_" prefix. -- Keep working files - allows checking input and output files -of ghs3d software, while usually these files are removed after the -launch of the mesher. - - Verbose level - to choose verbosity level in the range from 0 to 10. @@ -73,11 +73,25 @@ launch of the mesher. - 10, same as 2 plus the main steps in the computation, quality statistics histogram of the skin mesh, quality statistics histogram together with the characteristics of the final mesh. + +- Print log in a file - if this option is checked on the log is printed in a +file placed in the working directory, otherwise it is printed on the standard output. + +- Remove log on success - if this option is checked on the log file is kept only +if an error occurs during the computation. This option is only available if Print log in a file +is enabled (there must be a log file to delete it) and Keep all working files is disabled +(in this case the log file is always kept). + +- Keep all working files - allows checking input and output files +of ghs3d software, while usually these files are removed after the +launch of the mesher. The log file (if any) is also kept if this option is checked. + +\subsection advanced_meshing_options Advanced meshing options -- To create new nodes - if this option is checked off, ghs3d +- Create new nodes - if this option is checked off, ghs3d tries to create tetrahedrons using only the nodes of the 2D mesh. -- To remove the initial central point TetMesh-GHS3D adds an internal point +- Remove the initial central point TetMesh-GHS3D adds an internal point at the gravity centre of the bounding box to speed up and to simplify the meshing process. However, it is possible to refrain from creating this point by using the command line option -no initial central point. This can be @@ -91,7 +105,7 @@ Note: when using this option, the speed of the meshing process may decrease, and the quality may change. Note: the boundary regeneration may fail with this option, in some rare cases. -- To use boundary recovery version - enables using a +- Use boundary recovery version - enables using a boundary recovery module which tries to create volume meshes starting from very poor quality surface meshes (almost flat triangles on the surface, high density propagation, @@ -100,7 +114,7 @@ resulting volume mesh will however most likely have a very poor quality (poor aspect ratio of elements, tetrahedra with a very small positive volume). -- To use FEM correction - Applies finite-element correction by +- Use FEM correction - Applies finite-element correction by replacing overconstrained elements where it is possible. At first the process slices the overconstrained edges and at second the overconstrained facets. This ensures that there are no edges with two boundary diff --git a/idl/GHS3DPlugin_Algorithm.idl b/idl/GHS3DPlugin_Algorithm.idl index 01be915..3cefea0 100644 --- a/idl/GHS3DPlugin_Algorithm.idl +++ b/idl/GHS3DPlugin_Algorithm.idl @@ -152,6 +152,16 @@ module GHS3DPlugin */ void SetGradation(in double gradation); double GetGradation(); + /*! + * Print log in standard output + */ + void SetStandardOutputLog(in boolean logInStandardOutput); + boolean GetStandardOutputLog(); + /*! + * Remove log file on success + */ + void SetRemoveLogOnSuccess(in boolean removeLogOnSuccess); + boolean GetRemoveLogOnSuccess(); /*! * To set an enforced vertex */ diff --git a/src/GHS3DPlugin/GHS3DPluginBuilder.py b/src/GHS3DPlugin/GHS3DPluginBuilder.py index 08dfb09..ec39a46 100644 --- a/src/GHS3DPlugin/GHS3DPluginBuilder.py +++ b/src/GHS3DPlugin/GHS3DPluginBuilder.py @@ -126,11 +126,27 @@ class GHS3D_Algorithm(Mesh_Algorithm): self.Parameters().SetWorkingDirectory(path) pass - ## To keep working files or remove them. Log file remains in case of errors anyway. + ## To keep working files or remove them. # @param toKeep "keep working files" flag value def SetKeepFiles(self, toKeep): self.Parameters().SetKeepFiles(toKeep) pass + + ## Remove or not the log file (if any) in case of successful computation. + # The log file remains in case of errors anyway. If + # the "keep working files" flag is set to true, this option + # has no effect. + # @param toRemove "remove log on success" flag value + def SetRemoveLogOnSuccess(self, toRemove): + self.Parameters().SetRemoveLogOnSuccess(toRemove) + pass + + ## Print the the log in a file. If set to false, the + # log is printed on the standard output + # @param toPrintLogInFile "print log in a file" flag value + def SetPrintLogInFile(self, toPrintLogInFile): + self.Parameters().SetStandardOutputLog(not toPrintLogInFile) + pass ## Set verbosity level [0-10]. # @param level verbosity level diff --git a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx index 0ff403a..fd0c7bb 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx @@ -183,6 +183,7 @@ bool GHS3DPlugin_GHS3D::CheckHypothesis ( SMESH_Mesh& aMesh, _hyp = 0; _viscousLayersHyp = 0; _keepFiles = false; + _removeLogOnSuccess = true; const list & hyps = GetUsedHypothesis(aMesh, aShape, /*ignoreAuxiliary=*/false); @@ -195,7 +196,10 @@ bool GHS3DPlugin_GHS3D::CheckHypothesis ( SMESH_Mesh& aMesh, _viscousLayersHyp = dynamic_cast< const StdMeshers_ViscousLayers*> ( *h ); } if ( _hyp ) + { _keepFiles = _hyp->GetKeepFiles(); + _removeLogOnSuccess = _hyp->GetRemoveLogOnSuccess(); + } return true; } @@ -3434,7 +3438,9 @@ bool GHS3DPlugin_GHS3D::Compute(SMESH_Mesh& theMesh, TCollection_AsciiString cmd( (char*)GHS3DPlugin_Hypothesis::CommandToRun( _hyp ).c_str() ); cmd += TCollection_AsciiString(" -f ") + aGenericName; // file to read - cmd += TCollection_AsciiString(" 1>" ) + aLogFileName; // dump into file + + if ( !_hyp->GetStandardOutputLog() ) + cmd += TCollection_AsciiString(" 1>" ) + aLogFileName; // dump into file // The output .mesh file does not contain yet the subdomain-info (Ghs3D 4.2) // cmd += TCollection_AsciiString(" --in ") + aGenericName; // cmd += TCollection_AsciiString(" --required_vertices ") + aGenericNameRequired; @@ -3507,7 +3513,7 @@ bool GHS3DPlugin_GHS3D::Compute(SMESH_Mesh& theMesh, if ( Ok ) { - if ( !_keepFiles ) + if ( _removeLogOnSuccess ) removeFile( aLogFileName ); // if ( _hyp && _hyp->GetToMakeGroupsOfDomains() ) @@ -3528,8 +3534,7 @@ bool GHS3DPlugin_GHS3D::Compute(SMESH_Mesh& theMesh, } if ( !_keepFiles ) { - if (! Ok) - if(_compute_canceled) + if (! Ok && _compute_canceled) removeFile( aLogFileName ); removeFile( aFacesFileName ); removeFile( aPointsFileName ); @@ -3745,7 +3750,7 @@ bool GHS3DPlugin_GHS3D::Compute(SMESH_Mesh& theMesh, if ( Ok ) { - if ( !_keepFiles ) + if ( _removeLogOnSuccess ) removeFile( aLogFileName ); //if ( !toMakeGroupsOfDomains && _hyp && _hyp->GetToMakeGroupsOfDomains() ) @@ -3766,8 +3771,7 @@ bool GHS3DPlugin_GHS3D::Compute(SMESH_Mesh& theMesh, if ( !_keepFiles ) { - if (! Ok) - if(_compute_canceled) + if (! Ok && _compute_canceled) removeFile( aLogFileName ); removeFile( aGMFFileName ); removeFile( aResultFileName ); diff --git a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.hxx b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.hxx index 232c16e..30ba8b0 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.hxx +++ b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.hxx @@ -95,6 +95,7 @@ private: int _iShape; int _nbShape; bool _keepFiles; + bool _removeLogOnSuccess; SALOMEDS::Study_var myStudy; SMESH_Gen_i* smeshGen_i; diff --git a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.cxx b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.cxx index 3ec070f..1c1c6b9 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.cxx @@ -54,6 +54,7 @@ GHS3DPlugin_Hypothesis::GHS3DPlugin_Hypothesis(int hypId, int studyId, SMESH_Gen myToUseFemCorrection(DefaultToUseFEMCorrection()), myToRemoveCentralPoint(DefaultToRemoveCentralPoint()), myGradation(DefaultGradation()), + myLogInStandardOutput(DefaultStandardOutputLog()), _enfVertexList(DefaultGHS3DEnforcedVertexList()), _enfVertexCoordsSizeList(DefaultGHS3DEnforcedVertexCoordsValues()), _enfVertexEntrySizeList(DefaultGHS3DEnforcedVertexEntryValues()), @@ -384,6 +385,48 @@ double GHS3DPlugin_Hypothesis::GetGradation() const return myGradation; } +//======================================================================= +//function : SetStandardOutputLog +//======================================================================= + +void GHS3DPlugin_Hypothesis::SetStandardOutputLog(bool logInStandardOutput) +{ + if ( myLogInStandardOutput != logInStandardOutput ) { + myLogInStandardOutput = logInStandardOutput; + NotifySubMeshesHypothesisModification(); + } +} + +//======================================================================= +//function : GetStandardOutputLog +//======================================================================= + +bool GHS3DPlugin_Hypothesis::GetStandardOutputLog() const +{ + return myLogInStandardOutput; +} + +//======================================================================= +//function : SetRemoveLogOnSuccess +//======================================================================= + +void GHS3DPlugin_Hypothesis::SetRemoveLogOnSuccess(bool removeLogOnSuccess) +{ + if ( myRemoveLogOnSuccess != removeLogOnSuccess ) { + myRemoveLogOnSuccess = removeLogOnSuccess; + NotifySubMeshesHypothesisModification(); + } +} + +//======================================================================= +//function : GetRemoveLogOnSuccess +//======================================================================= + +bool GHS3DPlugin_Hypothesis::GetRemoveLogOnSuccess() const +{ + return myRemoveLogOnSuccess; +} + //======================================================================= //function : SetEnforcedVertex //======================================================================= @@ -883,6 +926,16 @@ bool GHS3DPlugin_Hypothesis::DefaultKeepFiles() return false; } +//======================================================================= +//function : DefaultRemoveLogOnSuccess +//======================================================================= + +bool GHS3DPlugin_Hypothesis::DefaultRemoveLogOnSuccess() +{ + return false; +} + + //======================================================================= //function : DefaultVerboseLevel //======================================================================= @@ -937,6 +990,15 @@ double GHS3DPlugin_Hypothesis::DefaultGradation() return 1.05; } +//======================================================================= +//function : DefaultStandardOutputLog +//======================================================================= + +bool GHS3DPlugin_Hypothesis::DefaultStandardOutputLog() +{ + return false; +} + // //======================================================================= // //function : DefaultID2SizeMap // //======================================================================= diff --git a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.hxx b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.hxx index 15ccbc2..23983fa 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.hxx +++ b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.hxx @@ -204,6 +204,16 @@ public: */ void SetGradation(double gradation); double GetGradation() const ; + /*! + * Print log in standard output + */ + void SetStandardOutputLog(bool logInStandardOutput); + bool GetStandardOutputLog() const ; + /*! + * Remove log file on success + */ + void SetRemoveLogOnSuccess(bool removeLogOnSuccess); + bool GetRemoveLogOnSuccess() const ; // struct TEnforcedEdge { @@ -289,6 +299,8 @@ public: static bool DefaultToUseBoundaryRecoveryVersion(); static bool DefaultToUseFEMCorrection(); static bool DefaultToRemoveCentralPoint(); + static bool DefaultStandardOutputLog(); + static bool DefaultRemoveLogOnSuccess(); static double DefaultGradation(); static TGHS3DEnforcedVertex DefaultGHS3DEnforcedVertex() {return TGHS3DEnforcedVertex();} @@ -337,6 +349,8 @@ private: bool myToUseBoundaryRecoveryVersion; bool myToUseFemCorrection; bool myToRemoveCentralPoint; + bool myLogInStandardOutput; + bool myRemoveLogOnSuccess; std::string myTextOption; double myGradation; diff --git a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis_i.cxx b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis_i.cxx index eb3eeb3..3f5bed7 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis_i.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis_i.cxx @@ -397,6 +397,48 @@ CORBA::Double GHS3DPlugin_Hypothesis_i::GetGradation() return this->GetImpl()->GetGradation(); } +//======================================================================= +//function : SetStandardOutputLog +//======================================================================= + +void GHS3DPlugin_Hypothesis_i::SetStandardOutputLog(CORBA::Boolean logInStandardOutput) +{ + ASSERT(myBaseImpl); + this->GetImpl()->SetStandardOutputLog(logInStandardOutput); + SMESH::TPythonDump() << _this() << ".SetPrintLogInFile( " << !logInStandardOutput << " )"; +} + +//======================================================================= +//function : GetStandardOutputLog +//======================================================================= + +CORBA::Boolean GHS3DPlugin_Hypothesis_i::GetStandardOutputLog() +{ + ASSERT(myBaseImpl); + return this->GetImpl()->GetStandardOutputLog(); +} + +//======================================================================= +//function : SetRemoveLogOnSuccess +//======================================================================= + +void GHS3DPlugin_Hypothesis_i::SetRemoveLogOnSuccess(CORBA::Boolean removeLogOnSuccess) +{ + ASSERT(myBaseImpl); + this->GetImpl()->SetRemoveLogOnSuccess(removeLogOnSuccess); + SMESH::TPythonDump() << _this() << ".SetRemoveLogOnSuccess( " << removeLogOnSuccess << " )"; +} + +//======================================================================= +//function : GetRemoveLogOnSuccess +//======================================================================= + +CORBA::Boolean GHS3DPlugin_Hypothesis_i::GetRemoveLogOnSuccess() +{ + ASSERT(myBaseImpl); + return this->GetImpl()->GetRemoveLogOnSuccess(); +} + //======================================================================= //function : SetEnforcedVertex //======================================================================= diff --git a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis_i.hxx b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis_i.hxx index 81c12dd..10aa011 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis_i.hxx +++ b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis_i.hxx @@ -134,12 +134,22 @@ class GHS3DPLUGIN_EXPORT GHS3DPlugin_Hypothesis_i: */ void SetGradation(CORBA::Double gradation); CORBA::Double GetGradation(); + /*! + * Print log in standard output + */ + void SetStandardOutputLog(CORBA::Boolean logInStandardOutput); + CORBA::Boolean GetStandardOutputLog(); + /*! + * Remove log file on success + */ + void SetRemoveLogOnSuccess(CORBA::Boolean removeLogOnSuccess); + CORBA::Boolean GetRemoveLogOnSuccess(); /*! * To set an enforced vertex */ bool p_SetEnforcedVertex(CORBA::Double size, CORBA::Double x = 0, CORBA::Double y = 0, CORBA::Double z = 0, - const char* theVertexName = "", const char* theVertexEntry = "", const char* theGroupName = "", - CORBA::Boolean isCompound = false) + const char* theVertexName = "", const char* theVertexEntry = "", const char* theGroupName = "", + CORBA::Boolean isCompound = false) throw (SALOME::SALOME_Exception); bool SetEnforcedVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z, CORBA::Double size) throw (SALOME::SALOME_Exception); bool SetEnforcedVertexNamed(CORBA::Double x, CORBA::Double y, CORBA::Double z, CORBA::Double size, const char* theVertexName) throw (SALOME::SALOME_Exception); diff --git a/src/GUI/GHS3DPluginGUI_AdvWidget.cxx b/src/GUI/GHS3DPluginGUI_AdvWidget.cxx new file mode 100644 index 0000000..52cf272 --- /dev/null +++ b/src/GUI/GHS3DPluginGUI_AdvWidget.cxx @@ -0,0 +1,45 @@ +// Copyright (C) 2007-2013 CEA/DEN, 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. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +// --- +// File : GHS3DPluginGUI_Dlg.cxx +// Authors : Renaud NEDELEC (OCC) +// --- +// + +#include "GHS3DPluginGUI_Dlg.h" + +#include + +#include + + +////////////////////////////////////////// +// GHS3DPluginGUI_AdvWidget +////////////////////////////////////////// + +GHS3DPluginGUI_AdvWidget::GHS3DPluginGUI_AdvWidget( QWidget* parent, Qt::WindowFlags f ) +: QWidget( parent, f ) +{ + setupUi( this ); +} + +GHS3DPluginGUI_AdvWidget::~GHS3DPluginGUI_AdvWidget() +{ +} diff --git a/src/GUI/GHS3DPluginGUI_AdvWidget_QTD.ui b/src/GUI/GHS3DPluginGUI_AdvWidget_QTD.ui new file mode 100644 index 0000000..35b70cb --- /dev/null +++ b/src/GUI/GHS3DPluginGUI_AdvWidget_QTD.ui @@ -0,0 +1,225 @@ + + + GHS3DPluginGUI_AdvWidget_QTD + + + + 0 + 0 + 465 + 477 + + + + Form + + + + 0 + + + 0 + + + 0 + + + + + Memory settings + + + + + + MB + + + + + + + Initial memory size + + + + + + + + 1 + 0 + + + + + + + + Max memory size + + + + + + + + 1 + 0 + + + + + + + + MB + + + + + + + + + + Logs and debug + + + + + + + + Working directory + + + + + + + + + + PushButton + + + + + + + Verbose level + + + + + + + + + + + + + + Print log in a file + + + true + + + + + + + Remove log file on success + + + true + + + + + + + + + Keep working files + + + false + + + + + + + + + + Advanced meshing options + + + + + + + + + Volumic gradation + + + + + + + Option as text + + + + + + + + + + Create new nodes + + + + + + + Remove initial central point + + + + + + + Use FEM correction + + + + + + + Use boundary recovery version + + + + + + + + + + + SMESHGUI_SpinBox + QSpinBox +
SMESHGUI_SpinBox.h
+
+
+ + +
diff --git a/src/GUI/GHS3DPluginGUI_Dlg.h b/src/GUI/GHS3DPluginGUI_Dlg.h new file mode 100644 index 0000000..f7bfd1c --- /dev/null +++ b/src/GUI/GHS3DPluginGUI_Dlg.h @@ -0,0 +1,43 @@ +// Copyright (C) 2007-2013 CEA/DEN, 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. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +// File : GHS3DPluginGUI_Dlg.h +// Author : Renaud NEDELEC (OpenCascade) + +#ifndef GHS3DPLUGINGUI_H +#define GHS3DPLUGINGUI_H + +////////////////////////////////////////// +// GHS3DPluginGUI_AdvWidget +////////////////////////////////////////// + +#include "ui_GHS3DPluginGUI_AdvWidget_QTD.h" +#include "GHS3DPluginGUI_HypothesisCreator.h" + +class GHS3DPLUGINGUI_EXPORT GHS3DPluginGUI_AdvWidget : public QWidget, + public Ui::GHS3DPluginGUI_AdvWidget_QTD +{ + Q_OBJECT + +public: + GHS3DPluginGUI_AdvWidget( QWidget* = 0, Qt::WindowFlags = 0 ); + ~GHS3DPluginGUI_AdvWidget(); +}; + +#endif \ No newline at end of file diff --git a/src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx b/src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx index 25d7101..5f97baf 100644 --- a/src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/GHS3DPluginGUI_HypothesisCreator.cxx @@ -24,6 +24,7 @@ // #include "GHS3DPluginGUI_HypothesisCreator.h" #include "GHS3DPluginGUI_Enums.h" +#include "GHS3DPluginGUI_Dlg.h" #include @@ -409,71 +410,41 @@ QFrame* GHS3DPluginGUI_HypothesisCreator::buildFrame() QGridLayout* anAdvLayout = new QGridLayout( myAdvGroup ); anAdvLayout->setSpacing( 6 ); anAdvLayout->setMargin( 11 ); - - myMaximumMemoryCheck = new QCheckBox( tr( "MAX_MEMORY_SIZE" ), myAdvGroup ); - myMaximumMemorySpin = new QSpinBox( myAdvGroup ); - myMaximumMemorySpin->setMinimum( 1 ); - myMaximumMemorySpin->setMaximum( maxAvailableMemory() ); - myMaximumMemorySpin->setSingleStep( 10 ); - QLabel* aMegabyteLabel = new QLabel( tr( "MEGABYTE" ), myAdvGroup ); - - myInitialMemoryCheck = new QCheckBox( tr( "INIT_MEMORY_SIZE" ), myAdvGroup ); - myInitialMemorySpin = new QSpinBox( myAdvGroup ); - myInitialMemorySpin->setMinimum( 1 ); - myInitialMemorySpin->setMaximum( maxAvailableMemory() ); - myInitialMemorySpin->setSingleStep( 10 ); - QLabel* aMegabyteLabel2 = new QLabel( tr( "MEGABYTE" ), myAdvGroup ); - - QLabel* aWorkinDirLabel = new QLabel( tr( "WORKING_DIR" ), myAdvGroup ); - myWorkingDir = new QLineEdit( myAdvGroup ); - //myWorkingDir->setReadOnly( true ); - QPushButton* dirBtn = new QPushButton( tr( "SELECT_DIR" ), myAdvGroup ); - dirBtn->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); - - myKeepFiles = new QCheckBox( tr( "KEEP_WORKING_FILES" ), myAdvGroup ); + myAdvWidget = new GHS3DPluginGUI_AdvWidget(myAdvGroup); + anAdvLayout->addWidget( myAdvWidget); - QLabel* aVerboseLevelLabel = new QLabel( tr( "VERBOSE_LEVEL" ), myAdvGroup ); - myVerboseLevelSpin = new QSpinBox( myAdvGroup ); - myVerboseLevelSpin->setMinimum( 0 ); - myVerboseLevelSpin->setMaximum( 10 ); - myVerboseLevelSpin->setSingleStep( 1 ); + myAdvWidget->maxMemoryCheck->setText(tr( "MAX_MEMORY_SIZE" )); + myAdvWidget->initialMemoryCheck->setText(tr( "INIT_MEMORY_SIZE" )); - myToCreateNewNodesCheck = new QCheckBox( tr( "TO_ADD_NODES" ), myAdvGroup ); + myAdvWidget->maxMemorySpin ->setMinimum( 1 ); + myAdvWidget->maxMemorySpin ->setMaximum( maxAvailableMemory() ); + myAdvWidget->maxMemorySpin ->setSingleStep( 10 ); - myRemoveInitialCentralPointCheck = new QCheckBox( tr( "NO_INITIAL_CENTRAL_POINT" ), myAdvGroup ); + myAdvWidget->initialMemorySpin->setMinimum( 1 ); + myAdvWidget->initialMemorySpin->setMaximum( maxAvailableMemory() ); + myAdvWidget->initialMemorySpin->setSingleStep( 10 ); + + myAdvWidget->initialMemoryLabel ->setText (tr( "MEGABYTE" )); + myAdvWidget->maxMemoryLabel ->setText (tr( "MEGABYTE" )); - myBoundaryRecoveryCheck = new QCheckBox( tr( "RECOVERY_VERSION" ), myAdvGroup ); + myAdvWidget->workingDirectoryLabel ->setText (tr( "WORKING_DIR" )); + myAdvWidget->workingDirectoryPushButton ->setText (tr( "SELECT_DIR" )); + myAdvWidget->keepWorkingFilesCheck ->setText (tr( "KEEP_WORKING_FILES" )); + myAdvWidget->verboseLevelLabel ->setText (tr( "VERBOSE_LEVEL" )); + myAdvWidget->removeLogOnSuccessCheck ->setText (tr( "REMOVE_LOG_ON_SUCCESS" )); + myAdvWidget->logInFileCheck ->setText (tr( "LOG_IN_FILE" )); - myFEMCorrectionCheck = new QCheckBox( tr( "FEM_CORRECTION" ), myAdvGroup ); + myAdvWidget->memoryGroupBox ->setTitle(tr( "MEMORY_GROUP_TITLE" )); + myAdvWidget->logGroupBox ->setTitle(tr( "LOG_GROUP_TITLE" )); + myAdvWidget->advancedMeshingGroupBox ->setTitle(tr( "ADVANCED_MESHING_GROUP_TITLE" )); - QLabel* myGradationLabel = new QLabel( tr( "GHS3D_GRADATION" ), myAdvGroup ); - myGradation = new SMESHGUI_SpinBox(myAdvGroup); - myGradation->RangeStepAndValidator(1.05, 5.0, 0.05, "length_precision"); - - QLabel* aTextOptionLabel = new QLabel( tr( "TEXT_OPTION" ), myAdvGroup ); - myTextOption = new QLineEdit( myAdvGroup ); - - row = 0; - anAdvLayout->addWidget( myMaximumMemoryCheck, row, 0, 1, 1 ); - anAdvLayout->addWidget( myMaximumMemorySpin, row, 1, 1, 1 ); - anAdvLayout->addWidget( aMegabyteLabel, row++, 2, 1, 1 ); - anAdvLayout->addWidget( myInitialMemoryCheck, row, 0, 1, 1 ); - anAdvLayout->addWidget( myInitialMemorySpin, row, 1, 1, 1 ); - anAdvLayout->addWidget( aMegabyteLabel2, row++, 2, 1, 1 ); - anAdvLayout->addWidget( aWorkinDirLabel, row, 0, 1, 1 ); - anAdvLayout->addWidget( myWorkingDir, row, 1, 1, 2 ); - anAdvLayout->addWidget( dirBtn, row++, 3, 1, 1 ); - anAdvLayout->addWidget( myKeepFiles, row++, 0, 1, 4 ); - anAdvLayout->addWidget( aVerboseLevelLabel, row, 0, 1, 1 ); - anAdvLayout->addWidget( myVerboseLevelSpin, row++, 1, 1, 2 ); - anAdvLayout->addWidget( myToCreateNewNodesCheck, row++, 0, 1, 4 ); - anAdvLayout->addWidget( myRemoveInitialCentralPointCheck, row++, 0, 1, 4 ); - anAdvLayout->addWidget( myBoundaryRecoveryCheck, row++, 0, 1, 4 ); - anAdvLayout->addWidget( myFEMCorrectionCheck, row++, 0, 1, 4 ); - anAdvLayout->addWidget( myGradationLabel, row, 0, 1, 1 ); - anAdvLayout->addWidget( myGradation, row++, 1, 1, 2 ); - anAdvLayout->addWidget( aTextOptionLabel, row, 0, 1, 1 ); - anAdvLayout->addWidget( myTextOption, row++, 1, 1, 2 ); + myAdvWidget->createNewNodesCheck ->setText (tr( "TO_ADD_NODES" )); + myAdvWidget->removeInitialCentralPointCheck->setText (tr( "NO_INITIAL_CENTRAL_POINT" )); + myAdvWidget->boundaryRecoveryCheck ->setText (tr( "RECOVERY_VERSION" )); + myAdvWidget->FEMCorrectionCheck ->setText (tr( "FEM_CORRECTION" )); + myAdvWidget->gradationLabel ->setText (tr( "GHS3D_GRADATION" )); + myAdvWidget->gradationSpinBox->RangeStepAndValidator(1.05, 5.0, 0.05, "length_precision"); + myAdvWidget->textOptionLabel->setText(tr( "TEXT_OPTION" )); // Enforced vertices parameters myEnfGroup = new QWidget(); @@ -646,10 +617,13 @@ QFrame* GHS3DPluginGUI_HypothesisCreator::buildFrame() // connections //connect( myToMeshHolesCheck, SIGNAL( toggled( bool ) ), this, SLOT( onToMeshHoles(bool))); - connect( myMaximumMemoryCheck, SIGNAL( toggled( bool ) ), this, SLOT( updateWidgets() ) ); - connect( myInitialMemoryCheck, SIGNAL( toggled( bool ) ), this, SLOT( updateWidgets() ) ); - connect( myBoundaryRecoveryCheck, SIGNAL( toggled( bool ) ), this, SLOT( updateWidgets() ) ); - connect( dirBtn, SIGNAL( clicked() ), this, SLOT( onDirBtnClicked() ) ); + connect( myAdvWidget->maxMemoryCheck, SIGNAL( toggled( bool ) ), this, SLOT( updateWidgets() ) ); + connect( myAdvWidget->initialMemoryCheck, SIGNAL( toggled( bool ) ), this, SLOT( updateWidgets() ) ); + connect( myAdvWidget->boundaryRecoveryCheck, SIGNAL( toggled( bool ) ), this, SLOT( updateWidgets() ) ); + connect( myAdvWidget->logInFileCheck, SIGNAL( toggled( bool ) ), this, SLOT( updateWidgets() ) ); + connect( myAdvWidget->keepWorkingFilesCheck, SIGNAL( toggled( bool ) ), this, SLOT( updateWidgets() ) ); + connect( myAdvWidget->workingDirectoryPushButton, SIGNAL( clicked() ), this, SLOT( onDirBtnClicked() ) ); + connect( myEnforcedTableWidget, SIGNAL( itemClicked(QTableWidgetItem *)), this, SLOT( synchronizeCoords() ) ); connect( myEnforcedTableWidget, SIGNAL( itemChanged(QTableWidgetItem *)), this, SLOT( updateEnforcedVertexValues(QTableWidgetItem *) ) ); connect( myEnforcedTableWidget, SIGNAL( itemSelectionChanged() ), this, SLOT( synchronizeCoords() ) ); @@ -1394,25 +1368,33 @@ void GHS3DPluginGUI_HypothesisCreator::onToMeshHoles(bool isOn) void GHS3DPluginGUI_HypothesisCreator::onDirBtnClicked() { - QString dir = SUIT_FileDlg::getExistingDirectory( dlg(), myWorkingDir->text(), QString() ); + QString dir = SUIT_FileDlg::getExistingDirectory( dlg(), myAdvWidget->workingDirectoryLineEdit->text(), QString() ); if ( !dir.isEmpty() ) - myWorkingDir->setText( dir ); + myAdvWidget->workingDirectoryLineEdit->setText( dir ); } void GHS3DPluginGUI_HypothesisCreator::updateWidgets() { //myToMakeGroupsOfDomains->setEnabled( myToMeshHolesCheck->isChecked() ); - myMaximumMemorySpin->setEnabled( myMaximumMemoryCheck->isChecked() ); - myInitialMemoryCheck->setEnabled( !myBoundaryRecoveryCheck->isChecked() ); - myInitialMemorySpin->setEnabled( myInitialMemoryCheck->isChecked() && !myBoundaryRecoveryCheck->isChecked() ); - myOptimizationLevelCombo->setEnabled( !myBoundaryRecoveryCheck->isChecked() ); + myAdvWidget->maxMemorySpin->setEnabled( myAdvWidget->maxMemoryCheck->isChecked() ); + myAdvWidget->initialMemoryCheck->setEnabled( !myAdvWidget->boundaryRecoveryCheck->isChecked() ); + myAdvWidget->initialMemorySpin->setEnabled( myAdvWidget->initialMemoryCheck->isChecked() && !myAdvWidget->boundaryRecoveryCheck->isChecked() ); + myOptimizationLevelCombo->setEnabled( !myAdvWidget->boundaryRecoveryCheck->isChecked() ); + if ( sender() == myAdvWidget->logInFileCheck || + sender() == myAdvWidget->keepWorkingFilesCheck ) + { + bool logFileRemovable = myAdvWidget->logInFileCheck->isChecked() && + !myAdvWidget->keepWorkingFilesCheck->isChecked(); + + myAdvWidget->removeLogOnSuccessCheck->setEnabled( logFileRemovable ); + } } bool GHS3DPluginGUI_HypothesisCreator::checkParams(QString& msg) const { MESSAGE("GHS3DPluginGUI_HypothesisCreator::checkParams"); - if ( !QFileInfo( myWorkingDir->text().trimmed() ).isWritable() ) { + if ( !QFileInfo( myAdvWidget->workingDirectoryLineEdit->text().trimmed() ).isWritable() ) { SUIT_MessageBox::warning( dlg(), tr( "SMESH_WRN_WARNING" ), tr( "GHS3D_PERMISSION_DENIED" ) ); @@ -1432,24 +1414,26 @@ void GHS3DPluginGUI_HypothesisCreator::retrieveParams() const if ( myName ) myName->setText( data.myName ); - myToMeshHolesCheck ->setChecked ( data.myToMeshHoles ); - myToMakeGroupsOfDomains ->setChecked ( data.myToMakeGroupsOfDomains ); - myOptimizationLevelCombo ->setCurrentIndex( data.myOptimizationLevel ); - myMaximumMemoryCheck ->setChecked ( data.myMaximumMemory > 0 ); - myMaximumMemorySpin ->setValue ( qMax( data.myMaximumMemory, - myMaximumMemorySpin->minimum() )); - myInitialMemoryCheck ->setChecked ( data.myInitialMemory > 0 ); - myInitialMemorySpin ->setValue ( qMax( data.myInitialMemory, - myInitialMemorySpin->minimum() )); - myWorkingDir ->setText ( data.myWorkingDir ); - myKeepFiles ->setChecked ( data.myKeepFiles ); - myVerboseLevelSpin ->setValue ( data.myVerboseLevel ); - myToCreateNewNodesCheck ->setChecked ( data.myToCreateNewNodes ); - myRemoveInitialCentralPointCheck ->setChecked ( data.myRemoveInitialCentralPoint ); - myBoundaryRecoveryCheck ->setChecked ( data.myBoundaryRecovery ); - myFEMCorrectionCheck ->setChecked ( data.myFEMCorrection ); - myGradation ->setValue ( data.myGradation ); - myTextOption ->setText ( data.myTextOption ); + myToMeshHolesCheck ->setChecked ( data.myToMeshHoles ); + myToMakeGroupsOfDomains ->setChecked ( data.myToMakeGroupsOfDomains ); + myOptimizationLevelCombo ->setCurrentIndex( data.myOptimizationLevel ); + myAdvWidget->maxMemoryCheck ->setChecked ( data.myMaximumMemory > 0 ); + myAdvWidget->maxMemorySpin ->setValue ( qMax( data.myMaximumMemory, + myAdvWidget->maxMemorySpin->minimum() )); + myAdvWidget->initialMemoryCheck ->setChecked ( data.myInitialMemory > 0 ); + myAdvWidget->initialMemorySpin ->setValue ( qMax( data.myInitialMemory, + myAdvWidget->initialMemorySpin->minimum() )); + myAdvWidget->workingDirectoryLineEdit ->setText ( data.myWorkingDir ); + myAdvWidget->keepWorkingFilesCheck ->setChecked ( data.myKeepFiles ); + myAdvWidget->verboseLevelSpin ->setValue ( data.myVerboseLevel ); + myAdvWidget->createNewNodesCheck ->setChecked ( data.myToCreateNewNodes ); + myAdvWidget->removeInitialCentralPointCheck ->setChecked ( data.myRemoveInitialCentralPoint ); + myAdvWidget->boundaryRecoveryCheck ->setChecked ( data.myBoundaryRecovery ); + myAdvWidget->FEMCorrectionCheck ->setChecked ( data.myFEMCorrection ); + myAdvWidget->gradationSpinBox ->setValue ( data.myGradation ); + myAdvWidget->textOptionLineEdit ->setText ( data.myTextOption ); + myAdvWidget->logInFileCheck ->setChecked ( !data.myLogInStandardOutput ); + myAdvWidget->removeLogOnSuccessCheck ->setChecked ( data.myRemoveLogOnSuccess ); TEnfVertexList::const_iterator it; int rowCount = 0; @@ -1692,6 +1676,8 @@ bool GHS3DPluginGUI_HypothesisCreator::readParamsFromHypo( GHS3DHypothesisData& h_data.myFEMCorrection = h->GetFEMCorrection(); h_data.myGradation = h->GetGradation(); h_data.myTextOption = h->GetTextOption(); + h_data.myLogInStandardOutput = h->GetStandardOutputLog(); + h_data.myRemoveLogOnSuccess = h->GetRemoveLogOnSuccess(); GHS3DPlugin::GHS3DEnforcedVertexList_var vertices = h->GetEnforcedVertices(); MESSAGE("vertices->length(): " << vertices->length()); @@ -1762,24 +1748,28 @@ bool GHS3DPluginGUI_HypothesisCreator::storeParamsToHypo( const GHS3DHypothesisD h->SetInitialMemory ( h_data.myInitialMemory ); if ( h->GetOptimizationLevel() != h_data.myOptimizationLevel ) h->SetOptimizationLevel( h_data.myOptimizationLevel ); - if ( h->GetKeepFiles() != h_data.myKeepFiles ) + if ( h->GetKeepFiles() != h_data.myKeepFiles ) h->SetKeepFiles ( h_data.myKeepFiles ); if ( h->GetWorkingDirectory() != h_data.myWorkingDir ) h->SetWorkingDirectory ( h_data.myWorkingDir.toLatin1().constData() ); - if ( h->GetVerboseLevel() != h_data.myVerboseLevel ) - h->SetVerboseLevel ( h_data.myVerboseLevel ); + if ( h->GetVerboseLevel() != h_data.myVerboseLevel ) + h->SetVerboseLevel ( h_data.myVerboseLevel ); if ( h->GetToCreateNewNodes() != h_data.myToCreateNewNodes ) - h->SetToCreateNewNodes( h_data.myToCreateNewNodes ); + h->SetToCreateNewNodes( h_data.myToCreateNewNodes ); if ( h->GetToRemoveCentralPoint() != h_data.myRemoveInitialCentralPoint ) h->SetToRemoveCentralPoint( h_data.myRemoveInitialCentralPoint ); if ( h->GetToUseBoundaryRecoveryVersion() != h_data.myBoundaryRecovery ) h->SetToUseBoundaryRecoveryVersion( h_data.myBoundaryRecovery ); if ( h->GetFEMCorrection() != h_data.myFEMCorrection ) - h->SetFEMCorrection( h_data.myFEMCorrection ); - if ( h->GetGradation() != h_data.myGradation ) - h->SetGradation ( h_data.myGradation ); - if ( h->GetTextOption() != h_data.myTextOption ) + h->SetFEMCorrection ( h_data.myFEMCorrection ); + if ( h->GetGradation() != h_data.myGradation ) + h->SetGradation ( h_data.myGradation ); + if ( h->GetTextOption() != h_data.myTextOption ) h->SetTextOption ( h_data.myTextOption.toLatin1().constData() ); + if ( h->GetStandardOutputLog() != h_data.myLogInStandardOutput ) + h->SetStandardOutputLog( h_data.myLogInStandardOutput ); + if ( h->GetRemoveLogOnSuccess() != h_data.myRemoveLogOnSuccess ) + h->SetRemoveLogOnSuccess( h_data.myRemoveLogOnSuccess ); // Enforced vertices int nbVertex = (int) h_data.myEnforcedVertices.size(); @@ -1868,18 +1858,20 @@ bool GHS3DPluginGUI_HypothesisCreator::readParamsFromWidgets( GHS3DHypothesisDat h_data.myName = myName ? myName->text() : ""; h_data.myToMeshHoles = myToMeshHolesCheck->isChecked(); h_data.myToMakeGroupsOfDomains = myToMakeGroupsOfDomains->isChecked(); - h_data.myMaximumMemory = myMaximumMemoryCheck->isChecked() ? myMaximumMemorySpin->value() : -1; - h_data.myInitialMemory = myInitialMemoryCheck->isChecked() ? myInitialMemorySpin->value() : -1; + h_data.myMaximumMemory = myAdvWidget->maxMemoryCheck->isChecked() ? myAdvWidget->maxMemorySpin->value() : -1; + h_data.myInitialMemory = myAdvWidget->initialMemoryCheck->isChecked() ? myAdvWidget->initialMemorySpin->value() : -1; h_data.myOptimizationLevel = myOptimizationLevelCombo->currentIndex(); - h_data.myKeepFiles = myKeepFiles->isChecked(); - h_data.myWorkingDir = myWorkingDir->text().trimmed(); - h_data.myVerboseLevel = myVerboseLevelSpin->value(); - h_data.myToCreateNewNodes = myToCreateNewNodesCheck->isChecked(); - h_data.myRemoveInitialCentralPoint = myRemoveInitialCentralPointCheck->isChecked(); - h_data.myBoundaryRecovery = myBoundaryRecoveryCheck->isChecked(); - h_data.myFEMCorrection = myFEMCorrectionCheck->isChecked(); - h_data.myGradation = myGradation->value(); - h_data.myTextOption = myTextOption->text(); + h_data.myKeepFiles = myAdvWidget->keepWorkingFilesCheck->isChecked(); + h_data.myWorkingDir = myAdvWidget->workingDirectoryLineEdit->text().trimmed(); + h_data.myVerboseLevel = myAdvWidget->verboseLevelSpin->value(); + h_data.myToCreateNewNodes = myAdvWidget->createNewNodesCheck->isChecked(); + h_data.myRemoveInitialCentralPoint = myAdvWidget->removeInitialCentralPointCheck->isChecked(); + h_data.myBoundaryRecovery = myAdvWidget->boundaryRecoveryCheck->isChecked(); + h_data.myFEMCorrection = myAdvWidget->FEMCorrectionCheck->isChecked(); + h_data.myGradation = myAdvWidget->gradationSpinBox->value(); + h_data.myTextOption = myAdvWidget->textOptionLineEdit->text(); + h_data.myLogInStandardOutput = !myAdvWidget->logInFileCheck->isChecked(); + h_data.myRemoveLogOnSuccess = myAdvWidget->removeLogOnSuccessCheck->isChecked(); // Enforced vertices h_data.myEnforcedVertices.clear(); diff --git a/src/GUI/GHS3DPluginGUI_HypothesisCreator.h b/src/GUI/GHS3DPluginGUI_HypothesisCreator.h index a9830d9..29a68d7 100644 --- a/src/GUI/GHS3DPluginGUI_HypothesisCreator.h +++ b/src/GUI/GHS3DPluginGUI_HypothesisCreator.h @@ -61,6 +61,7 @@ class SMESHGUI_SpinBox; class StdMeshersGUI_ObjectReferenceParamWdg; class LightApp_SelectionMgr; class SUIT_SelectionFilter; +class GHS3DPluginGUI_AdvWidget; class QTEnfVertex { @@ -140,7 +141,8 @@ typedef std::set< TEnfMesh*, CompareEnfMeshes > TEnfMeshList; typedef struct { - bool myToMeshHoles,myToMakeGroupsOfDomains,myKeepFiles,myToCreateNewNodes,myBoundaryRecovery,myFEMCorrection,myRemoveInitialCentralPoint; + bool myToMeshHoles,myToMakeGroupsOfDomains,myKeepFiles,myToCreateNewNodes,myBoundaryRecovery,myFEMCorrection,myRemoveInitialCentralPoint, + myLogInStandardOutput, myRemoveLogOnSuccess; int myMaximumMemory,myInitialMemory,myOptimizationLevel; QString myName,myWorkingDir,myTextOption; double myGradation; @@ -213,20 +215,8 @@ private: QCheckBox* myToMakeGroupsOfDomains; QComboBox* myOptimizationLevelCombo; - QWidget* myAdvGroup; - QCheckBox* myMaximumMemoryCheck; - QSpinBox* myMaximumMemorySpin; - QCheckBox* myInitialMemoryCheck; - QSpinBox* myInitialMemorySpin; - QLineEdit* myWorkingDir; - QCheckBox* myKeepFiles; - QSpinBox* myVerboseLevelSpin; - QCheckBox* myToCreateNewNodesCheck; - QCheckBox* myRemoveInitialCentralPointCheck; - QCheckBox* myBoundaryRecoveryCheck; - QCheckBox* myFEMCorrectionCheck; - SMESHGUI_SpinBox* myGradation; - QLineEdit* myTextOption; + QWidget* myAdvGroup; + GHS3DPluginGUI_AdvWidget* myAdvWidget; QWidget* myEnfGroup; QPixmap iconVertex, iconCompound; diff --git a/src/GUI/GHS3DPlugin_msg_en.ts b/src/GUI/GHS3DPlugin_msg_en.ts index b77bcb3..a7e3aca 100644 --- a/src/GUI/GHS3DPlugin_msg_en.ts +++ b/src/GUI/GHS3DPlugin_msg_en.ts @@ -29,11 +29,15 @@ GHS3D_TO_MESH_HOLES - To mesh holes + Mesh holes GHS3D_TO_MAKE_DOMAIN_GROUPS - To make groups of domains + Make groups of domains + + + ADVANCED_MESHING_GROUP_TITLE + Advanced meshing options INIT_MEMORY_SIZE @@ -41,7 +45,7 @@ KEEP_WORKING_FILES - To keep working files + Keep all working files LEVEL_NONE @@ -63,30 +67,46 @@ LEVEL_STRONG Strong + + LOG_IN_FILE + Print log in a file + + + LOG_GROUP_TITLE + Logs and debug + MAX_MEMORY_SIZE Maximum memory size MEGABYTE - Megabytes + MB + + + MEMORY_GROUP_TITLE + Memory settings NO_INITIAL_CENTRAL_POINT - To remove initial central point + Remove initial central point RECOVERY_VERSION - To use boundary recovery version + Use boundary recovery version FEM_CORRECTION - To use FEM correction + Use FEM correction GHS3D_GRADATION Volumic gradation + + REMOVE_LOG_ON_SUCCESS + Remove log on success + SELECT_DIR ... @@ -97,7 +117,7 @@ TO_ADD_NODES - To create new nodes + Create new nodes VERBOSE_LEVEL diff --git a/src/GUI/GHS3DPlugin_msg_fr.ts b/src/GUI/GHS3DPlugin_msg_fr.ts index c2291bd..7bb77a8 100755 --- a/src/GUI/GHS3DPlugin_msg_fr.ts +++ b/src/GUI/GHS3DPlugin_msg_fr.ts @@ -35,13 +35,17 @@ GHS3D_TO_MESH_HOLES Mailler les trous + + ADVANCED_MESHING_GROUP_TITLE + Options de maillage avancées + INIT_MEMORY_SIZE Taille initiale de la mémoire KEEP_WORKING_FILES - Conserver les fichiers temporaires + Conserver tous les fichiers temporaires LEVEL_NONE @@ -63,6 +67,14 @@ LEVEL_STRONG Fort + + LOG_IN_FILE + Imprimer le log dans un fichier + + + LOG_GROUP_TITLE + Logs et debug + MAX_MEMORY_SIZE Taille maximale de la mémoire @@ -71,6 +83,10 @@ MEGABYTE Megabytes + + MEMORY_GROUP_TITLE + Paramètres mémoire + NO_INITIAL_CENTRAL_POINT Supprimer le point central initial @@ -81,12 +97,16 @@ FEM_CORRECTION - Utiliser correction FEM + Utiliser la correction FEM GHS3D_GRADATION Gradation volumique + + REMOVE_LOG_ON_SUCCESS + Supprimer le log en cas de succès + SELECT_DIR ... diff --git a/src/GUI/Makefile.am b/src/GUI/Makefile.am index 6d70baa..489fdf7 100644 --- a/src/GUI/Makefile.am +++ b/src/GUI/Makefile.am @@ -27,6 +27,7 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am # header files salomeinclude_HEADERS = \ + GHS3DPluginGUI_Dlg.h \ GHS3DPluginGUI_HypothesisCreator.h \ GHS3DPluginGUI_Enums.h @@ -35,10 +36,17 @@ lib_LTLIBRARIES = libGHS3DPluginGUI.la dist_libGHS3DPluginGUI_la_SOURCES = \ GHS3DPluginGUI.cxx \ - GHS3DPluginGUI_HypothesisCreator.cxx + GHS3DPluginGUI_HypothesisCreator.cxx \ + GHS3DPluginGUI_AdvWidget.cxx MOC_FILES = \ - GHS3DPluginGUI_HypothesisCreator_moc.cxx + GHS3DPluginGUI_HypothesisCreator_moc.cxx \ + GHS3DPluginGUI_Dlg_moc.cxx + +UIC_FILES = \ + ui_GHS3DPluginGUI_AdvWidget_QTD.h + +BUILT_SOURCES = $(UIC_FILES) nodist_libGHS3DPluginGUI_la_SOURCES= \ $(MOC_FILES)