Salome HOME
Merge from V5_1_5_BR branch 12/11/2010
[plugins/blsurfplugin.git] / src / BLSURFPlugin / BLSURFPlugin_Hypothesis_i.hxx
1 //  Copyright (C) 2007-2010  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:
41   public virtual POA_BLSURFPlugin::BLSURFPlugin_Hypothesis,
42   public virtual SMESH_Hypothesis_i
43 {
44  public:
45   // Constructor
46   BLSURFPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
47                              int                     theStudyId,
48                              ::SMESH_Gen*            theGenImpl);
49   // Destructor
50   virtual ~BLSURFPlugin_Hypothesis_i();
51
52   void SetTopology(CORBA::Long theValue);
53   CORBA::Long GetTopology();
54
55   void SetPhysicalMesh(CORBA::Long theValue);
56   CORBA::Long GetPhysicalMesh();
57
58   void SetPhySize(CORBA::Double theValue);
59   CORBA::Double GetPhySize();
60
61   void SetPhyMin(CORBA::Double theMinSize);
62   CORBA::Double GetPhyMin();
63
64   void SetPhyMax(CORBA::Double theMaxSize);
65   CORBA::Double GetPhyMax();
66
67   void SetGeometricMesh(CORBA::Long theValue);
68   CORBA::Long GetGeometricMesh();
69
70   void SetAngleMeshS(CORBA::Double theValue);
71   CORBA::Double GetAngleMeshS();
72
73   void SetAngleMeshC(CORBA::Double angle);
74   CORBA::Double GetAngleMeshC();
75
76   void SetGeoMin(CORBA::Double theMinSize);
77   CORBA::Double GetGeoMin();
78
79   void SetGeoMax(CORBA::Double theMaxSize);
80   CORBA::Double GetGeoMax();
81
82   void SetGradation(CORBA::Double theValue);
83   CORBA::Double GetGradation();
84
85   void SetQuadAllowed(CORBA::Boolean theValue);
86   CORBA::Boolean GetQuadAllowed();
87
88   void SetDecimesh(CORBA::Boolean theValue);
89   CORBA::Boolean GetDecimesh();
90
91   void SetVerbosity(CORBA::Short theVal) throw (SALOME::SALOME_Exception);
92   CORBA::Short GetVerbosity();
93
94   void SetOptionValue(const char* optionName,
95                       const char* optionValue) throw (SALOME::SALOME_Exception);
96   char* GetOptionValue(const char* optionName) throw (SALOME::SALOME_Exception);
97
98   void UnsetOption(const char* optionName);
99
100   BLSURFPlugin::string_array* GetOptionValues();
101
102   void SetOptionValues(const BLSURFPlugin::string_array& options) throw (SALOME::SALOME_Exception);
103
104   void SetSizeMapEntry(const char* entry,const char* sizeMap )  throw (SALOME::SALOME_Exception);
105   
106   char* GetSizeMapEntry(const char* entry)  throw (SALOME::SALOME_Exception);
107
108   void UnsetEntry(const char* entry);
109
110   BLSURFPlugin::string_array* GetSizeMapEntries();
111
112   void SetSizeMapEntries(const BLSURFPlugin::string_array& options) throw (SALOME::SALOME_Exception);
113
114   void SetSizeMap(GEOM::GEOM_Object_ptr GeomObj, const char* sizeMap);
115
116   void UnsetSizeMap(GEOM::GEOM_Object_ptr GeomObj);
117
118   void ClearSizeMaps();
119
120
121   void SetAttractor(GEOM::GEOM_Object_ptr GeomObj, const char* attractor);
122
123   void UnsetAttractor(GEOM::GEOM_Object_ptr GeomObj);
124
125   void SetAttractorEntry(const char* entry,const char* attractor )  throw (SALOME::SALOME_Exception);
126
127   char* GetAttractorEntry(const char* entry)  throw (SALOME::SALOME_Exception);
128
129   BLSURFPlugin::string_array* GetAttractorEntries();
130
131
132 /*
133   void SetCustomSizeMap(GEOM::GEOM_Object_ptr GeomObj, const char* sizeMap);
134
135   void UnsetCustomSizeMap(GEOM::GEOM_Object_ptr GeomObj);
136
137   void SetCustomSizeMapEntry(const char* entry,const char* sizeMap )  throw (SALOME::SALOME_Exception);
138
139   char* GetCustomSizeMapEntry(const char* entry)  throw (SALOME::SALOME_Exception);
140
141   BLSURFPlugin::string_array* GetCustomSizeMapEntries();
142 */
143
144   ///////////////////////
145   // ENFORCED VERTEXES //
146   ///////////////////////
147   
148   BLSURFPlugin::TEntryEnfVertexListMap* GetAllEnforcedVertices();
149   void                                  ClearAllEnforcedVertices();
150
151   /*!
152     * Set/get/unset an enforced vertex on geom object
153     */
154   void SetEnforcedVertex(GEOM::GEOM_Object_ptr GeomObj, CORBA::Double x, CORBA::Double y, CORBA::Double z)
155       throw (SALOME::SALOME_Exception);
156   /* TODO GROUPS
157   void SetEnforcedVertexWithGroup(GEOM::GEOM_Object_ptr GeomObj,
158                                   CORBA::Double x, CORBA::Double y, CORBA::Double z,
159                                   const char* groupName)
160       throw (SALOME::SALOME_Exception);
161   */
162 //   void SetEnforcedVertexList(GEOM::GEOM_Object_ptr GeomObj, const BLSURFPlugin::TEnfVertexList& vertexList)
163 //       throw (SALOME::SALOME_Exception);
164   
165   BLSURFPlugin::TEnfVertexList* GetEnforcedVertices(GEOM::GEOM_Object_ptr GeomObj)
166       throw (SALOME::SALOME_Exception);
167   
168   void UnsetEnforcedVertex(GEOM::GEOM_Object_ptr GeomObj, CORBA::Double x, CORBA::Double y, CORBA::Double z)
169       throw (SALOME::SALOME_Exception);
170   
171 //   void UnsetEnforcedVertexList(GEOM::GEOM_Object_ptr GeomObj, BLSURFPlugin::TEnfVertexList& vertexList)
172 //       throw (SALOME::SALOME_Exception);
173   
174   void UnsetEnforcedVertices(GEOM::GEOM_Object_ptr GeomObj)
175       throw (SALOME::SALOME_Exception);
176
177   /*!
178     * Set/get/unset an enforced vertex on geom object given by entry
179     */
180   void SetEnforcedVertexEntry(const char* entry, CORBA::Double x, CORBA::Double y, CORBA::Double z)
181       throw (SALOME::SALOME_Exception);
182   /* TODO GROUPS
183   void SetEnforcedVertexEntryWithGroup(const char* entry, CORBA::Double x, CORBA::Double y, CORBA::Double z,
184                                        const char* groupName)
185       throw (SALOME::SALOME_Exception);
186   */
187 //   void SetEnforcedVertexListEntry(const char* entry, BLSURFPlugin::TEnfVertexList& vertexList)
188 //       throw (SALOME::SALOME_Exception);
189   
190   BLSURFPlugin::TEnfVertexList* GetEnforcedVerticesEntry(const char* entry)
191       throw (SALOME::SALOME_Exception);
192   
193   void UnsetEnforcedVertexEntry(const char* entry, CORBA::Double x, CORBA::Double y, CORBA::Double z)
194       throw (SALOME::SALOME_Exception);
195 //   void UnsetEnforcedVertexListEntry(const char* entry, BLSURFPlugin::TEnfVertexList& vertexList)
196 //       throw (SALOME::SALOME_Exception);
197   void UnsetEnforcedVerticesEntry(const char* entry)
198       throw (SALOME::SALOME_Exception);
199   
200   /*!
201     * Set/get node group to an enforced vertex
202     */
203   /* TODO GROUPS
204   void  SetEnforcedVertexGroupName(CORBA::Double x, CORBA::Double y, CORBA::Double z,
205                                    const char* groupName)
206       throw (SALOME::SALOME_Exception);
207   char* GetEnforcedVertexGroupName(CORBA::Double x, CORBA::Double y, CORBA::Double z)
208       throw (SALOME::SALOME_Exception);
209   */
210   ///////////////////////
211
212   // Get implementation
213   ::BLSURFPlugin_Hypothesis* GetImpl();
214
215   // Verify whether hypothesis supports given entity type 
216   CORBA::Boolean IsDimSupported( SMESH::Dimension type );
217 };
218
219 #endif