Salome HOME
2c96546003e219ea00144b3115b41829cccdb243
[plugins/blsurfplugin.git] / src / BLSURFPlugin / BLSURFPlugin_Hypothesis_i.hxx
1 // Copyright (C) 2007-2012  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.
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    : BLSURFPlugin_Hypothesis.hxx
22 // Authors : Francis KLOSS (OCC) & Patrick LAUG (INRIA) & Lioka RAZAFINDRAZAKA (CEA)
23 //           Size maps developement: Nicolas GEIMER (OCC) & Gilles DAVID (EURIWARE)
24 // ---
25 //
26 #ifndef _BLSURFPlugin_Hypothesis_i_HXX_
27 #define _BLSURFPlugin_Hypothesis_i_HXX_
28
29 #include <SALOMEconfig.h>
30 #include CORBA_SERVER_HEADER(BLSURFPlugin_Algorithm)
31
32 #include "SMESH_Hypothesis_i.hxx"
33 #include "BLSURFPlugin_Hypothesis.hxx"
34
35 class SMESH_Gen;
36 class GEOM_Object;
37
38 // BLSURFPlugin parameters hypothesis
39
40 class BLSURFPlugin_Hypothesis_i: public virtual POA_BLSURFPlugin::BLSURFPlugin_Hypothesis,
41     public virtual SMESH_Hypothesis_i {
42 public:
43   // Constructor
44   BLSURFPlugin_Hypothesis_i(PortableServer::POA_ptr thePOA, int theStudyId, ::SMESH_Gen* theGenImpl);
45   // Destructor
46   virtual ~BLSURFPlugin_Hypothesis_i();
47
48   void SetTopology(CORBA::Long theValue);
49   CORBA::Long GetTopology();
50
51   void SetPhysicalMesh(CORBA::Long theValue);
52   CORBA::Long GetPhysicalMesh();
53
54   void SetPhySize(CORBA::Double theValue);
55   CORBA::Double GetPhySize();
56
57   void SetPhyMin(CORBA::Double theMinSize);
58   CORBA::Double GetPhyMin();
59
60   void SetPhyMax(CORBA::Double theMaxSize);
61   CORBA::Double GetPhyMax();
62
63   void SetGeometricMesh(CORBA::Long theValue);
64   CORBA::Long GetGeometricMesh();
65
66   void SetAngleMeshS(CORBA::Double theValue);
67   CORBA::Double GetAngleMeshS();
68
69   void SetAngleMeshC(CORBA::Double angle);
70   CORBA::Double GetAngleMeshC();
71
72   void SetGeoMin(CORBA::Double theMinSize);
73   CORBA::Double GetGeoMin();
74
75   void SetGeoMax(CORBA::Double theMaxSize);
76   CORBA::Double GetGeoMax();
77
78   void SetGradation(CORBA::Double theValue);
79   CORBA::Double GetGradation();
80
81   void SetQuadAllowed(CORBA::Boolean theValue);
82   CORBA::Boolean GetQuadAllowed();
83
84   void SetDecimesh(CORBA::Boolean theValue);
85   CORBA::Boolean GetDecimesh();
86
87   void SetVerbosity(CORBA::Short theVal) throw (SALOME::SALOME_Exception);
88   CORBA::Short GetVerbosity();
89
90   void SetPreCADMergeEdges(CORBA::Boolean theValue);
91   CORBA::Boolean GetPreCADMergeEdges();
92
93   void SetPreCADRemoveNanoEdges(CORBA::Boolean theValue);
94   CORBA::Boolean GetPreCADRemoveNanoEdges();
95
96   void SetPreCADDiscardInput(CORBA::Boolean theValue);
97   CORBA::Boolean GetPreCADDiscardInput();
98
99   void SetPreCADEpsNano(CORBA::Double theValue);
100   CORBA::Double GetPreCADEpsNano();
101
102   void SetOptionValue(const char* optionName, const char* optionValue) throw (SALOME::SALOME_Exception);
103   void SetPreCADOptionValue(const char* optionName, const char* optionValue) throw (SALOME::SALOME_Exception);
104   char* GetOptionValue(const char* optionName) throw (SALOME::SALOME_Exception);
105   char* GetPreCADOptionValue(const char* optionName) throw (SALOME::SALOME_Exception);
106
107   void UnsetOption(const char* optionName);
108   void UnsetPreCADOption(const char* optionName);
109
110   BLSURFPlugin::string_array* GetOptionValues();
111   BLSURFPlugin::string_array* GetPreCADOptionValues();
112
113   void SetOptionValues(const BLSURFPlugin::string_array& options) throw (SALOME::SALOME_Exception);
114   void SetPreCADOptionValues(const BLSURFPlugin::string_array& options) throw (SALOME::SALOME_Exception);
115
116   void SetSizeMapEntry(const char* entry, const char* sizeMap) throw (SALOME::SALOME_Exception);
117
118   char* GetSizeMapEntry(const char* entry) throw (SALOME::SALOME_Exception);
119
120   void UnsetEntry(const char* entry);
121
122   BLSURFPlugin::string_array* GetSizeMapEntries();
123
124   void SetSizeMapEntries(const BLSURFPlugin::string_array& sizeMaps) throw (SALOME::SALOME_Exception);
125
126   void SetSizeMap(GEOM::GEOM_Object_ptr GeomObj, const char* sizeMap);
127
128   void UnsetSizeMap(GEOM::GEOM_Object_ptr GeomObj);
129
130   void ClearSizeMaps();
131
132   void SetAttractor(GEOM::GEOM_Object_ptr GeomObj, const char* attractor);
133
134   void UnsetAttractor(GEOM::GEOM_Object_ptr GeomObj);
135
136   void SetAttractorEntry(const char* entry, const char* attractor) throw (SALOME::SALOME_Exception);
137
138   char* GetAttractorEntry(const char* entry) throw (SALOME::SALOME_Exception);
139
140   BLSURFPlugin::string_array* GetAttractorEntries();
141   
142   
143   /*!
144     * Set/get/unset an attractor on a face 
145     */
146   
147   void SetAttractorGeom(GEOM::GEOM_Object_ptr GeomObj, GEOM::GEOM_Object_ptr Attractor, double StartSize, double EndSize, double ActionRadius, double ConstantRadius );
148
149   void UnsetAttractorGeom(GEOM::GEOM_Object_ptr GeomObj);
150
151   void SetClassAttractorEntry(const char* entry, const char* att_entry, double StartSize, double EndSize, double ActionRadius, double ConstantRadius)  throw (SALOME::SALOME_Exception);
152
153   BLSURFPlugin::TAttParamsMap* GetAttractorParams();
154   
155
156   /*
157    void SetCustomSizeMap(GEOM::GEOM_Object_ptr GeomObj, const char* sizeMap);
158
159    void UnsetCustomSizeMap(GEOM::GEOM_Object_ptr GeomObj);
160
161    void SetCustomSizeMapEntry(const char* entry,const char* sizeMap )  throw (SALOME::SALOME_Exception);
162
163    char* GetCustomSizeMapEntry(const char* entry)  throw (SALOME::SALOME_Exception);
164
165    BLSURFPlugin::string_array* GetCustomSizeMapEntries();
166    */
167
168   ///////////////////////
169   // ENFORCED VERTEXES //
170   ///////////////////////
171
172   BLSURFPlugin::TFaceEntryEnfVertexListMap* GetAllEnforcedVerticesByFace();
173   BLSURFPlugin::TEnfVertexList* GetAllEnforcedVertices();
174
175   BLSURFPlugin::TFaceEntryCoordsListMap* GetAllCoordsByFace();
176   BLSURFPlugin::TCoordsEnfVertexMap* GetAllEnforcedVerticesByCoords();
177
178   BLSURFPlugin::TFaceEntryEnfVertexEntryListMap* GetAllEnfVertexEntriesByFace();
179   BLSURFPlugin::TEnfVertexEntryEnfVertexMap* GetAllEnforcedVerticesByEnfVertexEntry();
180
181   void ClearAllEnforcedVertices();
182
183   /*!
184    * Set/get/unset an enforced vertex on geom object
185    */
186   bool SetEnforcedVertex(GEOM::GEOM_Object_ptr theFace, CORBA::Double x, CORBA::Double y, CORBA::Double z)
187       throw (SALOME::SALOME_Exception);
188   bool SetEnforcedVertexNamed(GEOM::GEOM_Object_ptr theFace, CORBA::Double x, CORBA::Double y, CORBA::Double z, const char* theVertexName)
189       throw (SALOME::SALOME_Exception);
190   bool SetEnforcedVertexGeom(GEOM::GEOM_Object_ptr theFace, GEOM::GEOM_Object_ptr theVertex)
191       throw (SALOME::SALOME_Exception);
192   bool SetEnforcedVertexWithGroup(GEOM::GEOM_Object_ptr theFace, CORBA::Double x, CORBA::Double y, CORBA::Double z, const char* theGroupName)
193       throw (SALOME::SALOME_Exception);
194   bool SetEnforcedVertexNamedWithGroup(GEOM::GEOM_Object_ptr theFace, CORBA::Double x, CORBA::Double y, CORBA::Double z, const char* theVertexName, const char* theGroupName)
195       throw (SALOME::SALOME_Exception);
196   bool SetEnforcedVertexGeomWithGroup(GEOM::GEOM_Object_ptr theFace, GEOM::GEOM_Object_ptr theVertex, const char* theGroupName)
197       throw (SALOME::SALOME_Exception);
198
199   BLSURFPlugin::TEnfVertexList* GetEnforcedVertices(GEOM::GEOM_Object_ptr theFace) throw (SALOME::SALOME_Exception);
200
201   bool UnsetEnforcedVertex(GEOM::GEOM_Object_ptr theFace, CORBA::Double x, CORBA::Double y, CORBA::Double z)
202       throw (SALOME::SALOME_Exception);
203   bool UnsetEnforcedVertexGeom(GEOM::GEOM_Object_ptr theFace, GEOM::GEOM_Object_ptr theVertex)
204       throw (SALOME::SALOME_Exception);
205   bool UnsetEnforcedVertices(GEOM::GEOM_Object_ptr theFace) throw (SALOME::SALOME_Exception);
206
207   /*!
208    * Set/get/unset an enforced vertex on geom object given by entry
209    */
210   bool SetEnforcedVertexEntry(const char* theFaceEntry, CORBA::Double x = 0, CORBA::Double y = 0, CORBA::Double z = 0,
211       const char* theVertexName = "", const char* theVertexEntry = "", const char* theGroupName = "")
212       throw (SALOME::SALOME_Exception);
213
214   BLSURFPlugin::TEnfVertexList* GetEnforcedVerticesEntry(const char* theFaceEntry) throw (SALOME::SALOME_Exception);
215
216   bool UnsetEnforcedVertexEntry(const char* theFaceEntry, CORBA::Double x, CORBA::Double y, CORBA::Double z,
217       const char* theVertexEntry = "") throw (SALOME::SALOME_Exception);
218   bool UnsetEnforcedVerticesEntry(const char* theFaceEntry) throw (SALOME::SALOME_Exception);
219
220   /*!
221    * To add internal vertices as enforced vertices
222    */
223   void SetInternalEnforcedVertexAllFaces(CORBA::Boolean toEnforceInternalVertices);
224   CORBA::Boolean GetInternalEnforcedVertexAllFaces();
225   void SetInternalEnforcedVertexAllFacesGroup(const char*  groupName = "");
226   char* GetInternalEnforcedVertexAllFacesGroup();
227
228 // Enable internal enforced vertices on specific face if requested by user
229 //  void SetInternalEnforcedVertex(GEOM::GEOM_Object_ptr theFace, CORBA::Boolean toEnforceInternalVertices) throw (SALOME::SALOME_Exception);
230 //  void SetInternalEnforcedVertexWithGroup(GEOM::GEOM_Object_ptr theFace, CORBA::Boolean toEnforceInternalVertices, const char* theGroupName = "") throw (SALOME::SALOME_Exception);
231 //  void SetInternalEnforcedVertexEntry(const char* theFaceEntry, CORBA::Boolean toEnforceInternalVertices, const char* theGroupName = "") throw (SALOME::SALOME_Exception);
232 //  CORBA::Boolean GetInternalEnforcedVertex(GEOM::GEOM_Object_ptr theFace) throw (SALOME::SALOME_Exception);
233 //  CORBA::Boolean GetInternalEnforcedVertexEntry(const char* theFaceEntry) throw (SALOME::SALOME_Exception);
234   
235   ///////////////////////
236   
237   /*!
238     * Sets the file for export resulting mesh in GMF format
239     */
240 //   void SetGMFFile(const char* theFileName, CORBA::Boolean isBinary);
241   void SetGMFFile(const char* theFileName);
242   char* GetGMFFile();
243 //   CORBA::Boolean GetGMFFileMode();
244
245   // Get implementation
246   ::BLSURFPlugin_Hypothesis* GetImpl();
247
248   // Verify whether hypothesis supports given entity type 
249   CORBA::Boolean IsDimSupported(SMESH::Dimension type);
250 };
251
252 #endif