MSG(MYDEBUG,"VISU_MedConvertor::Build()");
INITMSG(MYDEBUG,"GetNbMeshes() = "<<aNbMeshes<<"\n");
- for(TInt iMesh = 1; iMesh <= aNbMeshes; iMesh++)
- try{
+ for (TInt iMesh = 1; iMesh <= aNbMeshes; iMesh++) {
+ try {
PMeshInfo aMeshInfo = aMed->GetPMeshInfo(iMesh);
PNodeInfo aNodeInfo = aMed->GetPNodeInfo(aMeshInfo);
TInt aNbComp = aFieldInfo->GetNbComp();
const string& aFieldName = aFieldInfo->GetName();
+ MED::TErr anErr;
MED::TGeom aTGeom;
EEntiteMaillage aMEntity;
- TInt aNbTimeStamps = aMed->GetNbTimeStamps(aFieldInfo,aEntityInfo,aMEntity,aTGeom);
- if (aNbTimeStamps<1)
+ TInt aNbTimeStamps = aMed->GetNbTimeStamps(aFieldInfo,aEntityInfo,aMEntity,aTGeom,&anErr);
+ if (anErr < 0 || aNbTimeStamps < 1)
continue;
+
TEntity aVEntity = MEDEntityToVTK(aMEntity);
VISU::PMeshOnEntity aMeshOnEntity = aMesh->myMeshOnEntityMap[aVEntity];
TFieldMap& aFieldMap = aMeshOnEntity->myFieldMap;
PTimeStampInfo aTimeStamp = aMed->GetPTimeStampInfo(aFieldInfo,
aMEntity,
aTGeom,
- iTimeStamp);
+ iTimeStamp,
+ &anErr);
+ if (anErr < 0)
+ continue;
+
TFloat aDt = aTimeStamp->GetDt();
const string& anUnitDt = aTimeStamp->GetUnitDt();
- PTimeStampVal aTimeStampVal = aMed->GetPTimeStampVal(aTimeStamp);
+ PTimeStampVal aTimeStampVal = aMed->GetPTimeStampVal(aTimeStamp,&anErr);
TValField& aValField = aField->myValField;
PMEDValForTime aValForTime = aValField[iTimeStamp](new TMEDValForTime());
aValForTime->myId = iTimeStamp;
} catch(...){
EXCEPTION(runtime_error,"Unknown exception !!!");
}
+ }
return this;
}