]> SALOME platform Git repositories - plugins/blsurfplugin.git/blob - src/BLSURFPlugin/BLSURFPlugin_Hypothesis_i.cxx
Salome HOME
remove useless myIs2D field, specify help page location
[plugins/blsurfplugin.git] / src / BLSURFPlugin / BLSURFPlugin_Hypothesis_i.cxx
1 //  BLSURFPlugin : C++ implementation
2 //
3 //  Copyright (C) 2006  OPEN CASCADE, CEA/DEN, EDF R&D
4 // 
5 //  This library is free software; you can redistribute it and/or 
6 //  modify it under the terms of the GNU Lesser General Public 
7 //  License as published by the Free Software Foundation; either 
8 //  version 2.1 of the License. 
9 // 
10 //  This library is distributed in the hope that it will be useful, 
11 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
12 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
13 //  Lesser General Public License for more details. 
14 // 
15 //  You should have received a copy of the GNU Lesser General Public 
16 //  License along with this library; if not, write to the Free Software 
17 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
18 // 
19 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
20 //
21 //
22 // File      : BLSURFPlugin_Hypothesis_i.cxx
23 // Authors   : Francis KLOSS (OCC) & Patrick LAUG (INRIA) & Lioka RAZAFINDRAZAKA (CEA)
24 // Date      : 03/04/2006
25 // Project   : SALOME
26 //=============================================================================
27 using namespace std;
28
29 #include "BLSURFPlugin_Hypothesis_i.hxx"
30 #include "SMESH_Gen.hxx"
31 #include "SMESH_PythonDump.hxx"
32
33 #include "Utils_CorbaException.hxx"
34 #include "utilities.h"
35
36 //=============================================================================
37 /*!
38  *  BLSURFPlugin_Hypothesis_i::BLSURFPlugin_Hypothesis_i
39  *
40  *  Constructor
41  */
42 //=============================================================================
43 BLSURFPlugin_Hypothesis_i::
44 BLSURFPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
45                            int                     theStudyId,
46                            ::SMESH_Gen*            theGenImpl)
47   : SALOME::GenericObj_i( thePOA ), 
48     SMESH_Hypothesis_i( thePOA )
49 {
50   MESSAGE( "BLSURFPlugin_Hypothesis_i::BLSURFPlugin_Hypothesis_i" );
51   myBaseImpl = new ::BLSURFPlugin_Hypothesis (theGenImpl->GetANewId(),
52                                               theStudyId,
53                                               theGenImpl);
54 }
55
56 //=============================================================================
57 /*!
58  *  BLSURFPlugin_Hypothesis_i::~BLSURFPlugin_Hypothesis_i
59  *
60  *  Destructor
61  */
62 //=============================================================================
63 BLSURFPlugin_Hypothesis_i::~BLSURFPlugin_Hypothesis_i()
64 {
65   MESSAGE( "BLSURFPlugin_Hypothesis_i::~BLSURFPlugin_Hypothesis_i" );
66 }
67
68 /*!
69  *  BLSURFPlugin_Hypothesis_i::SetTopology
70  *
71  *  Set topology
72  */
73
74 //=============================================================================
75 void BLSURFPlugin_Hypothesis_i::SetTopology (CORBA::Long theValue)
76 {
77   // MESSAGE("BLSURFPlugin_Hypothesis_i::SetTopology");
78   ASSERT(myBaseImpl);
79   this->GetImpl()->SetTopology((::BLSURFPlugin_Hypothesis::Topology)theValue);
80   SMESH::TPythonDump() << _this() << ".SetTopology( " << theValue << " )";
81 }
82
83 //=============================================================================
84 /*!
85  *  BLSURFPlugin_Hypothesis_i::GetTopology
86  *
87  *  Get Topology
88  */
89 //=============================================================================
90 CORBA::Long BLSURFPlugin_Hypothesis_i::GetTopology()
91 {
92   // MESSAGE("BLSURFPlugin_Hypothesis_i::GetTopology");
93   ASSERT(myBaseImpl);
94   return this->GetImpl()->GetTopology();
95 }
96
97 //=============================================================================
98
99 //=============================================================================
100 /*!
101  *  BLSURFPlugin_Hypothesis_i::SetPhysicalMesh
102  *
103  *  Set PhysicalMesh
104  */
105
106 //=============================================================================
107 void BLSURFPlugin_Hypothesis_i::SetPhysicalMesh (CORBA::Long theValue)
108 {
109   // MESSAGE("BLSURFPlugin_Hypothesis_i::SetPhysicalMesh");
110   ASSERT(myBaseImpl);
111   this->GetImpl()->SetPhysicalMesh((::BLSURFPlugin_Hypothesis::PhysicalMesh)theValue);
112   SMESH::TPythonDump() << _this() << ".SetPhysicalMesh( " << theValue << " )";
113 }
114
115 //=============================================================================
116 /*!
117  *  BLSURFPlugin_Hypothesis_i::GetPhysicalMesh
118  *
119  *  Get PhysicalMesh
120  */
121 //=============================================================================
122 CORBA::Long BLSURFPlugin_Hypothesis_i::GetPhysicalMesh()
123 {
124   // MESSAGE("BLSURFPlugin_Hypothesis_i::GetPhysicalMesh");
125   ASSERT(myBaseImpl);
126   return this->GetImpl()->GetPhysicalMesh();
127 }
128
129 //=============================================================================
130 /*!
131  *  BLSURFPlugin_Hypothesis_i::SetPhySize
132  *
133  *  Set PhySize
134  */
135 //=============================================================================
136 void BLSURFPlugin_Hypothesis_i::SetPhySize (CORBA::Double theValue)
137 {
138   // MESSAGE("BLSURFPlugin_Hypothesis_i::SetPhySize");
139   ASSERT(myBaseImpl);
140   this->GetImpl()->SetPhySize(theValue);
141   SMESH::TPythonDump() << _this() << ".SetPhySize( " << theValue << " )";
142 }
143
144 //=============================================================================
145 /*!
146  *  BLSURFPlugin_Hypothesis_i::GetPhySize
147  *
148  *  Get PhySize
149  */
150 //=============================================================================
151 CORBA::Double BLSURFPlugin_Hypothesis_i::GetPhySize()
152 {
153   // MESSAGE("BLSURFPlugin_Hypothesis_i::GetPhySize");
154   ASSERT(myBaseImpl);
155   return this->GetImpl()->GetPhySize();
156 }
157
158 //=============================================================================
159 /*!
160  *  BLSURFPlugin_Hypothesis_i::SetGeometricMesh
161  *
162  *  Set GeometricMesh
163  */
164
165 //=============================================================================
166 void BLSURFPlugin_Hypothesis_i::SetGeometricMesh (CORBA::Long theValue)
167 {
168   // MESSAGE("BLSURFPlugin_Hypothesis_i::SetGeometricMesh");
169   ASSERT(myBaseImpl);
170   this->GetImpl()->SetGeometricMesh((::BLSURFPlugin_Hypothesis::GeometricMesh)theValue);
171   SMESH::TPythonDump() << _this() << ".SetGeometricMesh( " << theValue << " )";
172 }
173
174 //=============================================================================
175 /*!
176  *  BLSURFPlugin_Hypothesis_i::GetGeometricMesh
177  *
178  *  Get GeometricMesh
179  */
180 //=============================================================================
181 CORBA::Long BLSURFPlugin_Hypothesis_i::GetGeometricMesh()
182 {
183   // MESSAGE("BLSURFPlugin_Hypothesis_i::GetGeometricMesh");
184   ASSERT(myBaseImpl);
185   return this->GetImpl()->GetGeometricMesh();
186 }
187
188 //=============================================================================
189 /*!
190  *  BLSURFPlugin_Hypothesis_i::SetAngleMeshS
191  *
192  *  Set AngleMeshS
193  */
194 //=============================================================================
195 void BLSURFPlugin_Hypothesis_i::SetAngleMeshS (CORBA::Double theValue)
196 {
197   // MESSAGE("BLSURFPlugin_Hypothesis_i::SetAngleMeshS");
198   ASSERT(myBaseImpl);
199   this->GetImpl()->SetAngleMeshS(theValue);
200   SMESH::TPythonDump() << _this() << ".SetAngleMeshS( " << theValue << " )";
201 }
202
203 //=============================================================================
204 /*!
205  *  BLSURFPlugin_Hypothesis_i::GetAngleMeshS
206  *
207  *  Get AngleMeshS
208  */
209 //=============================================================================
210 CORBA::Double BLSURFPlugin_Hypothesis_i::GetAngleMeshS()
211 {
212   // MESSAGE("BLSURFPlugin_Hypothesis_i::GetAngleMeshS");
213   ASSERT(myBaseImpl);
214   return this->GetImpl()->GetAngleMeshS();
215 }
216
217 //=============================================================================
218 /*!
219  *  BLSURFPlugin_Hypothesis_i::SetGradation
220  *
221  *  Set Gradation
222  */
223 //=============================================================================
224 void BLSURFPlugin_Hypothesis_i::SetGradation (CORBA::Double theValue)
225 {
226   // MESSAGE("BLSURFPlugin_Hypothesis_i::SetGradation");
227   ASSERT(myBaseImpl);
228   this->GetImpl()->SetGradation(theValue);
229   SMESH::TPythonDump() << _this() << ".SetGradation( " << theValue << " )";
230 }
231
232 //=============================================================================
233 /*!
234  *  BLSURFPlugin_Hypothesis_i::GetGradation
235  *
236  *  Get Gradation
237  */
238 //=============================================================================
239 CORBA::Double BLSURFPlugin_Hypothesis_i::GetGradation()
240 {
241   // MESSAGE("BLSURFPlugin_Hypothesis_i::GetGradation");
242   ASSERT(myBaseImpl);
243   return this->GetImpl()->GetGradation();
244 }
245
246 //=============================================================================
247 /*!
248  *  BLSURFPlugin_Hypothesis_i::SetQuadAllowed
249  *
250  *  Set true or false
251  */
252 //=============================================================================
253 void BLSURFPlugin_Hypothesis_i::SetQuadAllowed (CORBA::Boolean theValue)
254 {
255   // MESSAGE("BLSURFPlugin_Hypothesis_i::SetQuadAllowed");
256   ASSERT(myBaseImpl);
257   this->GetImpl()->SetQuadAllowed(theValue);
258   SMESH::TPythonDump() << _this() << ".SetQuadAllowed( " << theValue << " )";
259 }
260
261 //=============================================================================
262 /*!
263  *  BLSURFPlugin_Hypothesis_i::GetQuadAllowed
264  *
265  *  Get true or false
266  */
267 //=============================================================================
268 CORBA::Boolean BLSURFPlugin_Hypothesis_i::GetQuadAllowed()
269 {
270   // MESSAGE("BLSURFPlugin_Hypothesis_i::GetQuadAllowed");
271   ASSERT(myBaseImpl);
272   return this->GetImpl()->GetQuadAllowed();
273 }
274
275 //=============================================================================
276 /*!
277  *  BLSURFPlugin_Hypothesis_i::SetDecimesh
278  *
279  *  Set true or false
280  */
281 //=============================================================================
282 void BLSURFPlugin_Hypothesis_i::SetDecimesh (CORBA::Boolean theValue)
283 {
284   // MESSAGE("BLSURFPlugin_Hypothesis_i::SetDecimesh");
285   ASSERT(myBaseImpl);
286   this->GetImpl()->SetDecimesh(theValue);
287   SMESH::TPythonDump() << _this() << ".SetDecimesh( " << theValue << " )";
288 }
289
290 //=============================================================================
291 /*!
292  *  BLSURFPlugin_Hypothesis_i::GetDecimesh
293  *
294  *  Get true or false
295  */
296 //=============================================================================
297 CORBA::Boolean BLSURFPlugin_Hypothesis_i::GetDecimesh()
298 {
299   // MESSAGE("BLSURFPlugin_Hypothesis_i::GetDecimesh");
300   ASSERT(myBaseImpl);
301   return this->GetImpl()->GetDecimesh();
302 }
303
304 //=============================================================================
305 /*!
306  *  BLSURFPlugin_Hypothesis_i::GetImpl
307  *
308  *  Get implementation
309  */
310 //=============================================================================
311 ::BLSURFPlugin_Hypothesis* BLSURFPlugin_Hypothesis_i::GetImpl()
312 {
313   // MESSAGE("BLSURFPlugin_Hypothesis_i::GetImpl");
314   return (::BLSURFPlugin_Hypothesis*)myBaseImpl;
315 }
316
317 //================================================================================
318 /*!
319  * \brief Verify whether hypothesis supports given entity type 
320   * \param type - dimension (see SMESH::Dimension enumeration)
321   * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
322  * 
323  * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
324  */
325 //================================================================================  
326 CORBA::Boolean BLSURFPlugin_Hypothesis_i::IsDimSupported( SMESH::Dimension type )
327 {
328   return type == SMESH::DIM_2D;
329 }