From: yfr Date: Wed, 8 Oct 2003 14:49:59 +0000 (+0000) Subject: yfr : Integration of patch from EDF about optional indexes of nodes X-Git-Tag: V1_3_0_b1~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bf347ed680f9dde2d6c01edae356d0ee474d01ea;p=modules%2Fvisu.git yfr : Integration of patch from EDF about optional indexes of nodes --- diff --git a/src/VISU_I/VISU_MedConvertor.cxx b/src/VISU_I/VISU_MedConvertor.cxx index 2c277742..8827884b 100644 --- a/src/VISU_I/VISU_MedConvertor.cxx +++ b/src/VISU_I/VISU_MedConvertor.cxx @@ -490,10 +490,12 @@ int VISU_MedConvertor::LoadCellsOnEntity(const med_idt& fid, VISU::TMeshOnEntity if(isCellsLoaded) if(!isFamilyPresent) return 0; else if(!aFamily.mySubMesh.empty()) return 0; + if(MYDEBUG) { MESSAGE("LoadCellsOnEntity - theFamilyName = '"< 0) { + med_booleen iname_elem, inum_elem; valarray num_elem(iNumElemEnd), num_fam_elem(iNumElemEnd); valarray name_elem('\0',iNumElemEnd*MED_TAILLE_PNOM+1); @@ -522,20 +528,49 @@ int VISU_MedConvertor::LoadCellsOnEntity(const med_idt& fid, VISU::TMeshOnEntity if(MYDEBUG) MESSAGE("LoadCellsOnEntity - medName = "<> MEDelementsLire(...)"); if(!isCellsLoaded){ VISU::TMeshOnEntity::TConnForCellType& aConnForCellType = theMeshOnEntity.myCellsConn[aVtkType]; aConnForCellType.resize(iNumElemEnd); valarray aConnect(nbMedNodes); + + // Parcours des mailles for (int iNumElem = 0; iNumElem < iNumElemEnd; iNumElem++) { VISU::TMeshOnEntity::TConnect& anArray = aConnForCellType[iNumElem]; anArray.resize(nbVtkNodes); - for (int k = 0, kj = iNumElem*aNbConnForElem; k < nbMedNodes; k++) { - aConnect[k] = conn[kj+k] - 1; - } + + // MODIF 24/09/03 E.F. et Je.R. + if ( optionnalNumbers ) + for (int k = 0, kj = iNumElem*aNbConnForElem; k < nbMedNodes; k++) { + aConnect[k] = optionnalToCanonicNodesNumbers[conn[kj+k]] - 1; + } + else + for (int k = 0, kj = iNumElem*aNbConnForElem; k < nbMedNodes; k++) { + aConnect[k] = conn[kj+k] - 1; + }; + // END MODIF + switch(aMedType){ case MED_TETRA4 : case MED_TETRA10 :