1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 // File : HexoticPlugin_Hypothesis.hxx
22 // Author : Lioka RAZAFINDRAZAKA (CEA)
25 #ifndef _HexoticPlugin_Hypothesis_HXX_
26 #define _HexoticPlugin_Hypothesis_HXX_
28 #include "HexoticPlugin_Defs.hxx"
30 #include "SMESH_Hypothesis.hxx"
31 #include "Utils_SALOME_Exception.hxx"
33 // Parameters for work of Hexotic
36 class HEXOTICPLUGIN_EXPORT HexoticPlugin_Hypothesis: public SMESH_Hypothesis
40 HexoticPlugin_Hypothesis(int hypId, int studyId, SMESH_Gen* gen);
42 void SetHexesMinLevel(int theVal);
43 int GetHexesMinLevel() const { return _hexesMinLevel; }
45 void SetHexesMaxLevel(int theVal);
46 int GetHexesMaxLevel() const { return _hexesMaxLevel; }
48 void SetHexoticQuadrangles(bool theVal);
49 bool GetHexoticQuadrangles() const { return _hexoticQuadrangles; }
51 void SetHexoticIgnoreRidges(bool theVal);
52 bool GetHexoticIgnoreRidges() const { return _hexoticIgnoreRidges; }
54 void SetHexoticInvalidElements(bool theVal);
55 bool GetHexoticInvalidElements() const { return _hexoticInvalidElements; }
57 void SetHexoticSharpAngleThreshold(int theVal);
58 int GetHexoticSharpAngleThreshold() const { return _hexoticSharpAngleThreshold; }
60 void SetHexoticNbProc(int theVal);
61 int GetHexoticNbProc() const { return _hexoticNbProc; }
63 void SetHexoticWorkingDirectory(const std::string& path);
64 std::string GetHexoticWorkingDirectory() const { return _hexoticWorkingDirectory; }
66 // the parameters default values
68 static int GetDefaultHexesMinLevel();
69 static int GetDefaultHexesMaxLevel();
70 static bool GetDefaultHexoticQuadrangles();
71 static bool GetDefaultHexoticIgnoreRidges();
72 static bool GetDefaultHexoticInvalidElements();
73 static int GetDefaultHexoticSharpAngleThreshold();
74 static int GetDefaultHexoticNbProc();
75 static std::string GetDefaultHexoticWorkingDirectory();
78 virtual std::ostream& SaveTo(std::ostream& save);
79 virtual std::istream& LoadFrom(std::istream& load);
80 friend std::ostream& operator <<(std::ostream& save, HexoticPlugin_Hypothesis& hyp);
81 friend std::istream& operator >>(std::istream& load, HexoticPlugin_Hypothesis& hyp);
85 * \param theMesh - the built mesh
86 * \param theShape - the geometry of interest
87 * \retval bool - always false
89 virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
92 * \brief Initialize my parameter values by default parameters.
93 * \retval bool - true if parameter values have been successfully defined
95 virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
100 bool _hexoticQuadrangles;
101 bool _hexoticIgnoreRidges;
102 bool _hexoticInvalidElements;
103 int _hexoticSharpAngleThreshold;
105 std::string _hexoticWorkingDirectory ;