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;
}
if(Result_i* pResult = dynamic_cast<Result_i*>(GetServant(theResult).in())){
if(TPrs3d_i::IsPossible(pResult,theMeshName,theEntity,theFieldName,int(theIteration))){
aPresent = new TPrs3d_i(pResult,theAddToStudy);
- if(aPresent->Create(theMeshName,theEntity,theFieldName,int(theIteration)) == NULL)
+ if(aPresent->Create(theMeshName,theEntity,theFieldName,int(theIteration)) == NULL){
aPresent->_remove_ref();
+ aPresent = NULL;
+ }
}
}
return aPresent;