/****************************************************************************
* NOMBRES D'OBJETS *
****************************************************************************/
- fprintf(stdout, "\n(****************************)\n");
- fprintf(stdout, "(* INFORMATIONS GENERALES : *)\n");
- fprintf(stdout, "(****************************)\n");
/* Combien de noeuds ? */
nbNodes = myMesh->NbNodes();
/****************************************************************************
* ECRITURE DES NOEUDS *
****************************************************************************/
- fprintf(stdout, "\n(************************)\n");
- fprintf(stdout, "(* NOEUDS DU MAILLAGE : *)\n");
- fprintf(stdout, "(************************)\n");
SMDS_NodeIteratorPtr itNodes=myMesh->nodesIterator();
while(itNodes->more()){
/****************************************************************************
* ECRITURE DES ELEMENTS *
****************************************************************************/
- fprintf(stdout, "\n(**************************)\n");
- fprintf(stdout, "(* ELEMENTS DU MAILLAGE : *)\n");
- fprintf(stdout, "(**************************)");
/* Ecriture des connectivites, noms, numeros des mailles */
SMDS_EdgeIteratorPtr itEdges=myMesh->edgesIterator();
SMDS_FaceIteratorPtr itFaces=myMesh->facesIterator();
while(itFaces->more()){
const SMDS_MeshElement * elem = itFaces->next();
- switch (elem->NbNodes()) {
- case 3:
- fprintf(aFileId, "%d %d ", elem->GetID(), 203);
- break;
- case 4:
- fprintf(aFileId, "%d %d ", elem->GetID(), 204);
- break;
- case 6:
- fprintf(aFileId, "%d %d ", elem->GetID(), 206);
- break;
- }
+ if ( elem->IsPoly() )
+ fprintf(aFileId, "%d %d ", elem->GetID(), 400+elem->NbNodes());
+ else
+ fprintf(aFileId, "%d %d ", elem->GetID(), 200+elem->NbNodes());
SMDS_ElemIteratorPtr it=elem->nodesIterator();
while(it->more())
fprintf(aFileId, "%d ", it->next()->GetID());
SMDS_VolumeIteratorPtr itVolumes=myMesh->volumesIterator();
while(itVolumes->more()){
const SMDS_MeshElement * elem = itVolumes->next();
- switch (elem->NbNodes()) {
- case 8:
- fprintf(aFileId, "%d %d ", elem->GetID(), 308);
- break;
- }
-
+ if ( elem->IsPoly() )
+ fprintf(aFileId, "%d %d ", elem->GetID(), 500+elem->NbNodes());
+ else
+ fprintf(aFileId, "%d %d ", elem->GetID(), 300+elem->NbNodes());
SMDS_ElemIteratorPtr it=elem->nodesIterator();
while(it->more())
fprintf(aFileId, "%d ", it->next()->GetID());