1 // Copyright (C) 2007-2013 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 SetMinSize(double theVal);
49 double GetMinSize() const { return _minSize; }
51 void SetMaxSize(double theVal);
52 double GetMaxSize() const { return _maxSize; }
54 void SetHexoticIgnoreRidges(bool theVal);
55 bool GetHexoticIgnoreRidges() const { return _hexoticIgnoreRidges; }
57 void SetHexoticInvalidElements(bool theVal);
58 bool GetHexoticInvalidElements() const { return _hexoticInvalidElements; }
60 void SetHexoticSharpAngleThreshold(double theVal);
61 double GetHexoticSharpAngleThreshold() const { return _hexoticSharpAngleThreshold; }
63 void SetHexoticNbProc(int theVal);
64 int GetHexoticNbProc() const { return _hexoticNbProc; }
66 void SetHexoticWorkingDirectory(const std::string& path);
67 std::string GetHexoticWorkingDirectory() const { return _hexoticWorkingDirectory; }
69 void SetHexoticSdMode(int theVal);
70 int GetHexoticSdMode() const { return _hexoticSdMode; }
72 void SetHexoticVerbosity(int theVal);
73 int GetHexoticVerbosity() const { return _hexoticVerbosity; }
75 void SetHexoticMaxMemory(int theVal);
76 int GetHexoticMaxMemory() const { return _hexoticMaxMemory; }
78 // the parameters default values
80 static int GetDefaultHexesMinLevel();
81 static int GetDefaultHexesMaxLevel();
82 static double GetDefaultMinSize();
83 static double GetDefaultMaxSize();
84 static bool GetDefaultHexoticIgnoreRidges();
85 static bool GetDefaultHexoticInvalidElements();
86 static double GetDefaultHexoticSharpAngleThreshold();
87 static int GetDefaultHexoticNbProc();
88 static std::string GetDefaultHexoticWorkingDirectory();
89 static int GetDefaultHexoticSdMode();
90 static int GetDefaultHexoticVerbosity();
91 static int GetDefaultHexoticMaxMemory();
94 virtual std::ostream& SaveTo(std::ostream& save);
95 virtual std::istream& LoadFrom(std::istream& load);
96 friend std::ostream& operator <<(std::ostream& save, HexoticPlugin_Hypothesis& hyp);
97 friend std::istream& operator >>(std::istream& load, HexoticPlugin_Hypothesis& hyp);
100 * \brief Does nothing
101 * \param theMesh - the built mesh
102 * \param theShape - the geometry of interest
103 * \retval bool - always false
105 virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
108 * \brief Initialize my parameter values by default parameters.
109 * \retval bool - true if parameter values have been successfully defined
111 virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
118 bool _hexoticIgnoreRidges;
119 bool _hexoticInvalidElements;
120 double _hexoticSharpAngleThreshold;
123 int _hexoticVerbosity;
124 int _hexoticMaxMemory;
125 std::string _hexoticWorkingDirectory ;