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