Salome HOME
Add missing method
[modules/smesh.git] / src / SMESH_I / SMESH_MEDMesh_i.cxx
1 //  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 //  This library is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU Lesser General Public
8 //  License as published by the Free Software Foundation; either
9 //  version 2.1 of the License.
10 //
11 //  This library is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 //  Lesser General Public License for more details.
15 //
16 //  You should have received a copy of the GNU Lesser General Public
17 //  License along with this library; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
24 //  File   : SMESH_MEDMesh_i.cxx
25 //  Module : SMESH
26 //
27 #include "SMESH_MEDMesh_i.hxx"
28 #include "SMESH_Gen_i.hxx"
29 #include "SMESH_Mesh_i.hxx"
30
31 #include "SMESHDS_Mesh.hxx"
32 #include "SMESHDS_SubMesh.hxx"
33
34 #include <TopExp.hxx>
35 #include <TopExp_Explorer.hxx>
36 #include <TopoDS.hxx>
37 #include <TopoDS_Iterator.hxx>
38 #include <TopoDS_Compound.hxx>
39 #include <TopoDS_CompSolid.hxx>
40 #include <TopoDS_Solid.hxx>
41 #include <TopoDS_Shell.hxx>
42 #include <TopoDS_Face.hxx>
43 #include <TopoDS_Wire.hxx>
44 #include <TopoDS_Edge.hxx>
45 #include <TopoDS_Vertex.hxx>
46 #include <TopoDS_Shape.hxx>
47 #include <TopTools_MapOfShape.hxx>
48
49 #include "utilities.h"
50 #include "Utils_CorbaException.hxx"
51
52 #include "SMESH_MEDSupport_i.hxx"
53 #include "SMESH_MEDFamily_i.hxx"
54
55 # include "Utils_ORB_INIT.hxx"
56 # include "Utils_SINGLETON.hxx"
57 # include "Utils_ExceptHandlers.hxx"
58
59 extern "C"
60 {
61 #include <stdio.h>
62 }
63
64 using namespace std;
65
66 //=============================================================================
67 /*!
68  * Default constructor
69  */
70 //=============================================================================
71 // PN Est-ce un const ?
72 SMESH_MEDMesh_i::SMESH_MEDMesh_i()
73 {
74   BEGIN_OF("Default Constructor SMESH_MEDMesh_i");
75   END_OF("Default Constructor SMESH_MEDMesh_i");
76 }
77
78 //=============================================================================
79 /*!
80  * Destructor
81  */
82 //=============================================================================
83 SMESH_MEDMesh_i::~SMESH_MEDMesh_i()
84 {
85 }
86
87 //=============================================================================
88 /*!
89  * Constructor
90  */
91 //=============================================================================
92 SMESH_MEDMesh_i::SMESH_MEDMesh_i(::SMESH_Mesh_i * m_i):_meshId(""),
93                                                        _compte(false),
94                                                        _creeFamily(false),
95                                                        _famIdent(0),
96                                                        _indexElts(0),
97                                                        _indexEnts(0)
98 {
99   BEGIN_OF("Constructor SMESH_MEDMesh_i");
100
101   _mesh_i = m_i;
102   _meshDS = _mesh_i->GetImpl().GetMeshDS();
103
104   END_OF("Constructor SMESH_MEDMesh_i");
105 }
106
107 //=============================================================================
108 /*!
109  * CORBA: Accessor for Name
110  */
111 //=============================================================================
112 char *SMESH_MEDMesh_i::getName() throw(SALOME::SALOME_Exception)
113 {
114   if (_meshDS == NULL)
115     THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
116                                  SALOME::INTERNAL_ERROR);
117
118   try
119   {
120     SMESH_Gen_i*             gen = SMESH_Gen_i::GetSMESHGen();
121     SALOMEDS::Study_var    study = gen->GetCurrentStudy();
122     SALOMEDS::SObject_var meshSO = gen->ObjectToSObject( study, _mesh_i->_this());
123     if ( meshSO->_is_nil() )
124       return CORBA::string_dup("toto");
125
126     CORBA::String_var name = meshSO->GetName();
127     return CORBA::string_dup( name.in() );
128   }
129   catch(...)
130   {
131     MESSAGE("Exception en accedant au nom");
132     THROW_SALOME_CORBA_EXCEPTION("Unable to acces Mesh C++ Object",
133                                  SALOME::INTERNAL_ERROR);
134   }
135   return 0;
136 }
137
138 //=============================================================================
139 /*!
140  * CORBA: Accessor for corbaindex cuisine interne 
141  */
142 //=============================================================================
143 CORBA::Long SMESH_MEDMesh_i::getCorbaIndex()throw(SALOME::SALOME_Exception)
144 {
145   MESSAGE("Non Implemente");
146   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
147 }
148
149 //=============================================================================
150 /*!
151  * CORBA: Accessor for Space Dimension
152  */
153 //=============================================================================
154 CORBA::Long SMESH_MEDMesh_i::getSpaceDimension()throw(SALOME::SALOME_Exception)
155 {
156   // PN : Il semblerait que la dimension soit fixee a 3
157   if (_mesh_i == 0)
158     THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
159                                  SALOME::INTERNAL_ERROR);
160   return 3;
161 }
162
163 //=============================================================================
164 /*!
165  * CORBA: Accessor for Mesh Dimension
166  */
167 //=============================================================================
168 CORBA::Long SMESH_MEDMesh_i::getMeshDimension()throw(SALOME::SALOME_Exception)
169 {
170   if (_mesh_i == 0)
171     THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
172                                  SALOME::INTERNAL_ERROR);
173   // PN : Il semblerait que la dimension soit fixee a 3
174   if (_mesh_i == 0)
175     THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
176                                  SALOME::INTERNAL_ERROR);
177   return 3;
178 }
179 //=============================================================================
180 /*!
181  * CORBA: Accessor for the boolean _isAGrid
182  */
183 //=============================================================================
184 CORBA::Boolean SMESH_MEDMesh_i::getIsAGrid() throw (SALOME::SALOME_Exception)
185 {
186   MESSAGE("!!!!!! NOT YET IMPLEMENTED !!!!!!");
187
188   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
189
190   return false;
191 }
192 //=============================================================================
193 /*!
194  * CORBA: Accessor for the connectivities, to see if they exist
195  */
196 //=============================================================================
197 CORBA::Boolean
198 SMESH_MEDMesh_i::existConnectivity(SALOME_MED::medConnectivity connectivityType,
199                                    SALOME_MED::medEntityMesh entity)
200   throw (SALOME::SALOME_Exception)
201 {
202   MESSAGE("!!!!!! IMPLEMENTED BUT ONLY PARTIALLY !!!!!!");
203
204
205   return false;
206
207 }
208 //=============================================================================
209 /*!
210  * CORBA: Accessor for Coordinate
211  */
212 //=============================================================================
213 CORBA::Double SMESH_MEDMesh_i::getCoordinate(CORBA::Long Number, CORBA::Long Axis)
214   throw (SALOME::SALOME_Exception)
215 {
216   MESSAGE("!!!!!! NOT YET IMPLEMENTED !!!!");
217
218   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
219
220   return 0.0;
221 }
222 //=============================================================================
223 /*!
224  * CORBA: Accessor for Coordinates System
225  */
226 //=============================================================================
227 char *SMESH_MEDMesh_i::getCoordinatesSystem() throw(SALOME::SALOME_Exception)
228 {
229   if (_mesh_i == 0)
230     THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
231                                  SALOME::INTERNAL_ERROR);
232   // PN : En dur. Non encore prevu
233   try
234   {
235     string systcoo = "CARTESIEN";
236     return CORBA::string_dup(systcoo.c_str());
237   }
238   catch(...)
239   {
240     MESSAGE("Exception en accedant au maillage");
241     THROW_SALOME_CORBA_EXCEPTION("Unable to acces Mesh C++ Object",
242                                  SALOME::INTERNAL_ERROR);
243   }
244 }
245
246 //=============================================================================
247 /*!
248  * CORBA: Accessor for Coordinates
249  */
250 //=============================================================================
251 SALOME_TYPES::ListOfDouble * SMESH_MEDMesh_i::getCoordinates
252 (SALOME_MED::medModeSwitch typeSwitch) throw(SALOME::SALOME_Exception)
253 {
254   if (_mesh_i == 0)
255     THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
256                                  SALOME::INTERNAL_ERROR);
257   SALOME_TYPES::ListOfDouble_var myseq = new SALOME_TYPES::ListOfDouble;
258   try
259   {
260     // PN  : En dur
261     int spaceDimension = 3;
262     int nbNodes = _meshDS->NbNodes();
263     SCRUTE(nbNodes);
264     myseq->length(nbNodes * spaceDimension);
265     int i = 0;
266
267     SMDS_NodeIteratorPtr itNodes=_meshDS->nodesIterator();
268     while(itNodes->more())
269     {
270       const SMDS_MeshNode* node = itNodes->next();
271
272       if (typeSwitch == SALOME_MED::MED_FULL_INTERLACE)
273       {
274         myseq[i * 3] = node->X();
275         myseq[i * 3 + 1] = node->Y();
276         myseq[i * 3 + 2] = node->Z();
277         SCRUTE(myseq[i * 3]);
278         SCRUTE(myseq[i * 3 + 1]);
279         SCRUTE(myseq[i * 3 + 2]);
280       }
281       else
282       {
283         ASSERT(typeSwitch == SALOME_MED::MED_NO_INTERLACE);
284         myseq[i] = node->X();
285         myseq[i + nbNodes] = node->Y();
286         myseq[i + (nbNodes * 2)] = node->Z();
287         SCRUTE(myseq[i]);
288         SCRUTE(myseq[i + nbNodes]);
289         SCRUTE(myseq[i + (nbNodes * 2)]);
290       }
291       i++;
292     }
293   }
294   catch(...)
295   {
296     MESSAGE("Exception en accedant aux coordonnees");
297     THROW_SALOME_CORBA_EXCEPTION("Unable to acces Mesh C++ Object",
298                                  SALOME::INTERNAL_ERROR);
299   }
300   return myseq._retn();
301 }
302
303 //=============================================================================
304 /*!
305  * CORBA: Accessor for Coordinates Names
306  */
307 //=============================================================================
308 SALOME_TYPES::ListOfString *
309 SMESH_MEDMesh_i::getCoordinatesNames()throw(SALOME::SALOME_Exception)
310 {
311   if (_mesh_i == 0)
312     THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
313                                  SALOME::INTERNAL_ERROR);
314   SALOME_TYPES::ListOfString_var myseq = new SALOME_TYPES::ListOfString;
315   try
316   {
317     // PN : en dur
318     int spaceDimension = 3;
319     myseq->length(spaceDimension);
320     myseq[0] = CORBA::string_dup("x");
321     myseq[1] = CORBA::string_dup("y");
322     myseq[2] = CORBA::string_dup("z");
323   }
324   catch(...)
325   {
326     MESSAGE("Exception en accedant aux noms des coordonnees");
327     THROW_SALOME_CORBA_EXCEPTION("Unable to acces Mesh C++ Object",
328                                  SALOME::INTERNAL_ERROR);
329   }
330   return myseq._retn();
331
332 }
333
334 //=============================================================================
335 /*!
336  * CORBA: Accessor for Coordinates Units
337  */
338 //=============================================================================
339 SALOME_TYPES::ListOfString *
340 SMESH_MEDMesh_i::getCoordinatesUnits()throw(SALOME::SALOME_Exception)
341 {
342   if (_mesh_i == 0)
343     THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
344                                  SALOME::INTERNAL_ERROR);
345   SALOME_TYPES::ListOfString_var myseq = new SALOME_TYPES::ListOfString;
346   try
347   {
348     // PN : en dur
349     int spaceDimension = 3;
350     myseq->length(spaceDimension);
351     myseq[0] = CORBA::string_dup("m");
352     myseq[1] = CORBA::string_dup("m");
353     myseq[2] = CORBA::string_dup("m");
354   }
355   catch(...)
356   {
357     MESSAGE("Exception en accedant aux unites des coordonnees");
358     THROW_SALOME_CORBA_EXCEPTION("Unable to acces Mesh C++ Object",
359                                  SALOME::INTERNAL_ERROR);
360   }
361   return myseq._retn();
362 }
363
364 //=============================================================================
365 /*!
366  * CORBA: Accessor for Number of Nodes
367  */
368 //=============================================================================
369 CORBA::Long SMESH_MEDMesh_i::getNumberOfNodes()throw(SALOME::SALOME_Exception)
370 {
371   if (_mesh_i == 0)
372     THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
373                                  SALOME::INTERNAL_ERROR);
374   try
375   {
376     return _meshDS->NbNodes();
377   }
378   catch(...)
379   {
380     MESSAGE("Exception en accedant au nombre de noeuds");
381     THROW_SALOME_CORBA_EXCEPTION("Unable to acces Mesh C++ Object",
382                                  SALOME::INTERNAL_ERROR);
383   }
384 }
385
386 //=============================================================================
387 /*!
388  * CORBA: Accessor for number of Types
389  */
390 //=============================================================================
391 CORBA::Long SMESH_MEDMesh_i::getNumberOfTypes(SALOME_MED::medEntityMesh entity)
392   throw(SALOME::SALOME_Exception)
393 {
394   if (_mesh_i == 0)
395     THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
396                                  SALOME::INTERNAL_ERROR);
397   try
398   {
399     if (!_compte)
400       calculeNbElts();
401     int retour = 0;
402     if (_mapNbTypes.find(entity) != _mapNbTypes.end())
403       retour = _mapNbTypes[entity];
404     return retour;
405   }
406   catch(...)
407   {
408     MESSAGE("Exception en accedant au nombre de Types");
409     THROW_SALOME_CORBA_EXCEPTION("Unable to acces Mesh C++ Object",
410                                  SALOME::INTERNAL_ERROR);
411   }
412 }
413
414 //=============================================================================
415 /*!
416  * CORBA: Accessor for existing geometry element types 
417  *        Not implemented for MED_ALL_ENTITIES
418  */
419 //=============================================================================
420 SALOME_MED::medGeometryElement_array *
421 SMESH_MEDMesh_i::getTypes(SALOME_MED::medEntityMesh entity) throw(SALOME::
422                                                                   SALOME_Exception)
423 {
424   if (_mesh_i == 0)
425     THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
426                                  SALOME::INTERNAL_ERROR);
427   if (entity == SALOME_MED::MED_ALL_ENTITIES)
428     THROW_SALOME_CORBA_EXCEPTION("Not implemented for MED_ALL_ENTITIES",
429                                  SALOME::BAD_PARAM);
430   if (!_compte)
431     calculeNbElts();
432   SALOME_MED::medGeometryElement_array_var myseq =
433     new SALOME_MED::medGeometryElement_array;
434   try
435   {
436     if (_mapNbTypes.find(entity) == _mapNbTypes.end())
437       THROW_SALOME_CORBA_EXCEPTION("No Such Entity in the mesh",
438                                    SALOME::BAD_PARAM);
439     int nbTypes = _mapNbTypes[entity];
440
441     myseq->length(nbTypes);
442
443     if (_mapIndToVectTypes.find(entity) == _mapIndToVectTypes.end())
444       THROW_SALOME_CORBA_EXCEPTION("No Such Entity in the mesh",
445                                    SALOME::INTERNAL_ERROR);
446
447     int index = _mapIndToVectTypes[entity];
448     ASSERT(_TypesId[index].size() != 0);
449     int i = 0;
450     vector < SALOME_MED::medGeometryElement >::iterator it;
451     for (it = _TypesId[index].begin(); it != _TypesId[index].end(); it++)
452     {
453       myseq[i++] = *it;
454     };
455   }
456   catch(...)
457   {
458     MESSAGE("Exception en accedant aux differents types");
459     THROW_SALOME_CORBA_EXCEPTION("Unable to acces Mesh C++ Object",
460                                  SALOME::INTERNAL_ERROR);
461   }
462   return myseq._retn();
463 }
464
465 //=============================================================================
466 /*!
467  * CORBA: Returns number of elements of type medGeometryElement
468  *        Not implemented for MEDMEM_ALL_ELEMENTS 
469  *        implemented for MED_ALL_ENTITIES
470  *
471  * Dans cette implementation, il n est pas prevu de tenir compte du entity
472  * qui ne doit pas pouvoir avoir deux valeurs differentes pour un geomElement 
473  */
474 //=============================================================================
475 CORBA::Long SMESH_MEDMesh_i::getNumberOfElements(SALOME_MED::
476                                                  medEntityMesh entity,
477                                                  SALOME_MED::medGeometryElement geomElement) throw(SALOME::SALOME_Exception)
478 {
479   if (_mesh_i == 0)
480     THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
481                                  SALOME::INTERNAL_ERROR);
482   if (geomElement == SALOME_MED::MEDMEM_ALL_ELEMENTS)
483     THROW_SALOME_CORBA_EXCEPTION("Not implemented for MEDMEM_ALL_ELEMENTS",
484                                  SALOME::BAD_PARAM);
485   if (!_compte)
486     calculeNbElts();
487
488   try
489   {
490     int retour = 0;
491     if (_mapIndToSeqElts.find(geomElement) != _mapIndToSeqElts.end())
492     {
493       int index = _mapIndToSeqElts[geomElement];
494
495       retour = _seq_elemId[index]->length();
496     }
497     return retour;
498   }
499   catch(...)
500   {
501     MESSAGE("Exception en accedant au nombre d élements");
502     THROW_SALOME_CORBA_EXCEPTION("Unable to acces Mesh C++ Object",
503                                  SALOME::INTERNAL_ERROR);
504   }
505 }
506
507 //=============================================================================
508 /*!
509  * CORBA: Accessor for connectivities
510  */
511 //=============================================================================
512 SALOME_TYPES::ListOfLong *
513 SMESH_MEDMesh_i::getConnectivity(SALOME_MED::medModeSwitch typeSwitch,
514                                  SALOME_MED::medConnectivity mode,
515                                  SALOME_MED::medEntityMesh entity,
516                                  SALOME_MED::medGeometryElement geomElement)
517   throw(SALOME::SALOME_Exception)
518 {
519   if (_mesh_i == 0)
520     THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
521                                  SALOME::INTERNAL_ERROR);
522   if (mode != SALOME_MED::MED_NODAL)
523     THROW_SALOME_CORBA_EXCEPTION("Not Implemented", SALOME::BAD_PARAM);
524   if (typeSwitch == SALOME_MED::MED_NO_INTERLACE)
525     THROW_SALOME_CORBA_EXCEPTION("Not Yet Implemented", SALOME::BAD_PARAM);
526   if (!_compte)
527     calculeNbElts();
528
529   // Faut-il renvoyer un pointeur vide ???
530   if (_mapIndToSeqElts.find(geomElement) != _mapIndToSeqElts.end())
531     THROW_SALOME_CORBA_EXCEPTION("No Such Element in the mesh",
532                                  SALOME::BAD_PARAM);
533
534   int index = _mapIndToSeqElts[geomElement];
535
536   return _seq_elemId[index]._retn();
537 }
538
539 //=============================================================================
540 /*!
541  * CORBA: Accessor for connectivities
542  */
543 //=============================================================================
544 SALOME_TYPES::ListOfLong *
545 SMESH_MEDMesh_i::getConnectivity(SALOME_MED::medConnectivity mode,
546                                  SALOME_MED::medEntityMesh entity,
547                                  SALOME_MED::medGeometryElement geomElement)
548   throw(SALOME::SALOME_Exception)
549 {
550   MESSAGE("Pas Implemente dans SMESH");
551   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
552   return 0;
553 }
554
555 //=============================================================================
556 /*!
557  * CORBA: Accessor for connectivities
558  */
559 //=============================================================================
560 SALOME_TYPES::ListOfLong *
561 SMESH_MEDMesh_i::getConnectivityIndex(SALOME_MED::medConnectivity mode,
562                                       SALOME_MED::medEntityMesh entity)
563   throw(SALOME::SALOME_Exception)
564 {
565   MESSAGE("Pas Implemente dans SMESH");
566   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
567   return 0;
568 }
569
570 //=============================================================================
571 /*!
572  * CORBA: Find an element corresponding to the given connectivity
573  */
574 //=============================================================================
575 CORBA::Long
576 SMESH_MEDMesh_i::getElementNumber(SALOME_MED::medConnectivity mode,
577                                   SALOME_MED::medEntityMesh entity,
578                                   SALOME_MED::medGeometryElement type,
579                                   const SALOME_TYPES::ListOfLong & connectivity)
580   throw(SALOME::SALOME_Exception)
581 {
582   const char *LOC = "getElementNumber ";
583   MESSAGE(LOC << "Pas Implemente dans SMESH");
584   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
585   return -1;
586 }
587
588 //=============================================================================
589 /*!
590  * CORBA: Accessor for Ascendant connectivities
591  * not implemented for MED_ALL_ENTITIES and MED_MAILLE
592  */
593 //=============================================================================
594 SALOME_TYPES::ListOfLong *
595 SMESH_MEDMesh_i::getReverseConnectivity(SALOME_MED::
596                                         medConnectivity mode) throw(SALOME::SALOME_Exception)
597 {
598   MESSAGE("Pas Implemente dans SMESH");
599   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
600   return 0;
601 }
602
603 //=============================================================================
604 /*!
605  * CORBA: Accessor for connectivities
606  */
607 //=============================================================================
608 SALOME_TYPES::ListOfLong *
609 SMESH_MEDMesh_i::getReverseConnectivityIndex(SALOME_MED::
610                                              medConnectivity mode) throw(SALOME::SALOME_Exception)
611 {
612   MESSAGE("Pas Implemente dans SMESH");
613   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
614   return 0;
615 }
616
617 //=============================================================================
618 /*!
619  * CORBA: Returns number of families within the mesh
620  */
621 //=============================================================================
622 CORBA::Long SMESH_MEDMesh_i::getNumberOfFamilies(SALOME_MED::
623                                                  medEntityMesh entity) throw(SALOME::SALOME_Exception)
624 {
625   if (_creeFamily == false)
626     createFamilies();
627   if (_mesh_i == 0)
628     THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
629                                  SALOME::INTERNAL_ERROR);
630   return _families.size();
631 }
632
633 //=============================================================================
634 /*!
635  * CORBA: Returns number of groups within the mesh
636  */
637 //=============================================================================
638 CORBA::Long SMESH_MEDMesh_i::getNumberOfGroups(SALOME_MED::medEntityMesh entity)
639   throw(SALOME::SALOME_Exception)
640 {
641   if (_mesh_i == 0)
642     THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
643                                  SALOME::INTERNAL_ERROR);
644   MESSAGE(" Pas d implementation des groupes dans SMESH");
645   return 0;
646 }
647
648 //=============================================================================
649 /*!
650  * CORBA: Returns references for families within the mesh
651  */
652 //=============================================================================
653 SALOME_MED::Family_array *
654 SMESH_MEDMesh_i::getFamilies(SALOME_MED::
655                              medEntityMesh entity) throw(SALOME::SALOME_Exception)
656 {
657   if (_creeFamily == false)
658     createFamilies();
659   if (_mesh_i == 0)
660     THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
661                                  SALOME::INTERNAL_ERROR);
662   SALOME_MED::Family_array_var myseq = new SALOME_MED::Family_array;
663   int nbfam = _families.size();
664   myseq->length(nbfam);
665   int i = 0;
666   vector < SALOME_MED::FAMILY_ptr >::iterator it;
667   for (it = _families.begin(); it != _families.end(); it++)
668   {
669     myseq[i++] = *it;
670   };
671   return myseq._retn();
672 }
673
674 //=============================================================================
675 /*!
676  * CORBA: Returns references for family i within the mesh
677  */
678 //=============================================================================
679 SALOME_MED::FAMILY_ptr SMESH_MEDMesh_i::getFamily(SALOME_MED::
680                                                   medEntityMesh entity, CORBA::Long i) throw(SALOME::SALOME_Exception)
681 {
682   if (_creeFamily == false)
683     createFamilies();
684   if (_mesh_i == 0)
685     THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
686                                  SALOME::INTERNAL_ERROR);
687
688   SCRUTE(_families[i]->getName());
689   MESSAGE(" SMESH_MEDMesh_i::getFamily " << i) return _families[i];
690 }
691
692 //=============================================================================
693 /*!
694  * CORBA: Returns references for groups within the mesh
695  */
696 //=============================================================================
697 SALOME_MED::Group_array *
698 SMESH_MEDMesh_i::getGroups(SALOME_MED::medEntityMesh entity) throw(SALOME::
699                                                                    SALOME_Exception)
700 {
701   if (_mesh_i == 0)
702     THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
703                                  SALOME::INTERNAL_ERROR);
704   MESSAGE(" Pas d implementation des groupes dans SMESH");
705   THROW_SALOME_CORBA_EXCEPTION("No group implementation", SALOME::BAD_PARAM);
706 }
707
708 //=============================================================================
709 /*!
710  * CORBA: Returns references for group i within the mesh
711  */
712 //=============================================================================
713 SALOME_MED::GROUP_ptr SMESH_MEDMesh_i::getGroup(SALOME_MED::
714                                                 medEntityMesh entity, CORBA::Long i) throw(SALOME::SALOME_Exception)
715 {
716   if (_mesh_i == 0)
717     THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
718                                  SALOME::INTERNAL_ERROR);
719   MESSAGE(" Pas d implementation des groupes dans SMESH");
720   THROW_SALOME_CORBA_EXCEPTION("No group implementation", SALOME::BAD_PARAM);
721 }
722 //=============================================================================
723 /*!
724  * CORBA: Returns references for the global numbering index
725  */
726 //=============================================================================
727 SALOME_TYPES::ListOfLong*
728 SMESH_MEDMesh_i::getGlobalNumberingIndex(SALOME_MED::medEntityMesh entity)
729   throw (SALOME::SALOME_Exception)
730 {
731   MESSAGE("!!!! NOT YET IMPLEMENTED !!!!!");
732
733   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
734
735   return NULL;
736 }
737 //=============================================================================
738 /*!
739  * CORBA: Returns references for the support of boundary elements of type
740  * entity
741  */
742 //=============================================================================
743 SALOME_MED::SUPPORT_ptr
744 SMESH_MEDMesh_i::getBoundaryElements(SALOME_MED::medEntityMesh entity)
745   throw (SALOME::SALOME_Exception)
746 {
747   MESSAGE("!!!! NOT YET IMPLEMENTED !!!!!");
748
749   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
750
751   return NULL;
752 }
753 //=============================================================================
754 /*!
755  * CORBA:  Method return a reference on a support define on all the element of
756  *         an entity.
757  */
758 //=============================================================================
759 SALOME_MED::SUPPORT_ptr
760 SMESH_MEDMesh_i::getSupportOnAll(SALOME_MED::medEntityMesh entity)
761   throw (SALOME::SALOME_Exception)
762 {
763   MESSAGE("!!!! NOT YET IMPLEMENTED !!!!!");
764
765   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
766
767   return NULL;
768 }
769 //=============================================================================
770 /*!
771  * CORBA: Returns references for the support of the skin of the support
772  * mySupport3D
773  */
774 //=============================================================================
775 SALOME_MED::SUPPORT_ptr
776 SMESH_MEDMesh_i::getSkin(SALOME_MED::SUPPORT_ptr mySupport3D)
777   throw (SALOME::SALOME_Exception)
778 {
779   MESSAGE("!!!! NOT YET IMPLEMENTED !!!!!");
780
781   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
782
783   return NULL;
784 }
785 //=============================================================================
786 /*!
787  * CORBA: 
788  */
789 //=============================================================================
790 SALOME_MED::FIELD_ptr SMESH_MEDMesh_i::getVolume(SALOME_MED::
791                                                  SUPPORT_ptr mySupport) throw(SALOME::SALOME_Exception)
792 {
793   MESSAGE("Pas Implemente dans SMESH");
794   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
795   return 0;
796 }
797
798 //=============================================================================
799 /*!
800  * CORBA: 
801  */
802 //=============================================================================
803 SALOME_MED::FIELD_ptr SMESH_MEDMesh_i::getArea(SALOME_MED::
804                                                SUPPORT_ptr mySupport) throw(SALOME::SALOME_Exception)
805 {
806   MESSAGE("Pas Implemente dans SMESH");
807   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
808   return 0;
809 }
810
811 //=============================================================================
812 /*!
813  * CORBA: 
814  */
815 //=============================================================================
816 SALOME_MED::FIELD_ptr SMESH_MEDMesh_i::getLength(SALOME_MED::
817                                                  SUPPORT_ptr mySupport) throw(SALOME::SALOME_Exception)
818 {
819   MESSAGE("Pas Implemente dans SMESH");
820   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
821   return 0;
822 }
823
824 //=============================================================================
825 /*!
826  * CORBA: 
827  */
828 //=============================================================================
829 SALOME_MED::FIELD_ptr SMESH_MEDMesh_i::getNormal(SALOME_MED::
830                                                  SUPPORT_ptr mySupport) throw(SALOME::SALOME_Exception)
831 {
832   MESSAGE("Pas Implemente dans SMESH");
833   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
834   return 0;
835 }
836
837 //=============================================================================
838 /*!
839  * CORBA: 
840  */
841 //=============================================================================
842 SALOME_MED::FIELD_ptr SMESH_MEDMesh_i::getBarycenter(SALOME_MED::
843                                                      SUPPORT_ptr mySupport) throw(SALOME::SALOME_Exception)
844 {
845   MESSAGE("Pas Implemente dans SMESH");
846   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
847   return 0;
848 }
849
850 //=============================================================================
851 /*!
852  * CORBA: 
853  */
854 //=============================================================================
855 SALOME_MED::FIELD_ptr SMESH_MEDMesh_i::getNeighbourhood(SALOME_MED::
856                                                         SUPPORT_ptr mySupport) throw(SALOME::SALOME_Exception)
857 {
858   MESSAGE("Non Implemente");
859   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
860   return 0;
861 }
862
863 //=============================================================================
864 /*!
865  * CORBA: add the Mesh in the StudyManager 
866  * PN Pas Implemente
867  */
868 //=============================================================================
869 void SMESH_MEDMesh_i::addInStudy(SALOMEDS::Study_ptr myStudy,
870                                  SALOME_MED::GMESH_ptr myIor) throw(SALOME::SALOME_Exception)
871 {
872   BEGIN_OF("MED_Mesh_i::addInStudy");
873   if (_meshId != "")
874   {
875     MESSAGE("Mesh already in Study");
876     THROW_SALOME_CORBA_EXCEPTION("Mesh already in Study",
877                                  SALOME::BAD_PARAM);
878   };
879
880   /*
881    * SALOMEDS::StudyBuilder_var myBuilder = myStudy->NewBuilder();
882    * 
883    * // Create SComponent labelled 'MED' if it doesn't already exit
884    * SALOMEDS::SComponent_var medfather = myStudy->FindComponent("MED");
885    * if ( CORBA::is_nil(medfather) ) 
886    * {
887    * MESSAGE("Add Component MED");
888    * medfather = myBuilder->NewComponent("MED");
889    * //myBuilder->AddAttribute (medfather,SALOMEDS::Name,"MED");
890    * SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(
891    * myBuilder->FindOrCreateAttribute(medfather, "AttributeName"));
892    * aName->SetValue("MED");
893    * 
894    * myBuilder->DefineComponentInstance(medfather,myIor);
895    * 
896    * } ;
897    * 
898    * MESSAGE("Add a mesh Object under MED");
899    * myBuilder->NewCommand();
900    * SALOMEDS::SObject_var newObj = myBuilder->NewObject(medfather);
901    * 
902    * ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
903    * ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting()) ;
904    * CORBA::ORB_var &orb = init(0,0);
905    * CORBA::String_var iorStr = orb->object_to_string(myIor);
906    * //myBuilder->AddAttribute(newObj,SALOMEDS::IOR,iorStr.in());
907    * SALOMEDS::AttributeIOR_var aIOR = SALOMEDS::AttributeIOR::_narrow(
908    * myBuilder->FindOrCreateAttribute(newObj, "AttributeIOR"));
909    * aIOR->SetValue(iorStr.c_str());
910    * 
911    * //myBuilder->AddAttribute(newObj,SALOMEDS::Name,_mesh_i->getName().c_str());
912    * SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(
913    * myBuilder->FindOrCreateAttribute(newObj, "AttributeName"));
914    * aName->SetValue(_mesh_i->getName().c_str());
915    * 
916    * _meshId = newObj->GetID();
917    * myBuilder->CommitCommand();
918    * 
919    */
920   END_OF("Mesh_i::addInStudy(SALOMEDS::Study_ptr myStudy)");
921 }
922
923 //=============================================================================
924 /*!
925  * CORBA: write mesh in a med file
926  */
927 //=============================================================================
928 void SMESH_MEDMesh_i::write(CORBA::Long i, const char *driverMeshName)
929   throw(SALOME::SALOME_Exception)
930 {
931   MESSAGE("Non Implemente");
932   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
933 }
934
935 //=============================================================================
936 /*!
937  * CORBA: read mesh in a med file
938  */
939 //=============================================================================
940 void SMESH_MEDMesh_i::read(CORBA::Long i) throw(SALOME::SALOME_Exception)
941 {
942   MESSAGE("Non Implemente");
943   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
944 }
945
946 //=============================================================================
947 /*!
948  * CORBA : release driver
949  */
950 //=============================================================================
951 void SMESH_MEDMesh_i::rmDriver(CORBA::Long i) throw(SALOME::SALOME_Exception)
952 {
953   MESSAGE("Non Implemente");
954   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
955 }
956
957 //=============================================================================
958 /*!
959  * CORBA : attach driver
960  */
961 //=============================================================================
962 CORBA::Long SMESH_MEDMesh_i::addDriver(SALOME_MED::medDriverTypes driverType,
963                                        const char *fileName, const char *meshName) throw(SALOME::SALOME_Exception)
964 {
965   MESSAGE("Non Implemente");
966   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
967   return 0;
968 }
969
970 //=============================================================================
971 /*!
972  * Calcule le Nb d'elements par entite geometrique
973  */
974 //=============================================================================
975 void SMESH_MEDMesh_i::calculeNbElts() throw(SALOME::SALOME_Exception)
976 {
977   if (!_compte)
978   {
979     _compte = true;
980
981     _mapNbTypes[SALOME_MED::MED_NODE] = 1;
982     // On compte les aretes MEDMEM_SEG2 ou MEDMEM_SEG3
983     // On range les elements dans  les vecteurs correspondants 
984
985     _mapIndToSeqElts[SALOME_MED::MEDMEM_SEG2] = _indexElts++;
986     _mapIndToSeqElts[SALOME_MED::MEDMEM_SEG3] = _indexElts++;
987     _mapIndToVectTypes[SALOME_MED::MED_EDGE] = _indexEnts++;
988
989     int trouveSeg2 = 0;
990     int trouveSeg3 = 0;
991     SALOME_MED::medGeometryElement medElement;
992
993     SMDS_EdgeIteratorPtr itEdges=_meshDS->edgesIterator();
994     while(itEdges->more())
995     {
996       const SMDS_MeshEdge* elem = itEdges->next();
997       int nb_of_nodes = elem->NbNodes();
998
999       switch (nb_of_nodes)
1000       {
1001       case 2:
1002         {
1003           medElement = SALOME_MED::MEDMEM_SEG2;
1004           if (trouveSeg2 == 0)
1005           {
1006             trouveSeg2 = 1;
1007             _TypesId[SALOME_MED::MED_EDGE].
1008               push_back(SALOME_MED::MEDMEM_SEG2);
1009           }
1010           break;
1011         }
1012       case 3:
1013         {
1014           medElement = SALOME_MED::MEDMEM_SEG3;
1015           if (trouveSeg3 == 0)
1016           {
1017             trouveSeg3 = 1;
1018             _TypesId[SALOME_MED::MED_EDGE].
1019               push_back(SALOME_MED::MEDMEM_SEG3);
1020           }
1021           break;
1022         }
1023       }
1024       int index = _mapIndToSeqElts[medElement];
1025       SCRUTE(index);
1026       // Traitement de l arete
1027
1028       int longueur = _seq_elemId[index]->length();
1029       _seq_elemId[index]->length(longueur + nb_of_nodes);
1030
1031       SMDS_NodeIteratorPtr itn=_meshDS->nodesIterator();
1032
1033       for(int k=0; itn->more(); k++)
1034         _seq_elemId[index][longueur + k] = itn->next()->GetID()+1;
1035     }
1036
1037     _mapNbTypes[SALOME_MED::MED_EDGE] = trouveSeg2 + trouveSeg3;
1038
1039     // On compte les faces MEDMEM_TRIA3, MEDMEM_HEXA8, MEDMEM_TRIA6
1040     // On range les elements dans  les vecteurs correspondants 
1041     int trouveTria3 = 0;
1042     int trouveTria6 = 0;
1043     int trouveQuad4 = 0;
1044
1045     _mapIndToSeqElts[SALOME_MED::MEDMEM_TRIA3] = _indexElts++;
1046     _mapIndToSeqElts[SALOME_MED::MEDMEM_TRIA6] = _indexElts++;
1047     _mapIndToSeqElts[SALOME_MED::MEDMEM_QUAD4] = _indexElts++;
1048     _mapIndToVectTypes[SALOME_MED::MED_FACE] = _indexEnts++;
1049
1050     SMDS_FaceIteratorPtr itFaces=_meshDS->facesIterator();
1051     while(itFaces->more())
1052     {
1053       const SMDS_MeshFace * elem = itFaces->next();
1054       int nb_of_nodes = elem->NbNodes();
1055
1056       switch (nb_of_nodes)
1057       {
1058       case 3:
1059         {
1060           medElement = SALOME_MED::MEDMEM_TRIA3;
1061           if (trouveTria3 == 0)
1062           {
1063             trouveTria3 = 1;
1064             _TypesId[SALOME_MED::MED_FACE].
1065               push_back(SALOME_MED::MEDMEM_TRIA3);
1066           }
1067           break;
1068         }
1069       case 4:
1070         {
1071           medElement = SALOME_MED::MEDMEM_QUAD4;
1072           if (trouveQuad4 == 0)
1073           {
1074             trouveQuad4 = 1;
1075             _TypesId[SALOME_MED::MED_FACE].
1076               push_back(SALOME_MED::MEDMEM_QUAD4);
1077           }
1078           break;
1079         }
1080       case 6:
1081         {
1082           medElement = SALOME_MED::MEDMEM_TRIA6;
1083           if (trouveTria6 == 0)
1084           {
1085             trouveTria6 = 1;
1086             _TypesId[SALOME_MED::MED_FACE].
1087               push_back(SALOME_MED::MEDMEM_TRIA6);
1088           }
1089           break;
1090         }
1091       }
1092       int index = _mapIndToSeqElts[medElement];
1093       SCRUTE(index);
1094
1095       // Traitement de la face
1096       // Attention La numérotation des noeuds Med commence a 1
1097
1098       int longueur = _seq_elemId[index]->length();
1099       _seq_elemId[index]->length(longueur + nb_of_nodes);
1100
1101       SMDS_NodeIteratorPtr itn=_meshDS->nodesIterator();
1102
1103       for(int k=0; itn->more(); k++)
1104         _seq_elemId[index][longueur + k] = itn->next()->GetID()+1;
1105     } //itFaces
1106
1107     _mapNbTypes[SALOME_MED::MED_FACE] =
1108       trouveTria3 + trouveTria6 + trouveQuad4;
1109
1110     _mapIndToSeqElts[SALOME_MED::MEDMEM_HEXA8] = _indexElts++;
1111     _mapIndToVectTypes[SALOME_MED::MED_CELL] = _indexEnts++;
1112     int index = _mapIndToSeqElts[medElement];
1113
1114     int trouveHexa8 = 0;
1115
1116     SMDS_VolumeIteratorPtr itVolumes=_meshDS->volumesIterator();
1117     while(itVolumes->more())
1118     {
1119       const SMDS_MeshVolume * elem = itVolumes->next();
1120
1121       int nb_of_nodes = elem->NbNodes();
1122       medElement = SALOME_MED::MEDMEM_HEXA8;
1123       ASSERT(nb_of_nodes == 8);
1124
1125       if (trouveHexa8 == 0)
1126       {
1127         trouveHexa8 = 1;
1128         _TypesId[SALOME_MED::MED_CELL].push_back(SALOME_MED::MEDMEM_HEXA8);
1129       };
1130       // Traitement de la maille
1131       int longueur = _seq_elemId[index]->length();
1132       _seq_elemId[index]->length(longueur + nb_of_nodes);
1133
1134       SMDS_NodeIteratorPtr itn=_meshDS->nodesIterator();
1135       for(int k=0; itn->more(); k++)
1136         _seq_elemId[index][longueur + k] = itn->next()->GetID()+1;
1137     }
1138
1139     _mapNbTypes[SALOME_MED::MED_CELL] = trouveHexa8;
1140     _mapNbTypes[SALOME_MED::MED_ALL_ENTITIES]
1141       =
1142       trouveHexa8 + trouveTria3 + trouveTria6 + trouveQuad4 + trouveSeg2 +
1143       trouveSeg3;
1144   }// fin du _compte
1145 };
1146
1147 //=============================================================================
1148 /*!
1149  * Creation des familles
1150  */
1151 //=============================================================================
1152 void SMESH_MEDMesh_i::createFamilies() throw(SALOME::SALOME_Exception)
1153 {
1154   Unexpect aCatch(SALOME_SalomeException);
1155   string famDes = ("Je ne sais pas");
1156   string famName0 = "Famille_";
1157   string famName;
1158   char numero[10];
1159
1160   if (_creeFamily == false)
1161   {
1162     _creeFamily = true;
1163     //SMESH_subMesh_i *subMeshServant;
1164
1165     map < int, SMESH_subMesh_i * >::iterator it;
1166     for (it = _mesh_i->_mapSubMesh_i.begin();
1167          it != _mesh_i->_mapSubMesh_i.end(); it++)
1168     {
1169       SMESH_subMesh_i *submesh_i = (*it).second;
1170       int famIdent = (*it).first;
1171
1172       ASSERT(famIdent < 999999999);
1173       sprintf(numero, "%d\n", famIdent);
1174       famName = famName0 + numero;
1175
1176       SMESH_MEDFamily_i *famservant =
1177         new SMESH_MEDFamily_i(famIdent, submesh_i,
1178                               famName, famDes, SALOME_MED::MED_NODE);
1179 #ifdef WNT
1180       SALOME_MED::FAMILY_ptr famille = SALOME_MED::FAMILY::_nil();
1181       POA_SALOME_MED::FAMILY* servantbase = dynamic_cast<POA_SALOME_MED::FAMILY*>(famservant);
1182       if ( servantbase )
1183         famille = SALOME_MED::FAMILY::_narrow( servantbase->_this() );
1184 #else 
1185       SALOME_MED::FAMILY_ptr famille = 
1186         SALOME_MED::FAMILY::_narrow( famservant->POA_SALOME_MED::FAMILY::_this() );
1187 #endif
1188       _families.push_back(famille);
1189     }
1190   }
1191 };
1192 //=============================================================================
1193 /*!
1194  * Gives informations of the considered mesh.
1195  */
1196 //=============================================================================
1197 SALOME_MED::GMESH::meshInfos * SMESH_MEDMesh_i::getMeshGlobal()
1198   throw (SALOME::SALOME_Exception)
1199 {
1200   MESSAGE("!!!! NOT YET IMPLEMENTED !!!!!");
1201
1202   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
1203
1204   return NULL;
1205 }
1206
1207 //================================================================================
1208 /*!
1209  * \brief Converts this GMESH into MESH
1210  */
1211 //================================================================================
1212
1213 SALOME_MED::MESH_ptr SMESH_MEDMesh_i::convertInMESH() throw (SALOME::SALOME_Exception)
1214 {
1215   MESSAGE("!!!! NOT YET IMPLEMENTED !!!!!");
1216
1217   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
1218
1219   return NULL;
1220 }
1221
1222 //=============================================================================
1223 /*!
1224  * Gives informations on coordinates of the considered mesh.
1225  */
1226 //=============================================================================
1227 SALOME_MED::GMESH::coordinateInfos * SMESH_MEDMesh_i::getCoordGlobal()
1228   throw (SALOME::SALOME_Exception)
1229 {
1230   MESSAGE("!!!! NOT YET IMPLEMENTED !!!!!");
1231
1232   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
1233
1234   return NULL;
1235 }
1236 //=============================================================================
1237 /*!
1238  * Gives informations on connectivities of the considered mesh for the entity
1239  * entity.
1240  */
1241 //=============================================================================
1242 SALOME_MED::MESH::connectivityInfos *
1243 SMESH_MEDMesh_i::getConnectGlobal(SALOME_MED::medEntityMesh entity)
1244   throw (SALOME::SALOME_Exception)
1245 {
1246   MESSAGE("!!!! NOT YET IMPLEMENTED !!!!!");
1247
1248   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
1249
1250   return NULL;
1251 }
1252 //=============================================================================
1253 /*!
1254  * Gives the type of the element number of entity entity
1255  */
1256 //=============================================================================
1257 SALOME_MED::medGeometryElement
1258 SMESH_MEDMesh_i::getElementType(SALOME_MED::medEntityMesh entity,
1259                                 CORBA::Long number)
1260   throw (SALOME::SALOME_Exception)
1261 {
1262   MESSAGE("!!!! NOT YET IMPLEMENTED !!!!!");
1263
1264   THROW_SALOME_CORBA_EXCEPTION("Unimplemented Method", SALOME::BAD_PARAM);
1265
1266   return (SALOME_MED::medGeometryElement) 0;
1267 }