mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 18:30:35 +05:00
Mantis issue 0020483: EDF 1117 SMESH,VISU: Mesh with descending connectivity is badly read by SMESH and VISU
This commit is contained in:
parent
097db70a03
commit
2e3f1dc0ff
@ -228,6 +228,7 @@ module SMESH
|
|||||||
DRS_WARN_RENUMBER, // a MED file has overlapped ranges of element numbers,
|
DRS_WARN_RENUMBER, // a MED file has overlapped ranges of element numbers,
|
||||||
// so the numbers from the file are ignored
|
// so the numbers from the file are ignored
|
||||||
DRS_WARN_SKIP_ELEM, // some elements were skipped due to incorrect file data
|
DRS_WARN_SKIP_ELEM, // some elements were skipped due to incorrect file data
|
||||||
|
DRS_WARN_DESCENDING, // some elements were skipped due to descending connectivity
|
||||||
DRS_FAIL // general failure (exception etc.)
|
DRS_FAIL // general failure (exception etc.)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -54,6 +54,7 @@ class MESHDRIVER_EXPORT Driver_Mesh
|
|||||||
DRS_WARN_RENUMBER, // a file has overlapped ranges of element numbers,
|
DRS_WARN_RENUMBER, // a file has overlapped ranges of element numbers,
|
||||||
// so the numbers from the file are ignored
|
// so the numbers from the file are ignored
|
||||||
DRS_WARN_SKIP_ELEM, // some elements were skipped due to incorrect file data
|
DRS_WARN_SKIP_ELEM, // some elements were skipped due to incorrect file data
|
||||||
|
DRS_WARN_DESCENDING, // some elements were skipped due to descending connectivity
|
||||||
DRS_FAIL // general failure (exception etc.)
|
DRS_FAIL // general failure (exception etc.)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -71,6 +71,7 @@ DriverMED_R_SMESHDS_Mesh
|
|||||||
::Perform()
|
::Perform()
|
||||||
{
|
{
|
||||||
Status aResult = DRS_FAIL;
|
Status aResult = DRS_FAIL;
|
||||||
|
bool isDescConn = false;
|
||||||
#ifndef _DEXCEPT_
|
#ifndef _DEXCEPT_
|
||||||
try{
|
try{
|
||||||
#endif
|
#endif
|
||||||
@ -173,15 +174,26 @@ DriverMED_R_SMESHDS_Mesh
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Are there any MED cells in descending connectivity
|
||||||
|
//---------------------------------------------------
|
||||||
|
if (!isDescConn) {
|
||||||
|
MED::TEntityInfo aEntityInfoDesc = aMed->GetEntityInfo(aMeshInfo, eDESC);
|
||||||
|
MED::TEntityInfo::iterator anEntityIterDesc = aEntityInfoDesc.begin();
|
||||||
|
for (; anEntityIterDesc != aEntityInfoDesc.end() && !isDescConn; anEntityIterDesc++) {
|
||||||
|
const EEntiteMaillage& anEntity = anEntityIterDesc->first;
|
||||||
|
if (anEntity != eNOEUD) isDescConn = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Reading pre information about all MED cells
|
// Reading pre information about all MED cells
|
||||||
//--------------------------------------------
|
//--------------------------------------------
|
||||||
typedef MED::TVector<int> TNodeIds;
|
typedef MED::TVector<int> TNodeIds;
|
||||||
bool takeNumbers = true; // initially we trust the numbers from file
|
bool takeNumbers = true; // initially we trust the numbers from file
|
||||||
MED::TEntityInfo aEntityInfo = aMed->GetEntityInfo(aMeshInfo);
|
MED::TEntityInfo aEntityInfo = aMed->GetEntityInfo(aMeshInfo, eNOD);
|
||||||
MED::TEntityInfo::iterator anEntityIter = aEntityInfo.begin();
|
MED::TEntityInfo::iterator anEntityIter = aEntityInfo.begin();
|
||||||
for(; anEntityIter != aEntityInfo.end(); anEntityIter++){
|
for (; anEntityIter != aEntityInfo.end(); anEntityIter++) {
|
||||||
const EEntiteMaillage& anEntity = anEntityIter->first;
|
const EEntiteMaillage& anEntity = anEntityIter->first;
|
||||||
if(anEntity == eNOEUD) continue;
|
if (anEntity == eNOEUD) continue;
|
||||||
// Reading MED cells to the corresponding SMDS structure
|
// Reading MED cells to the corresponding SMDS structure
|
||||||
//------------------------------------------------------
|
//------------------------------------------------------
|
||||||
const MED::TGeom2Size& aGeom2Size = anEntityIter->second;
|
const MED::TGeom2Size& aGeom2Size = anEntityIter->second;
|
||||||
@ -905,6 +917,12 @@ DriverMED_R_SMESHDS_Mesh
|
|||||||
#endif
|
#endif
|
||||||
if (myMesh)
|
if (myMesh)
|
||||||
myMesh->compactMesh();
|
myMesh->compactMesh();
|
||||||
|
|
||||||
|
if (aResult == DRS_OK && isDescConn) {
|
||||||
|
INFOS("There are some elements in descending connectivity in med file. They were not read !!!");
|
||||||
|
aResult = DRS_WARN_DESCENDING;
|
||||||
|
}
|
||||||
|
|
||||||
if(MYDEBUG) MESSAGE("Perform - aResult status = "<<aResult);
|
if(MYDEBUG) MESSAGE("Perform - aResult status = "<<aResult);
|
||||||
return aResult;
|
return aResult;
|
||||||
}
|
}
|
||||||
|
@ -1478,6 +1478,10 @@ so that the application may crash. Do you wish to continue visualization?</trans
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SMESH_DRS_4</source>
|
<source>SMESH_DRS_4</source>
|
||||||
|
<translation type="unfinished">MED file contains some elements in descending connectivity. They were not read.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_DRS_5</source>
|
||||||
<translation>The file is incorrect, some data is missed</translation>
|
<translation>The file is incorrect, some data is missed</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -1450,6 +1450,10 @@ ce qui peut faire planter l'application. Voulez-vous continuer la visualisa
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>SMESH_DRS_4</source>
|
<source>SMESH_DRS_4</source>
|
||||||
|
<translation type="unfinished">MED file contains some elements in descending connectivity. They were not read.</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>SMESH_DRS_5</source>
|
||||||
<translation>Le fichier n'est pas correct, des données sont manquantes</translation>
|
<translation>Le fichier n'est pas correct, des données sont manquantes</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -320,6 +320,8 @@ static SMESH::DriverMED_ReadStatus ConvertDriverMEDReadStatus (int theStatus)
|
|||||||
res = SMESH::DRS_WARN_RENUMBER; break;
|
res = SMESH::DRS_WARN_RENUMBER; break;
|
||||||
case DriverMED_R_SMESHDS_Mesh::DRS_WARN_SKIP_ELEM:
|
case DriverMED_R_SMESHDS_Mesh::DRS_WARN_SKIP_ELEM:
|
||||||
res = SMESH::DRS_WARN_SKIP_ELEM; break;
|
res = SMESH::DRS_WARN_SKIP_ELEM; break;
|
||||||
|
case DriverMED_R_SMESHDS_Mesh::DRS_WARN_DESCENDING:
|
||||||
|
res = SMESH::DRS_WARN_DESCENDING; break;
|
||||||
case DriverMED_R_SMESHDS_Mesh::DRS_FAIL:
|
case DriverMED_R_SMESHDS_Mesh::DRS_FAIL:
|
||||||
default:
|
default:
|
||||||
res = SMESH::DRS_FAIL; break;
|
res = SMESH::DRS_FAIL; break;
|
||||||
|
Loading…
Reference in New Issue
Block a user