From: apo Date: Fri, 20 Oct 2006 06:52:31 +0000 (+0000) Subject: Fix for Bug IPAL13642 X-Git-Tag: V3_2_3pre1~19 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7030fabf94b79026dc1096f059bef8d0483a80ba;p=modules%2Fvisu.git Fix for Bug IPAL13642 Incorrect visualization of time stamp on field built on profile. Additional check that verifies whether it is possible to build the presentation on the Entity or not is introduced. --- diff --git a/src/CONVERTOR/VISU_Convertor_impl.cxx b/src/CONVERTOR/VISU_Convertor_impl.cxx index c39f28fe..4ce5600e 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.cxx +++ b/src/CONVERTOR/VISU_Convertor_impl.cxx @@ -1485,17 +1485,19 @@ namespace //--------------------------------------------------------------- - void + bool GetMeshOnProfile(const PMeshImpl& theMesh, const PMeshOnEntityImpl& theMeshOnEntity, const PProfileImpl& theProfile) { INITMSG(MYDEBUG,"GetMeshOnProfile - anEntity = "<myEntity<myMeshOnEntity && theProfile->myMeshOnEntity != theMeshOnEntity.get()) + return false; + if(theProfile->myIsVTKDone) - return; - - theProfile->myMeshOnEntity = theMeshOnEntity.get(); + return true; + const TVTKAppendFilter& anAppendFilter = theProfile->GetFilter(); anAppendFilter->SetPoints(GetPoints(theMesh)); @@ -1533,9 +1535,11 @@ namespace } } anAppendFilter->Update(); // Fix on VTK + theProfile->myMeshOnEntity = theMeshOnEntity.get(); theProfile->myNamedPointCoords = theMesh->myNamedPointCoords; theProfile->myIsVTKDone = true; + return true; } @@ -2073,15 +2077,20 @@ VISU_Convertor_impl const VISU::PProfileImpl& theProfile, const VISU::TEntity& theEntity) { - LoadMeshOnEntity(theMesh,theMeshOnEntity); - GetMeshOnEntity(theMeshOnEntity->myMeshName,theMeshOnEntity->myEntity); - GetMeshOnProfile(theMesh,theMeshOnEntity,theProfile); - - theIDMapperFilter->myIDMapper = theProfile; - TVTKOutput* anOutput = theIDMapperFilter->GetVTKOutput(); - const TVTKSource& aSource = theIDMapperFilter->mySource.GetSource(); - ::GetTimeStampOnProfile(aSource,theField,theValForTime,theEntity); - + TVTKOutput* anOutput = NULL; + try{ + LoadMeshOnEntity(theMesh,theMeshOnEntity); + GetMeshOnEntity(theMeshOnEntity->myMeshName,theMeshOnEntity->myEntity); + if(GetMeshOnProfile(theMesh,theMeshOnEntity,theProfile)){ + theIDMapperFilter->myIDMapper = theProfile; + anOutput = theIDMapperFilter->GetVTKOutput(); + const TVTKSource& aSource = theIDMapperFilter->mySource.GetSource(); + ::GetTimeStampOnProfile(aSource,theField,theValForTime,theEntity); + } + }catch(std::exception& exc){ + MSG(MYDEBUG,"Follow exception was occured :\n"<myIsVTKDone){ LoadValForTimeOnMesh(aMesh,aMeshOnEntity,aField,aValForTime); - TVTKOutput* anOutput; - try{ - anOutput = GetTimeStampOnProfile(aMesh, - aVTKMeshOnEntity, - aField, - aValForTime, - anIDMapperFilter, - aValForTime->myProfile, - aMeshOnEntity->myEntity); - }catch(std::exception& exc){ - MSG(MYDEBUG,"Follow exception was occured :\n"<myProfile, + aMeshOnEntity->myEntity); + if(!anOutput) anOutput = GetTimeStampOnProfile(aMesh, aMeshOnEntity, aField, @@ -2139,7 +2145,6 @@ VISU_Convertor_impl anIDMapperFilter, aValForTime->myProfile, aVTKMeshOnEntity->myEntity); - } anIDMapperFilter->myIsVTKDone = true;