Salome HOME
remove "using namespace std" from SMESH headers
[plugins/hexoticplugin.git] / src / HexoticPlugin / HexoticPlugin_Hypothesis_i.cxx
1 // Copyright (C) 2007-2015  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.cxx
22 // Author : Lioka RAZAFINDRAZAKA (CEA)
23 // ---
24 //
25 #include "HexoticPlugin_Hypothesis_i.hxx"
26 #include "SMESH_Mesh_i.hxx"
27 #include "SMESH_Gen.hxx"
28 #include "SMESH_PythonDump.hxx"
29
30 #include "Utils_CorbaException.hxx"
31 #include "utilities.h"
32
33 //=============================================================================
34 /*!
35  *  HexoticPlugin_Hypothesis_i::HexoticPlugin_Hypothesis_i
36  *
37  *  Constructor
38  */
39 //=============================================================================
40 HexoticPlugin_Hypothesis_i::
41 HexoticPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
42                            int                     theStudyId,
43                            ::SMESH_Gen*            theGenImpl)
44   : SALOME::GenericObj_i( thePOA ), 
45     SMESH_Hypothesis_i( thePOA )
46 {
47   MESSAGE( "HexoticPlugin_Hypothesis_i::HexoticPlugin_Hypothesis_i" );
48   myBaseImpl = new ::HexoticPlugin_Hypothesis (theGenImpl->GetANewId(),
49                                               theStudyId,
50                                               theGenImpl);
51 }
52
53 //=============================================================================
54 /*!
55  *  HexoticPlugin_Hypothesis_i::~HexoticPlugin_Hypothesis_i
56  *
57  *  Destructor
58  */
59 //=============================================================================
60 HexoticPlugin_Hypothesis_i::~HexoticPlugin_Hypothesis_i()
61 {
62   MESSAGE( "HexoticPlugin_Hypothesis_i::~HexoticPlugin_Hypothesis_i" );
63 }
64
65 //=============================================================================
66 /*!
67  *  HexoticPlugin_Hypothesis_i::SetHexesMinLevel
68  *  HexoticPlugin_Hypothesis_i::SetHexesMaxLevel
69  *  HexoticPlugin_Hypothesis_i::SetMinSize
70  *  HexoticPlugin_Hypothesis_i::SetMaxSize
71  *  HexoticPlugin_Hypothesis_i::SetHexoticIgnoreRidges
72  *  HexoticPlugin_Hypothesis_i::SetHexoticInvalidElements
73  *  HexoticPlugin_Hypothesis_i::SetHexoticSharpAngleThreshold
74  *  HexoticPlugin_Hypothesis_i::SetHexoticNbProc 
75  *  HexoticPlugin_Hypothesis_i::SetHexoticWorkingDirectory 
76  *  HexoticPlugin_Hypothesis_i::SetHexoticSdMode
77  *  HexoticPlugin_Hypothesis_i::SetVerbosity
78  *  HexoticPlugin_Hypothesis_i::SetHexoticMaxMemory
79  *  HexoticPlugin_Hypothesis_i::SetTextOptions
80  *  HexoticPlugin_Hypothesis_i::SetNbLayers
81  *  HexoticPlugin_Hypothesis_i::SetFirstLayerSize
82  *  HexoticPlugin_Hypothesis_i::SetDirection
83  *  HexoticPlugin_Hypothesis_i::SetGrowth
84  *  HexoticPlugin_Hypothesis_i::SetFacesWithLayers
85  *  HexoticPlugin_Hypothesis_i::SetImprintedFaces
86  */
87 //=============================================================================
88
89 void HexoticPlugin_Hypothesis_i::SetHexesMinLevel (CORBA::Long theValue)
90 {
91   // MESSAGE("HexoticPlugin_Hypothesis_i::SetHexesMinLevel");
92   ASSERT(myBaseImpl);
93   CORBA::Long oldValue = GetHexesMinLevel();
94   this->GetImpl()->SetHexesMinLevel(theValue);
95   if (theValue != oldValue)
96     SMESH::TPythonDump() << _this() << ".SetHexesMinLevel( " << theValue << " )";
97 }
98
99 void HexoticPlugin_Hypothesis_i::SetHexesMaxLevel (CORBA::Long theValue)
100 {
101   // MESSAGE("HexoticPlugin_Hypothesis_i::SetHexesMaxLevel");
102   ASSERT(myBaseImpl);
103   CORBA::Long oldValue = GetHexesMaxLevel();
104   this->GetImpl()->SetHexesMaxLevel(theValue);
105   if (theValue != oldValue)
106     SMESH::TPythonDump() << _this() << ".SetHexesMaxLevel( " << theValue << " )";
107 }
108
109 void HexoticPlugin_Hypothesis_i::SetMinSize (CORBA::Double theValue)
110 {
111   // MESSAGE("HexoticPlugin_Hypothesis_i::SetHexesMaxLevel");
112   ASSERT(myBaseImpl);
113   CORBA::Double oldValue = GetMinSize();
114   this->GetImpl()->SetMinSize(theValue);
115   if (theValue != oldValue)
116     SMESH::TPythonDump() << _this() << ".SetMinSize( " << theValue << " )";
117 }
118
119 void HexoticPlugin_Hypothesis_i::SetMaxSize (CORBA::Double theValue)
120 {
121   // MESSAGE("HexoticPlugin_Hypothesis_i::SetHexesMaxLevel");
122   ASSERT(myBaseImpl);
123   CORBA::Double oldValue = GetMaxSize();
124   this->GetImpl()->SetMaxSize(theValue);
125   if (theValue != oldValue)
126     SMESH::TPythonDump() << _this() << ".SetMaxSize( " << theValue << " )";
127 }
128
129 void HexoticPlugin_Hypothesis_i::SetHexoticIgnoreRidges (CORBA::Boolean theValue)
130 {
131   // MESSAGE("HexoticPlugin_Hypothesis_i::SetHexoticIgnoreRidges");
132   ASSERT(myBaseImpl);
133   CORBA::Boolean oldValue = GetHexoticIgnoreRidges();
134   this->GetImpl()->SetHexoticIgnoreRidges(theValue);
135   if (theValue != oldValue)
136     SMESH::TPythonDump() << _this() << ".SetHexoticIgnoreRidges( " << theValue << " )";
137 }
138
139 void HexoticPlugin_Hypothesis_i::SetHexoticInvalidElements (CORBA::Boolean theValue)
140 {
141   // MESSAGE("HexoticPlugin_Hypothesis_i::SetHexoticInvalidElements");
142   ASSERT(myBaseImpl);
143   CORBA::Boolean oldValue = GetHexoticInvalidElements();
144   this->GetImpl()->SetHexoticInvalidElements(theValue);
145   if (theValue != oldValue)
146     SMESH::TPythonDump() << _this() << ".SetHexoticInvalidElements( " << theValue << " )";
147 }
148
149 void HexoticPlugin_Hypothesis_i::SetHexoticSharpAngleThreshold (CORBA::Double theValue)
150 {
151   // MESSAGE("HexoticPlugin_Hypothesis_i::SetHexoticSharpAngleThreshold");
152   ASSERT(myBaseImpl);
153   CORBA::Double oldValue = GetHexoticSharpAngleThreshold();
154   this->GetImpl()->SetHexoticSharpAngleThreshold(theValue);
155   if (theValue != oldValue)
156     SMESH::TPythonDump() << _this() << ".SetHexoticSharpAngleThreshold( " << theValue << " )";
157 }
158
159 void HexoticPlugin_Hypothesis_i::SetHexoticNbProc (CORBA::Long theValue)
160 {
161   // MESSAGE("HexoticPlugin_Hypothesis_i::SetHexoticNbProc");
162   ASSERT(myBaseImpl);
163   CORBA::Long oldValue = GetHexoticNbProc();
164   this->GetImpl()->SetHexoticNbProc(theValue);
165   if (theValue != oldValue)
166     SMESH::TPythonDump() << _this() << ".SetHexoticNbProc( " << theValue << " )";
167 }
168
169 void HexoticPlugin_Hypothesis_i::SetHexoticWorkingDirectory(const char* path) throw ( SALOME::SALOME_Exception )
170 {
171   if (!path )
172     THROW_SALOME_CORBA_EXCEPTION( "Null working directory",SALOME::BAD_PARAM );
173
174   ASSERT(myBaseImpl);
175   std::string file(path);
176   std::string oldValue(GetHexoticWorkingDirectory());
177   bool doDump = false;
178   if (oldValue != file)
179     doDump = true;
180
181   const char lastChar = *file.rbegin();
182 #ifdef WIN32
183   if ( lastChar != '\\' ) file += '\\';
184 #else
185   if ( lastChar != '/' ) file += '/';
186 #endif
187   file += "Hexotic_In.mesh";
188   SMESH_Mesh_i::PrepareForWriting (file.c_str());
189
190   this->GetImpl()->SetHexoticWorkingDirectory(path);
191   if (doDump)
192     SMESH::TPythonDump() << _this() << ".SetHexoticWorkingDirectory( '" << path << "' )";
193 }
194
195 void HexoticPlugin_Hypothesis_i::SetHexoticSdMode (CORBA::Long theValue)
196 {
197   // MESSAGE("HexoticPlugin_Hypothesis_i::SetHexoticSdMode");
198   ASSERT(myBaseImpl);
199   CORBA::Long oldValue = GetHexoticSdMode();
200   this->GetImpl()->SetHexoticSdMode(theValue);
201   if (theValue != oldValue)
202     SMESH::TPythonDump() << _this() << ".SetHexoticSdMode( " << theValue << " )";
203 }
204
205 void HexoticPlugin_Hypothesis_i::SetHexoticVerbosity (CORBA::Long theValue)
206 {
207   // MESSAGE("HexoticPlugin_Hypothesis_i::SetVerbosity");
208   ASSERT(myBaseImpl);
209   CORBA::Long oldValue = GetHexoticVerbosity();
210   this->GetImpl()->SetHexoticVerbosity(theValue);
211   if (theValue != oldValue)
212     SMESH::TPythonDump() << _this() << ".SetHexoticVerbosity( " << theValue << " )";
213 }
214
215 void HexoticPlugin_Hypothesis_i::SetHexoticMaxMemory (CORBA::Long theValue)
216 {
217   // MESSAGE("HexoticPlugin_Hypothesis_i::SetHexoticMaxMemory");
218   ASSERT(myBaseImpl);
219   CORBA::Long oldValue = GetHexoticMaxMemory();
220   this->GetImpl()->SetHexoticMaxMemory(theValue);
221   if (theValue != oldValue)
222     SMESH::TPythonDump() << _this() << ".SetHexoticMaxMemory( " << theValue << " )";
223 }
224
225 void HexoticPlugin_Hypothesis_i::SetTextOptions(const char* theOptions)
226 {
227   // MESSAGE("HexoticPlugin_Hypothesis_i::SetTextOptions");
228   ASSERT(myBaseImpl);
229   std::string oldValue(GetTextOptions());
230   this->GetImpl()->SetTextOptions(theOptions);
231   if (theOptions != oldValue)
232     SMESH::TPythonDump() << _this() << ".SetTextOptions( '" << theOptions << "' )";
233 }
234
235 HexoticPlugin::HexoticPluginSizeMapsList* HexoticPlugin_Hypothesis_i::GetSizeMaps ()
236 {
237   // Get the std::map < std::string entry, double size >
238   HexoticPlugin::HexoticPluginSizeMapsList_var result = new HexoticPlugin::HexoticPluginSizeMapsList();
239   const ::HexoticPlugin_Hypothesis::THexoticSizeMaps sizeMaps = this->GetImpl()->GetSizeMaps();
240   result->length( sizeMaps.size() );
241   
242   // Write the content into a CORBA sequence of struct{ entry=anEntry; size=aSize; }
243   ::HexoticPlugin_Hypothesis::THexoticSizeMaps::const_iterator it = sizeMaps.begin(); 
244   for ( int i = 0; it != sizeMaps.end(); i++, it++ )
245   {
246     HexoticPlugin::HexoticPluginSizeMap_var aSizeMap = new HexoticPlugin::HexoticPluginSizeMap();
247     aSizeMap->entry = CORBA::string_dup( it->first.c_str() );
248     aSizeMap->size = it->second;
249     result[i] = aSizeMap;
250   }
251   return result._retn();
252 }
253
254 void HexoticPlugin_Hypothesis_i::SetSizeMapEntry ( const char* theEntry, CORBA::Double theSize )
255 {
256 //   MESSAGE("HexoticPlugin_Hypothesis_i::SetSizeMapEntry");
257   bool valueChanged = this->GetImpl()->AddSizeMap(theEntry, theSize);
258   if (valueChanged)
259     SMESH::TPythonDump() << _this() << ".SetSizeMap( "<< theEntry << ", " << theSize << " )";
260 }
261
262 void HexoticPlugin_Hypothesis_i::UnsetSizeMapEntry ( const char* theEntry )
263 {
264 //   MESSAGE("HexoticPlugin_Hypothesis_i::UnsetSizeMapEntry");
265   bool entryRemoved = this->GetImpl()->UnsetSizeMap(theEntry);
266   if (entryRemoved)
267     SMESH::TPythonDump() << _this() << ".UnsetSizeMap( "<< theEntry << " )";
268 }
269
270 void HexoticPlugin_Hypothesis_i::SetSizeMap (const GEOM::GEOM_Object_ptr theGeomObj, const double theSize)
271 {
272 //   MESSAGE("HexoticPlugin_Hypothesis_i::SetSizeMap");
273   ASSERT(myBaseImpl);
274   std::string entry = theGeomObj->GetStudyEntry();
275   SetSizeMapEntry( entry.c_str(), theSize);
276 }
277
278 void HexoticPlugin_Hypothesis_i::UnsetSizeMap (const GEOM::GEOM_Object_ptr theGeomObj)
279 {
280 //   MESSAGE("HexoticPlugin_Hypothesis_i::UnsetSizeMap");
281   ASSERT(myBaseImpl);
282   std::string entry = theGeomObj->GetStudyEntry();
283   UnsetSizeMapEntry( entry.c_str());
284 }
285
286 void HexoticPlugin_Hypothesis_i::SetNbLayers(CORBA::Long theVal)
287 {
288   // MESSAGE("HexoticPlugin_Hypothesis_i::SetNbLayers");
289   ASSERT(myBaseImpl);
290   CORBA::Long oldValue = GetNbLayers();
291   this->GetImpl()->SetNbLayers(theVal);
292   if (theVal != oldValue)
293     SMESH::TPythonDump() << _this() << ".SetNbLayers( " << theVal << " )";
294 }
295
296 void HexoticPlugin_Hypothesis_i::SetFirstLayerSize(CORBA::Double theVal)
297 {
298   // MESSAGE("HexoticPlugin_Hypothesis_i::SetFirstLayerSize");
299   ASSERT(myBaseImpl);
300   CORBA::Double oldValue = GetFirstLayerSize();
301   this->GetImpl()->SetFirstLayerSize(theVal);
302   if (theVal != oldValue)
303     SMESH::TPythonDump() << _this() << ".SetFirstLayerSize( " << theVal << " )";
304 }
305
306 void HexoticPlugin_Hypothesis_i::SetDirection(CORBA::Boolean theVal)
307 {
308   // MESSAGE("HexoticPlugin_Hypothesis_i::SetDirection");
309   ASSERT(myBaseImpl);
310   CORBA::Boolean oldValue = GetDirection();
311   this->GetImpl()->SetDirection(theVal);
312   if (theVal != oldValue)
313     SMESH::TPythonDump() << _this() << ".SetDirection( " << theVal << " )";
314 }
315
316 void HexoticPlugin_Hypothesis_i::SetGrowth(CORBA::Double theVal)
317 {
318   // MESSAGE("HexoticPlugin_Hypothesis_i::SetGrowth");
319   ASSERT(myBaseImpl);
320   CORBA::Double oldValue = GetGrowth();
321   this->GetImpl()->SetGrowth(theVal);
322   if (theVal != oldValue)
323     SMESH::TPythonDump() << _this() << ".SetGrowth( " << theVal << " )";
324 }
325
326 void HexoticPlugin_Hypothesis_i::SetFacesWithLayers(const ::SMESH::long_array& theVal)
327 {
328   // MESSAGE("HexoticPlugin_Hypothesis_i::SetFacesWithLayers");
329   std::vector<int> ids( theVal.length() );
330   for ( unsigned i = 0; i < ids.size(); ++i )
331    ids[i] = theVal[i];
332
333   bool valueChanged = this->GetImpl()->SetFacesWithLayers(ids);
334   if (valueChanged)
335     SMESH::TPythonDump() << _this() << ".SetFacesWithLayers( "<< theVal << " )";
336 }
337
338 void HexoticPlugin_Hypothesis_i::SetImprintedFaces(const ::SMESH::long_array& theVal)
339 {
340   // MESSAGE("HexoticPlugin_Hypothesis_i::SetImprintedFaces");
341   std::vector<int> ids( theVal.length() );
342   for ( unsigned i = 0; i < ids.size(); ++i )
343    ids[i] = theVal[i];
344
345   bool valueChanged = this->GetImpl()->SetImprintedFaces(ids);
346   if (valueChanged)
347     SMESH::TPythonDump() << _this() << ".SetImprintedFaces( "<< theVal << " )";
348 }
349
350 //=============================================================================
351 /*!
352  *  HexoticPlugin_Hypothesis_i::GetHexesMinLevel
353  *  HexoticPlugin_Hypothesis_i::GetHexesMaxLevel
354  *  HexoticPlugin_Hypothesis_i::GetMinSize
355  *  HexoticPlugin_Hypothesis_i::GetMaxSize
356  *  HexoticPlugin_Hypothesis_i::GetHexoticIgnoreRidges
357  *  HexoticPlugin_Hypothesis_i::GetHexoticInvalidElements
358  *  HexoticPlugin_Hypothesis_i::GetHexoticSharpAngleThreshold 
359  *  HexoticPlugin_Hypothesis_i::GetHexoticNbProc 
360  *  HexoticPlugin_Hypothesis_i::GetHexoticWorkingDirectory 
361  *  HexoticPlugin_Hypothesis_i::GetHexoticSdMode
362  *  HexoticPlugin_Hypothesis_i::GetVerbosity
363  *  HexoticPlugin_Hypothesis_i::GetHexoticMaxMemory
364  *  HexoticPlugin_Hypothesis_i::GetTextOptions
365  *  HexoticPlugin_Hypothesis_i::GetNbLayers
366  *  HexoticPlugin_Hypothesis_i::GetFirstLayerSize
367  *  HexoticPlugin_Hypothesis_i::GetDirection
368  *  HexoticPlugin_Hypothesis_i::GetGrowth
369  *  HexoticPlugin_Hypothesis_i::GetFacesWithLayers
370  *  HexoticPlugin_Hypothesis_i::GetImprintedFaces
371  */
372 //=============================================================================
373
374 CORBA::Long HexoticPlugin_Hypothesis_i::GetHexesMinLevel()
375 {
376   // MESSAGE("HexoticPlugin_Hypothesis_i::GetHexesMinLevel");
377   ASSERT(myBaseImpl);
378   return this->GetImpl()->GetHexesMinLevel();
379 }
380
381 CORBA::Long HexoticPlugin_Hypothesis_i::GetHexesMaxLevel()
382 {
383   // MESSAGE("HexoticPlugin_Hypothesis_i::GetHexesMaxLevel");
384   ASSERT(myBaseImpl);
385   return this->GetImpl()->GetHexesMaxLevel();
386 }
387
388 CORBA::Double HexoticPlugin_Hypothesis_i::GetMinSize()
389 {
390   // MESSAGE("HexoticPlugin_Hypothesis_i::GetMinSize");
391   ASSERT(myBaseImpl);
392   return this->GetImpl()->GetMinSize();
393 }
394
395 CORBA::Double HexoticPlugin_Hypothesis_i::GetMaxSize()
396 {
397   // MESSAGE("HexoticPlugin_Hypothesis_i::GetMaxSize");
398   ASSERT(myBaseImpl);
399   return this->GetImpl()->GetMaxSize();
400 }
401
402 CORBA::Boolean HexoticPlugin_Hypothesis_i::GetHexoticIgnoreRidges()
403 {
404   // MESSAGE("HexoticPlugin_Hypothesis_i::GetHexoticIgnoreRidges");
405   ASSERT(myBaseImpl);
406   return this->GetImpl()->GetHexoticIgnoreRidges();
407 }
408
409 CORBA::Boolean HexoticPlugin_Hypothesis_i::GetHexoticInvalidElements()
410 {
411   // MESSAGE("HexoticPlugin_Hypothesis_i::GetHexoticInvalidElements");
412   ASSERT(myBaseImpl);
413   return this->GetImpl()->GetHexoticInvalidElements();
414 }
415
416 CORBA::Double HexoticPlugin_Hypothesis_i::GetHexoticSharpAngleThreshold()
417 {
418   // MESSAGE("HexoticPlugin_Hypothesis_i::GetHexoticSharpAngleThreshold");
419   ASSERT(myBaseImpl);
420   return this->GetImpl()->GetHexoticSharpAngleThreshold();
421 }
422
423 CORBA::Long HexoticPlugin_Hypothesis_i::GetHexoticNbProc()
424 {
425   // MESSAGE("HexoticPlugin_Hypothesis_i::GetHexoticNbProc");
426   ASSERT(myBaseImpl);
427   return this->GetImpl()->GetHexoticNbProc();
428 }
429
430 char* HexoticPlugin_Hypothesis_i::GetHexoticWorkingDirectory()
431 {
432   ASSERT(myBaseImpl);
433   return CORBA::string_dup( this->GetImpl()->GetHexoticWorkingDirectory().c_str() );
434 }
435
436 CORBA::Long HexoticPlugin_Hypothesis_i::GetHexoticSdMode ()
437 {
438   // MESSAGE("HexoticPlugin_Hypothesis_i::GetHexoticSdMode");
439   ASSERT(myBaseImpl);
440   return this->GetImpl()->GetHexoticSdMode();
441 }
442
443 CORBA::Long HexoticPlugin_Hypothesis_i::GetHexoticVerbosity()
444 {
445   // MESSAGE("HexoticPlugin_Hypothesis_i::GetVerbosity");
446   ASSERT(myBaseImpl);
447   return this->GetImpl()->GetHexoticVerbosity();
448 }
449
450 CORBA::Long HexoticPlugin_Hypothesis_i::GetHexoticMaxMemory()
451 {
452   // MESSAGE("HexoticPlugin_Hypothesis_i::GetHexoticMaxMemory");
453   ASSERT(myBaseImpl);
454   return this->GetImpl()->GetHexoticMaxMemory();
455 }
456
457 char* HexoticPlugin_Hypothesis_i::GetTextOptions()
458 {
459   // MESSAGE("HexoticPlugin_Hypothesis_i::GetTextOptions");
460   ASSERT(myBaseImpl);
461   return CORBA::string_dup( this->GetImpl()->GetTextOptions().c_str() );
462 }
463
464 CORBA::Long HexoticPlugin_Hypothesis_i::GetNbLayers()
465 {
466   // MESSAGE("HexoticPlugin_Hypothesis_i::GetNbLayers");
467   ASSERT(myBaseImpl);
468   return this->GetImpl()->GetNbLayers();
469 }
470
471 CORBA::Double HexoticPlugin_Hypothesis_i::GetFirstLayerSize()
472 {
473   // MESSAGE("HexoticPlugin_Hypothesis_i::GetFirstLayerSize");
474   ASSERT(myBaseImpl);
475   return this->GetImpl()->GetFirstLayerSize();
476 }
477
478 CORBA::Boolean HexoticPlugin_Hypothesis_i::GetDirection()
479 {
480   // MESSAGE("HexoticPlugin_Hypothesis_i::GetDirection");
481   ASSERT(myBaseImpl);
482   return this->GetImpl()->GetDirection();
483 }
484
485 CORBA::Double HexoticPlugin_Hypothesis_i::GetGrowth()
486 {
487   // MESSAGE("HexoticPlugin_Hypothesis_i::GetGrowth");
488   ASSERT(myBaseImpl);
489   return this->GetImpl()->GetGrowth();
490 }
491
492 SMESH::long_array* HexoticPlugin_Hypothesis_i::GetFacesWithLayers()
493 {
494   // MESSAGE("HexoticPlugin_Hypothesis_i::GetFacesWithLayers");
495   ASSERT(myBaseImpl);
496   std::vector<int> idsVec = this->GetImpl()->GetFacesWithLayers();
497   SMESH::long_array_var ids = new SMESH::long_array;
498   ids->length( idsVec.size() );
499   for ( unsigned i = 0; i < idsVec.size(); ++i )
500     ids[i] = idsVec[i];
501   return ids._retn();
502 }
503
504 SMESH::long_array* HexoticPlugin_Hypothesis_i::GetImprintedFaces()
505 {
506   // MESSAGE("HexoticPlugin_Hypothesis_i::GetImprintedFaces");
507   ASSERT(myBaseImpl);
508   std::vector<int> idsVec = this->GetImpl()->GetImprintedFaces();
509   SMESH::long_array_var ids = new SMESH::long_array;
510   ids->length( idsVec.size() );
511   for ( unsigned i = 0; i < idsVec.size(); ++i )
512     ids[i] = idsVec[i];
513   return ids._retn();
514 }
515 //=============================================================================
516 /*!
517  *  HexoticPlugin_Hypothesis_i::GetImpl
518  *
519  *  Get implementation
520  */
521 //=============================================================================
522 ::HexoticPlugin_Hypothesis* HexoticPlugin_Hypothesis_i::GetImpl()
523 {
524   // MESSAGE("HexoticPlugin_Hypothesis_i::GetImpl");
525   return (::HexoticPlugin_Hypothesis*)myBaseImpl;
526 }
527
528 //================================================================================
529 /*!
530  * \brief Verify whether hypothesis supports given entity type 
531   * \param type - dimension (see SMESH::Dimension enumeration)
532   * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
533  * 
534  * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
535  */
536 //================================================================================  
537 CORBA::Boolean HexoticPlugin_Hypothesis_i::IsDimSupported( SMESH::Dimension type )
538 {
539   return type == SMESH::DIM_3D;
540 }