1 // Copyright (C) 2012-2015 ALNEOS
2 // Copyright (C) 2016-2024 EDF
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;
60 * \brief Class for creation of GMSH2D and GMSH3D hypotheses
62 class GMSHPLUGIN_GUI_EXPORT GMSHPluginGUI_HypothesisCreator : public SMESHGUI_GenericHypothesisCreator
67 GMSHPluginGUI_HypothesisCreator( const QString& );
68 virtual ~GMSHPluginGUI_HypothesisCreator();
70 virtual bool checkParams(QString& msg) const;
71 virtual QString helpPage() const;
74 virtual QFrame* buildFrame ();
75 virtual void retrieveParams() const;
76 virtual QString storeParams () const;
78 virtual QString caption() const;
79 virtual QPixmap icon() const;
80 virtual QString type() const;
84 virtual void onAddCompound();
85 virtual void onRemoveCompound();
88 bool readParamsFromHypo( GmshHypothesisData& ) const;
89 bool readParamsFromWidgets( GmshHypothesisData& ) const;
90 bool storeParamsToHypo( const GmshHypothesisData& ) const;
91 GeomSelectionTools* getGeomSelectionTools();
97 QComboBox* myRecomb2DAlgo;
98 QCheckBox* myRecombineAll;
99 QComboBox* mySubdivAlgo;
100 QComboBox* myRemeshAlgo;
101 QComboBox* myRemeshPara;
102 SMESHGUI_SpinBox* mySmouthSteps;
103 SMESHGUI_SpinBox* mySizeFactor;
104 #if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=10
105 SMESHGUI_SpinBox* myMeshCurvatureSize;
107 SMESHGUI_SpinBox* myMaxSize;
108 SMESHGUI_SpinBox* myMinSize;
109 QCheckBox* myUseIncomplElem;
110 QCheckBox* mySecondOrder;
111 QComboBox* myVerbLvl;
115 QTableWidget* myCompoundTable;
116 GeomSelectionTools* myGeomSelectionTools;
117 QSet<QString> myCompoundSet;
118 QSet<QString> myCompoundToRemove;