- if (_mesh_i == 0)
- THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
- SALOME::INTERNAL_ERROR);
- SALOME_MED::double_array_var myseq = new SALOME_MED::double_array;
- try
- {
- // PN : En dur
- int spaceDimension = 3;
- int nbNodes = _meshDS->NbNodes();
- SCRUTE(nbNodes);
- myseq->length(nbNodes * spaceDimension);
- int i = 0;
-
- SMDS_NodeIteratorPtr itNodes=_meshDS->nodesIterator();
- while(itNodes->more())
- {
- const SMDS_MeshNode* node = itNodes->next();
-
- if (typeSwitch == SALOME_MED::MED_FULL_INTERLACE)
- {
- myseq[i * 3] = node->X();
- myseq[i * 3 + 1] = node->Y();
- myseq[i * 3 + 2] = node->Z();
- SCRUTE(myseq[i * 3]);
- SCRUTE(myseq[i * 3 + 1]);
- SCRUTE(myseq[i * 3 + 2]);
- }
- else
- {
- ASSERT(typeSwitch == SALOME_MED::MED_NO_INTERLACE);
- myseq[i] = node->X();
- myseq[i + nbNodes] = node->Y();
- myseq[i + (nbNodes * 2)] = node->Z();
- SCRUTE(myseq[i]);
- SCRUTE(myseq[i + nbNodes]);
- SCRUTE(myseq[i + (nbNodes * 2)]);
- }
- i++;
- }
- }
- catch(...)
- {
- MESSAGE("Exception en accedant aux coordonnees");
- THROW_SALOME_CORBA_EXCEPTION("Unable to acces Mesh C++ Object",
- SALOME::INTERNAL_ERROR);
- }
- return myseq._retn();
+ if (_mesh_i == 0)
+ THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
+ SALOME::INTERNAL_ERROR);
+ SALOME_TYPES::ListOfDouble_var myseq = new SALOME_TYPES::ListOfDouble;
+ try
+ {
+ // PN : En dur
+ int spaceDimension = 3;
+ int nbNodes = _meshDS->NbNodes();
+ SCRUTE(nbNodes);
+ myseq->length(nbNodes * spaceDimension);
+ int i = 0;
+
+ SMDS_NodeIteratorPtr itNodes=_meshDS->nodesIterator();
+ while(itNodes->more())
+ {
+ const SMDS_MeshNode* node = itNodes->next();
+
+ if (typeSwitch == SALOME_MED::MED_FULL_INTERLACE)
+ {
+ myseq[i * 3] = node->X();
+ myseq[i * 3 + 1] = node->Y();
+ myseq[i * 3 + 2] = node->Z();
+ SCRUTE(myseq[i * 3]);
+ SCRUTE(myseq[i * 3 + 1]);
+ SCRUTE(myseq[i * 3 + 2]);
+ }
+ else
+ {
+ ASSERT(typeSwitch == SALOME_MED::MED_NO_INTERLACE);
+ myseq[i] = node->X();
+ myseq[i + nbNodes] = node->Y();
+ myseq[i + (nbNodes * 2)] = node->Z();
+ SCRUTE(myseq[i]);
+ SCRUTE(myseq[i + nbNodes]);
+ SCRUTE(myseq[i + (nbNodes * 2)]);
+ }
+ i++;
+ }
+ }
+ catch(...)
+ {
+ MESSAGE("Exception en accedant aux coordonnees");
+ THROW_SALOME_CORBA_EXCEPTION("Unable to acces Mesh C++ Object",
+ SALOME::INTERNAL_ERROR);
+ }
+ return myseq._retn();
- if (_mesh_i == 0)
- THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
- SALOME::INTERNAL_ERROR);
- if (entity == SALOME_MED::MED_ALL_ENTITIES)
- THROW_SALOME_CORBA_EXCEPTION("Not implemented for MED_ALL_ENTITIES",
- SALOME::BAD_PARAM);
- if (!_compte)
- calculeNbElts();
- SALOME_MED::medGeometryElement_array_var myseq =
- new SALOME_MED::medGeometryElement_array;
- try
- {
- if (_mapNbTypes.find(entity) == _mapNbTypes.end())
- THROW_SALOME_CORBA_EXCEPTION("No Such Entity in the mesh",
- SALOME::BAD_PARAM);
- int nbTypes = _mapNbTypes[entity];
-
- myseq->length(nbTypes);
-
- if (_mapIndToVectTypes.find(entity) == _mapIndToVectTypes.end())
- THROW_SALOME_CORBA_EXCEPTION("No Such Entity in the mesh",
- SALOME::INTERNAL_ERROR);
-
- int index = _mapIndToVectTypes[entity];
- ASSERT(_TypesId[index].size() != 0);
- int i = 0;
- vector < SALOME_MED::medGeometryElement >::iterator it;
- for (it = _TypesId[index].begin(); it != _TypesId[index].end(); it++)
- {
- myseq[i++] = *it;
- };
- }
- catch(...)
- {
- MESSAGE("Exception en accedant aux differents types");
- THROW_SALOME_CORBA_EXCEPTION("Unable to acces Mesh C++ Object",
- SALOME::INTERNAL_ERROR);
- }
- return myseq._retn();
+ if (_mesh_i == 0)
+ THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
+ SALOME::INTERNAL_ERROR);
+ if (entity == SALOME_MED::MED_ALL_ENTITIES)
+ THROW_SALOME_CORBA_EXCEPTION("Not implemented for MED_ALL_ENTITIES",
+ SALOME::BAD_PARAM);
+ if (!_compte)
+ calculeNbElts();
+ SALOME_MED::medGeometryElement_array_var myseq =
+ new SALOME_MED::medGeometryElement_array;
+ try
+ {
+ if (_mapNbTypes.find(entity) == _mapNbTypes.end())
+ THROW_SALOME_CORBA_EXCEPTION("No Such Entity in the mesh",
+ SALOME::BAD_PARAM);
+ int nbTypes = _mapNbTypes[entity];
+
+ myseq->length(nbTypes);
+
+ if (_mapIndToVectTypes.find(entity) == _mapIndToVectTypes.end())
+ THROW_SALOME_CORBA_EXCEPTION("No Such Entity in the mesh",
+ SALOME::INTERNAL_ERROR);
+
+ int index = _mapIndToVectTypes[entity];
+ ASSERT(_TypesId[index].size() != 0);
+ int i = 0;
+ vector < SALOME_MED::medGeometryElement >::iterator it;
+ for (it = _TypesId[index].begin(); it != _TypesId[index].end(); it++)
+ {
+ myseq[i++] = *it;
+ };
+ }
+ catch(...)
+ {
+ MESSAGE("Exception en accedant aux differents types");
+ THROW_SALOME_CORBA_EXCEPTION("Unable to acces Mesh C++ Object",
+ SALOME::INTERNAL_ERROR);
+ }
+ return myseq._retn();
- if (_mesh_i == 0)
- THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
- SALOME::INTERNAL_ERROR);
- if (mode != SALOME_MED::MED_NODAL)
- THROW_SALOME_CORBA_EXCEPTION("Not Implemented", SALOME::BAD_PARAM);
- if (typeSwitch == SALOME_MED::MED_NO_INTERLACE)
- THROW_SALOME_CORBA_EXCEPTION("Not Yet Implemented", SALOME::BAD_PARAM);
- if (!_compte)
- calculeNbElts();
-
- // Faut-il renvoyer un pointeur vide ???
- if (_mapIndToSeqElts.find(geomElement) != _mapIndToSeqElts.end())
- THROW_SALOME_CORBA_EXCEPTION("No Such Element in the mesh",
- SALOME::BAD_PARAM);
-
- int index = _mapIndToSeqElts[geomElement];
-
- return _seq_elemId[index]._retn();
+ if (_mesh_i == 0)
+ THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
+ SALOME::INTERNAL_ERROR);
+ if (mode != SALOME_MED::MED_NODAL)
+ THROW_SALOME_CORBA_EXCEPTION("Not Implemented", SALOME::BAD_PARAM);
+ /*if (typeSwitch == SALOME_MED::MED_NO_INTERLACE)
+ THROW_SALOME_CORBA_EXCEPTION("Not Yet Implemented", SALOME::BAD_PARAM);*/
+ if (!_compte)
+ calculeNbElts();
+
+ // Faut-il renvoyer un pointeur vide ???
+ if (_mapIndToSeqElts.find(geomElement) != _mapIndToSeqElts.end())
+ THROW_SALOME_CORBA_EXCEPTION("No Such Element in the mesh",
+ SALOME::BAD_PARAM);
+
+ int index = _mapIndToSeqElts[geomElement];
+
+ return _seq_elemId[index]._retn();
- BEGIN_OF("MED_Mesh_i::addInStudy");
- if (_meshId != "")
- {
- MESSAGE("Mesh already in Study");
- THROW_SALOME_CORBA_EXCEPTION("Mesh already in Study",
- SALOME::BAD_PARAM);
- };
-
- /*
- * SALOMEDS::StudyBuilder_var myBuilder = myStudy->NewBuilder();
- *
- * // Create SComponent labelled 'MED' if it doesn't already exit
- * SALOMEDS::SComponent_var medfather = myStudy->FindComponent("MED");
- * if ( CORBA::is_nil(medfather) )
- * {
- * MESSAGE("Add Component MED");
- * medfather = myBuilder->NewComponent("MED");
- * //myBuilder->AddAttribute (medfather,SALOMEDS::Name,"MED");
- * SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(
- * myBuilder->FindOrCreateAttribute(medfather, "AttributeName"));
- * aName->SetValue("MED");
- *
- * myBuilder->DefineComponentInstance(medfather,myIor);
- *
- * } ;
- *
- * MESSAGE("Add a mesh Object under MED");
- * myBuilder->NewCommand();
- * SALOMEDS::SObject_var newObj = myBuilder->NewObject(medfather);
- *
- * ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
- * ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting()) ;
- * CORBA::ORB_var &orb = init(0,0);
- * CORBA::String_var iorStr = orb->object_to_string(myIor);
- * //myBuilder->AddAttribute(newObj,SALOMEDS::IOR,iorStr.in());
- * SALOMEDS::AttributeIOR_var aIOR = SALOMEDS::AttributeIOR::_narrow(
- * myBuilder->FindOrCreateAttribute(newObj, "AttributeIOR"));
- * aIOR->SetValue(iorStr.c_str());
- *
- * //myBuilder->AddAttribute(newObj,SALOMEDS::Name,_mesh_i->getName().c_str());
- * SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(
- * myBuilder->FindOrCreateAttribute(newObj, "AttributeName"));
- * aName->SetValue(_mesh_i->getName().c_str());
- *
- * _meshId = newObj->GetID();
- * myBuilder->CommitCommand();
- *
- */
- END_OF("Mesh_i::addInStudy(SALOMEDS::Study_ptr myStudy)");
+ BEGIN_OF("MED_Mesh_i::addInStudy");
+ if (_meshId != "")
+ {
+ MESSAGE("Mesh already in Study");
+ THROW_SALOME_CORBA_EXCEPTION("Mesh already in Study",
+ SALOME::BAD_PARAM);
+ };
+
+ /*
+ * SALOMEDS::StudyBuilder_var myBuilder = myStudy->NewBuilder();
+ *
+ * // Create SComponent labelled 'MED' if it doesn't already exit
+ * SALOMEDS::SComponent_var medfather = myStudy->FindComponent("MED");
+ * if ( CORBA::is_nil(medfather) )
+ * {
+ * MESSAGE("Add Component MED");
+ * medfather = myBuilder->NewComponent("MED");
+ * //myBuilder->AddAttribute (medfather,SALOMEDS::Name,"MED");
+ * SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(
+ * myBuilder->FindOrCreateAttribute(medfather, "AttributeName"));
+ * aName->SetValue("MED");
+ *
+ * myBuilder->DefineComponentInstance(medfather,myIor);
+ *
+ * } ;
+ *
+ * MESSAGE("Add a mesh Object under MED");
+ * myBuilder->NewCommand();
+ * SALOMEDS::SObject_var newObj = myBuilder->NewObject(medfather);
+ *
+ * ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
+ * ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting()) ;
+ * CORBA::ORB_var &orb = init(0,0);
+ * CORBA::String_var iorStr = orb->object_to_string(myIor);
+ * //myBuilder->AddAttribute(newObj,SALOMEDS::IOR,iorStr.in());
+ * SALOMEDS::AttributeIOR_var aIOR = SALOMEDS::AttributeIOR::_narrow(
+ * myBuilder->FindOrCreateAttribute(newObj, "AttributeIOR"));
+ * aIOR->SetValue(iorStr.c_str());
+ *
+ * //myBuilder->AddAttribute(newObj,SALOMEDS::Name,_mesh_i->getName().c_str());
+ * SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(
+ * myBuilder->FindOrCreateAttribute(newObj, "AttributeName"));
+ * aName->SetValue(_mesh_i->getName().c_str());
+ *
+ * _meshId = newObj->GetID();
+ * myBuilder->CommitCommand();
+ *
+ */
+ END_OF("Mesh_i::addInStudy(SALOMEDS::Study_ptr myStudy)");
- if (!_compte)
- {
- _compte = true;
-
- _mapNbTypes[SALOME_MED::MED_NODE] = 1;
- // On compte les aretes MED_SEG2 ou MED_SEG3
- // On range les elements dans les vecteurs correspondants
-
- _mapIndToSeqElts[SALOME_MED::MED_SEG2] = _indexElts++;
- _mapIndToSeqElts[SALOME_MED::MED_SEG3] = _indexElts++;
- _mapIndToVectTypes[SALOME_MED::MED_EDGE] = _indexEnts++;
-
- int trouveSeg2 = 0;
- int trouveSeg3 = 0;
- SALOME_MED::medGeometryElement medElement;
-
- SMDS_EdgeIteratorPtr itEdges=_meshDS->edgesIterator();
- while(itEdges->more())
- {
- const SMDS_MeshEdge* elem = itEdges->next();
- int nb_of_nodes = elem->NbNodes();
-
- switch (nb_of_nodes)
- {
- case 2:
- {
- medElement = SALOME_MED::MED_SEG2;
- if (trouveSeg2 == 0)
- {
- trouveSeg2 = 1;
- _TypesId[SALOME_MED::MED_EDGE].
- push_back(SALOME_MED::MED_SEG2);
- }
- break;
- }
- case 3:
- {
- medElement = SALOME_MED::MED_SEG3;
- if (trouveSeg3 == 0)
- {
- trouveSeg3 = 1;
- _TypesId[SALOME_MED::MED_EDGE].
- push_back(SALOME_MED::MED_SEG3);
- }
- break;
- }
- }
- int index = _mapIndToSeqElts[medElement];
- SCRUTE(index);
- // Traitement de l arete
-
- int longueur = _seq_elemId[index]->length();
- _seq_elemId[index]->length(longueur + nb_of_nodes);
-
- SMDS_NodeIteratorPtr itn=_meshDS->nodesIterator();
-
- for(int k=0; itn->more(); k++)
- _seq_elemId[index][longueur + k] = itn->next()->GetID()+1;
- }
-
- _mapNbTypes[SALOME_MED::MED_EDGE] = trouveSeg2 + trouveSeg3;
-
- // On compte les faces MED_TRIA3, MED_HEXA8, MED_TRIA6
- // On range les elements dans les vecteurs correspondants
- int trouveTria3 = 0;
- int trouveTria6 = 0;
- int trouveQuad4 = 0;
-
- _mapIndToSeqElts[SALOME_MED::MED_TRIA3] = _indexElts++;
- _mapIndToSeqElts[SALOME_MED::MED_TRIA6] = _indexElts++;
- _mapIndToSeqElts[SALOME_MED::MED_QUAD4] = _indexElts++;
- _mapIndToVectTypes[SALOME_MED::MED_FACE] = _indexEnts++;
-
- SMDS_FaceIteratorPtr itFaces=_meshDS->facesIterator();
- while(itFaces->more())
- {
- const SMDS_MeshFace * elem = itFaces->next();
- int nb_of_nodes = elem->NbNodes();
-
- switch (nb_of_nodes)
- {
- case 3:
- {
- medElement = SALOME_MED::MED_TRIA3;
- if (trouveTria3 == 0)
- {
- trouveTria3 = 1;
- _TypesId[SALOME_MED::MED_FACE].
- push_back(SALOME_MED::MED_TRIA3);
- }
- break;
- }
- case 4:
- {
- medElement = SALOME_MED::MED_QUAD4;
- if (trouveQuad4 == 0)
- {
- trouveQuad4 = 1;
- _TypesId[SALOME_MED::MED_FACE].
- push_back(SALOME_MED::MED_QUAD4);
- }
- break;
- }
- case 6:
- {
- medElement = SALOME_MED::MED_TRIA6;
- if (trouveTria6 == 0)
- {
- trouveTria6 = 1;
- _TypesId[SALOME_MED::MED_FACE].
- push_back(SALOME_MED::MED_TRIA6);
- }
- break;
- }
- }
- int index = _mapIndToSeqElts[medElement];
- SCRUTE(index);
-
- // Traitement de la face
- // Attention La numérotation des noeuds Med commence a 1
-
- int longueur = _seq_elemId[index]->length();
- _seq_elemId[index]->length(longueur + nb_of_nodes);
-
- SMDS_NodeIteratorPtr itn=_meshDS->nodesIterator();
-
- for(int k=0; itn->more(); k++)
- _seq_elemId[index][longueur + k] = itn->next()->GetID()+1;
- } //itFaces
-
- _mapNbTypes[SALOME_MED::MED_FACE] =
- trouveTria3 + trouveTria6 + trouveQuad4;
-
- _mapIndToSeqElts[SALOME_MED::MED_HEXA8] = _indexElts++;
- _mapIndToVectTypes[SALOME_MED::MED_CELL] = _indexEnts++;
- int index = _mapIndToSeqElts[medElement];
-
- int trouveHexa8 = 0;
-
- SMDS_VolumeIteratorPtr itVolumes=_meshDS->volumesIterator();
- while(itVolumes->more())
- {
- const SMDS_MeshVolume * elem = itVolumes->next();
-
- int nb_of_nodes = elem->NbNodes();
- medElement = SALOME_MED::MED_HEXA8;
- ASSERT(nb_of_nodes == 8);
-
- if (trouveHexa8 == 0)
- {
- trouveHexa8 = 1;
- _TypesId[SALOME_MED::MED_CELL].push_back(SALOME_MED::MED_HEXA8);
- };
- // Traitement de la maille
- int longueur = _seq_elemId[index]->length();
- _seq_elemId[index]->length(longueur + nb_of_nodes);
-
- SMDS_NodeIteratorPtr itn=_meshDS->nodesIterator();
- for(int k=0; itn->more(); k++)
- _seq_elemId[index][longueur + k] = itn->next()->GetID()+1;
- }
-
- _mapNbTypes[SALOME_MED::MED_CELL] = trouveHexa8;
- _mapNbTypes[SALOME_MED::MED_ALL_ENTITIES]
- =
- trouveHexa8 + trouveTria3 + trouveTria6 + trouveQuad4 + trouveSeg2 +
- trouveSeg3;
- }// fin du _compte
+ if (!_compte)
+ {
+ _compte = true;
+
+ _mapNbTypes[SALOME_MED::MED_NODE] = 1;
+ // On compte les aretes MED_SEG2 ou MED_SEG3
+ // On range les elements dans les vecteurs correspondants
+
+ _mapIndToSeqElts[SALOME_MED::MED_SEG2] = _indexElts++;
+ _mapIndToSeqElts[SALOME_MED::MED_SEG3] = _indexElts++;
+ _mapIndToVectTypes[SALOME_MED::MED_EDGE] = _indexEnts++;
+
+ int trouveSeg2 = 0;
+ int trouveSeg3 = 0;
+ SALOME_MED::medGeometryElement medElement;
+
+ SMDS_EdgeIteratorPtr itEdges=_meshDS->edgesIterator();
+ while(itEdges->more())
+ {
+ const SMDS_MeshEdge* elem = itEdges->next();
+ int nb_of_nodes = elem->NbNodes();
+
+ switch (nb_of_nodes)
+ {
+ case 2:
+ {
+ medElement = SALOME_MED::MED_SEG2;
+ if (trouveSeg2 == 0)
+ {
+ trouveSeg2 = 1;
+ _TypesId[SALOME_MED::MED_EDGE].
+ push_back(SALOME_MED::MED_SEG2);
+ }
+ break;
+ }
+ case 3:
+ {
+ medElement = SALOME_MED::MED_SEG3;
+ if (trouveSeg3 == 0)
+ {
+ trouveSeg3 = 1;
+ _TypesId[SALOME_MED::MED_EDGE].
+ push_back(SALOME_MED::MED_SEG3);
+ }
+ break;
+ }
+ }
+ int index = _mapIndToSeqElts[medElement];
+ SCRUTE(index);
+ // Traitement de l arete
+
+ int longueur = _seq_elemId[index]->length();
+ _seq_elemId[index]->length(longueur + nb_of_nodes);
+
+ SMDS_NodeIteratorPtr itn=_meshDS->nodesIterator();
+
+ for(int k=0; itn->more(); k++)
+ _seq_elemId[index][longueur + k] = itn->next()->GetID()+1;
+ }
+
+ _mapNbTypes[SALOME_MED::MED_EDGE] = trouveSeg2 + trouveSeg3;
+
+ // On compte les faces MED_TRIA3, MED_HEXA8, MED_TRIA6
+ // On range les elements dans les vecteurs correspondants
+ int trouveTria3 = 0;
+ int trouveTria6 = 0;
+ int trouveQuad4 = 0;
+
+ _mapIndToSeqElts[SALOME_MED::MED_TRIA3] = _indexElts++;
+ _mapIndToSeqElts[SALOME_MED::MED_TRIA6] = _indexElts++;
+ _mapIndToSeqElts[SALOME_MED::MED_QUAD4] = _indexElts++;
+ _mapIndToVectTypes[SALOME_MED::MED_FACE] = _indexEnts++;
+
+ SMDS_FaceIteratorPtr itFaces=_meshDS->facesIterator();
+ while(itFaces->more())
+ {
+ const SMDS_MeshFace * elem = itFaces->next();
+ int nb_of_nodes = elem->NbNodes();
+
+ switch (nb_of_nodes)
+ {
+ case 3:
+ {
+ medElement = SALOME_MED::MED_TRIA3;
+ if (trouveTria3 == 0)
+ {
+ trouveTria3 = 1;
+ _TypesId[SALOME_MED::MED_FACE].
+ push_back(SALOME_MED::MED_TRIA3);
+ }
+ break;
+ }
+ case 4:
+ {
+ medElement = SALOME_MED::MED_QUAD4;
+ if (trouveQuad4 == 0)
+ {
+ trouveQuad4 = 1;
+ _TypesId[SALOME_MED::MED_FACE].
+ push_back(SALOME_MED::MED_QUAD4);
+ }
+ break;
+ }
+ case 6:
+ {
+ medElement = SALOME_MED::MED_TRIA6;
+ if (trouveTria6 == 0)
+ {
+ trouveTria6 = 1;
+ _TypesId[SALOME_MED::MED_FACE].
+ push_back(SALOME_MED::MED_TRIA6);
+ }
+ break;
+ }
+ }
+ int index = _mapIndToSeqElts[medElement];
+ SCRUTE(index);
+
+ // Traitement de la face
+ // Attention La numérotation des noeuds Med commence a 1
+
+ int longueur = _seq_elemId[index]->length();
+ _seq_elemId[index]->length(longueur + nb_of_nodes);
+
+ SMDS_NodeIteratorPtr itn=_meshDS->nodesIterator();
+
+ for(int k=0; itn->more(); k++)
+ _seq_elemId[index][longueur + k] = itn->next()->GetID()+1;
+ } //itFaces
+
+ _mapNbTypes[SALOME_MED::MED_FACE] =
+ trouveTria3 + trouveTria6 + trouveQuad4;
+
+ _mapIndToSeqElts[SALOME_MED::MED_HEXA8] = _indexElts++;
+ _mapIndToVectTypes[SALOME_MED::MED_CELL] = _indexEnts++;
+ int index = _mapIndToSeqElts[medElement];
+
+ int trouveHexa8 = 0;
+
+ SMDS_VolumeIteratorPtr itVolumes=_meshDS->volumesIterator();
+ while(itVolumes->more())
+ {
+ const SMDS_MeshVolume * elem = itVolumes->next();
+
+ int nb_of_nodes = elem->NbNodes();
+ medElement = SALOME_MED::MED_HEXA8;
+ ASSERT(nb_of_nodes == 8);
+
+ if (trouveHexa8 == 0)
+ {
+ trouveHexa8 = 1;
+ _TypesId[SALOME_MED::MED_CELL].push_back(SALOME_MED::MED_HEXA8);
+ };
+ // Traitement de la maille
+ int longueur = _seq_elemId[index]->length();
+ _seq_elemId[index]->length(longueur + nb_of_nodes);
+
+ SMDS_NodeIteratorPtr itn=_meshDS->nodesIterator();
+ for(int k=0; itn->more(); k++)
+ _seq_elemId[index][longueur + k] = itn->next()->GetID()+1;
+ }
+
+ _mapNbTypes[SALOME_MED::MED_CELL] = trouveHexa8;
+ _mapNbTypes[SALOME_MED::MED_ALL_ENTITIES]
+ =
+ trouveHexa8 + trouveTria3 + trouveTria6 + trouveQuad4 + trouveSeg2 +
+ trouveSeg3;
+ }// fin du _compte
- string famDes = ("Je ne sais pas");
- string famName0 = "Famille_";
- string famName;
- char numero[10];
-
- if (_creeFamily == false)
- {
- _creeFamily = true;
- //SMESH_subMesh_i *subMeshServant;
-
- map < int, SMESH_subMesh_i * >::iterator it;
- for (it = _mesh_i->_mapSubMesh_i.begin();
- it != _mesh_i->_mapSubMesh_i.end(); it++)
- {
- SMESH_subMesh_i *submesh_i = (*it).second;
- int famIdent = (*it).first;
-
- ASSERT(famIdent < 999999999);
- sprintf(numero, "%d\n", famIdent);
- famName = famName0 + numero;
-
- SMESH_MEDFamily_i *famservant =
- new SMESH_MEDFamily_i(famIdent, submesh_i,
- famName, famDes, SALOME_MED::MED_NODE);
+ string famDes = ("Je ne sais pas");
+ string famName0 = "Famille_";
+ string famName;
+ char numero[10];
+
+ if (_creeFamily == false)
+ {
+ _creeFamily = true;
+ //SMESH_subMesh_i *subMeshServant;
+
+ map < int, SMESH_subMesh_i * >::iterator it;
+ for (it = _mesh_i->_mapSubMesh_i.begin();
+ it != _mesh_i->_mapSubMesh_i.end(); it++)
+ {
+ SMESH_subMesh_i *submesh_i = (*it).second;
+ int famIdent = (*it).first;
+
+ ASSERT(famIdent < 999999999);
+ sprintf(numero, "%d\n", famIdent);
+ famName = famName0 + numero;
+
+ SMESH_MEDFamily_i *famservant =
+ new SMESH_MEDFamily_i(famIdent, submesh_i,
+ famName, famDes, SALOME_MED::MED_NODE);