1 // Copyright (C) 2012-2015 ALNEOS
2 // Copyright (C) 2016-2022 EDF R&D
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.alneos.com/ or email : contact@alneos.fr
19 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #ifndef GMSHPLUGINGUI_HypothesisCreator_HeaderFile
22 #define GMSHPLUGINGUI_HypothesisCreator_HeaderFile
24 #include "GmshVersion.h"
25 #include "GMSHPluginGUI.h"
27 #include <SMESHGUI_Hypotheses.h>
29 #include <TopAbs_ShapeEnum.hxx>
33 class SMESHGUI_SpinBox;
34 class GeomSelectionTools;
43 int my2DAlgo,my3DAlgo,myRecomb2DAlgo;
45 int mySubdivAlgo,myRemeshAlgo,myRemeshPara,mySmouthSteps;
46 bool myUseIncomplElem;
48 #if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=10
49 double mySizeFactor,myMaxSize, myMinSize, myMeshCurvatureSize;
50 QString myMaxSizeVar, myMinSizeVar, mySmouthStepsVar, mySizeFactorVar, myMeshCurvatureSizeVar;
52 double mySizeFactor,myMaxSize, myMinSize;
53 QString myMaxSizeVar, myMinSizeVar, mySmouthStepsVar, mySizeFactorVar;
55 mutable QString myErrorMsg;
59 * \brief Class for creation of GMSH2D and GMSH3D hypotheses
61 class GMSHPLUGIN_GUI_EXPORT GMSHPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
66 GMSHPluginGUI_HypothesisCreator( const QString& );
67 virtual ~GMSHPluginGUI_HypothesisCreator();
69 virtual bool checkParams(QString& msg) const;
70 virtual QString helpPage() const;
73 virtual QFrame* buildFrame ();
74 virtual void retrieveParams() const;
75 virtual QString storeParams () const;
77 virtual QString caption() const;
78 virtual QPixmap icon() const;
79 virtual QString type() const;
83 virtual void onAddCompound();
84 virtual void onRemoveCompound();
87 bool readParamsFromHypo( GmshHypothesisData& ) const;
88 bool readParamsFromWidgets( GmshHypothesisData& ) const;
89 bool storeParamsToHypo( const GmshHypothesisData& ) const;
90 GeomSelectionTools* getGeomSelectionTools();
96 QComboBox* myRecomb2DAlgo;
97 QCheckBox* myRecombineAll;
98 QComboBox* mySubdivAlgo;
99 QComboBox* myRemeshAlgo;
100 QComboBox* myRemeshPara;
101 SMESHGUI_SpinBox* mySmouthSteps;
102 SMESHGUI_SpinBox* mySizeFactor;
103 #if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=10
104 SMESHGUI_SpinBox* myMeshCurvatureSize;
106 SMESHGUI_SpinBox* myMaxSize;
107 SMESHGUI_SpinBox* myMinSize;
108 QCheckBox* myUseIncomplElem;
109 QCheckBox* mySecondOrder;
113 QTableWidget* myCompoundTable;
114 GeomSelectionTools* myGeomSelectionTools;
115 QSet<QString> myCompoundSet;
116 QSet<QString> myCompoundToRemove;