Salome HOME
Copyright update 2022
[plugins/hexoticplugin.git] / src / HexoticPlugin / HexoticPlugin_Hypothesis_i.hxx
1 // Copyright (C) 2007-2022  CEA/DEN, EDF R&D
2 //
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, or (at your option) any later version.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 // ---
21 // File   : HexoticPlugin_Hypothesis_i.hxx
22 // Author : Lioka RAZAFINDRAZAKA (CEA)
23 // ---
24 //
25 #ifndef _HexoticPlugin_Hypothesis_i_HXX_
26 #define _HexoticPlugin_Hypothesis_i_HXX_
27
28 #include <SALOMEconfig.h>
29 #include CORBA_SERVER_HEADER(HexoticPlugin_Algorithm)
30
31 #include "SMESH_Hypothesis_i.hxx"
32 #include "HexoticPlugin_Hypothesis.hxx"
33
34 class SMESH_Gen;
35
36 // HexoticPlugin parameters hypothesis
37
38 class HEXOTICPLUGIN_EXPORT HexoticPlugin_Hypothesis_i:
39   public virtual POA_HexoticPlugin::HexoticPlugin_Hypothesis,
40   public virtual SMESH_Hypothesis_i
41 {
42  public:
43   // Constructor
44   HexoticPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
45                               ::SMESH_Gen*            theGenImpl);
46   // Destructor
47   virtual ~HexoticPlugin_Hypothesis_i();
48
49   // Methods for setting and getting parameters values
50   void SetHexesMinLevel(CORBA::Long theVal);
51   CORBA::Long GetHexesMinLevel();
52
53   void SetHexesMaxLevel(CORBA::Long theVal);
54   CORBA::Long GetHexesMaxLevel();
55
56   void SetMinSize(CORBA::Double theVal);
57   CORBA::Double GetMinSize();
58
59   void SetMaxSize(CORBA::Double theVal);
60   CORBA::Double GetMaxSize();
61
62   void SetGeomApproxAngle(CORBA::Double angle);
63   CORBA::Double GetGeomApproxAngle();
64
65   void SetHexoticIgnoreRidges(CORBA::Boolean theVal);
66   CORBA::Boolean GetHexoticIgnoreRidges();
67
68   void SetHexoticInvalidElements(CORBA::Boolean theVal);
69   CORBA::Boolean GetHexoticInvalidElements();
70
71   void SetHexoticSharpAngleThreshold(CORBA::Double theVal);
72   CORBA::Double GetHexoticSharpAngleThreshold();
73
74   void SetHexoticNbProc(CORBA::Long theVal);
75   CORBA::Long GetHexoticNbProc();
76
77   void SetHexoticWorkingDirectory(const char* path);
78   char* GetHexoticWorkingDirectory();
79
80   void SetKeepFiles(::CORBA::Boolean toKeep);
81   ::CORBA::Boolean GetKeepFiles();
82
83   void SetStandardOutputLog(::CORBA::Boolean logInStandardOutput);
84   ::CORBA::Boolean GetStandardOutputLog();
85
86   void SetRemoveLogOnSuccess(::CORBA::Boolean removeLogOnSuccess);
87   ::CORBA::Boolean GetRemoveLogOnSuccess();
88
89   void SetHexoticSdMode(CORBA::Long value);
90   CORBA::Long GetHexoticSdMode();
91
92   void SetHexoticVerbosity(CORBA::Long theVal);
93   CORBA::Long GetHexoticVerbosity();
94
95   void SetHexoticMaxMemory(CORBA::Long theVal);
96   CORBA::Long GetHexoticMaxMemory();
97
98   void SetAdvancedOption(const char* theOptions);
99   char* GetAdvancedOption();
100   void SetTextOptions(const char* theOptions); // obsolete
101   char* GetTextOptions();
102
103   void SetOptionValue(const char* optionName, const char* optionValue);
104   char* GetOptionValue(const char* optionName);
105   void UnsetOption(const char* optionName);
106
107   HexoticPlugin::string_array* GetOptionValues();
108   HexoticPlugin::string_array* GetAdvancedOptionValues();
109
110   void SetOptionValues(const HexoticPlugin::string_array& options);
111   void SetAdvancedOptionValues(const HexoticPlugin::string_array& options);
112
113   void AddOption(const char* optionName, const char* optionValue);
114   char* GetOption(const char* optionName);
115   void SetSizeMapEntry(const char* theEntry, CORBA::Double theSize);
116   void UnsetSizeMapEntry(const char* theEntry);
117
118   void SetSizeMap(GEOM::GEOM_Object_ptr theGeomObj, double theSize);
119   void UnsetSizeMap(GEOM::GEOM_Object_ptr theGeomObj);
120   HexoticPlugin::HexoticPluginSizeMapsList* GetSizeMaps ();
121
122   void SetNbLayers(CORBA::Long theVal);
123   CORBA::Long GetNbLayers();
124
125   void SetFirstLayerSize(CORBA::Double theVal);
126   CORBA::Double GetFirstLayerSize();
127
128   void SetDirection(CORBA::Boolean theVal);
129   CORBA::Boolean GetDirection();
130
131   void SetGrowth(CORBA::Double theVal);
132   CORBA::Double GetGrowth();
133
134   void SetFacesWithLayers(const SMESH::long_array& theVal);
135   SMESH::long_array* GetFacesWithLayers();
136
137   void SetImprintedFaces(const SMESH::long_array& theVal);
138   SMESH::long_array* GetImprintedFaces();
139
140   // Get implementation
141   ::HexoticPlugin_Hypothesis* GetImpl();
142   
143   // Verify whether hypothesis supports given entity type 
144   CORBA::Boolean IsDimSupported( SMESH::Dimension type );
145
146   // Methods for copying mesh definition to other geometry
147
148   // Return geometry this hypothesis depends on. Return false if there is no geometry parameter
149   virtual bool getObjectsDependOn( std::vector< std::string > & entryArray,
150                                    std::vector< int >         & subIDArray ) const;
151
152   // Set new geometry instead of that returned by getObjectsDependOn()
153   virtual bool setObjectsDependOn( std::vector< std::string > & entryArray,
154                                    std::vector< int >         & subIDArray );
155 };
156
157 #endif