From: apo Date: Mon, 23 Jan 2006 11:36:22 +0000 (+0000) Subject: Fix for Bug GVIEW10317 X-Git-Tag: mergeto_trunk_07Feb06~32 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=de53a41ff91da27aa2ce572ea816cf636ec920d4;p=modules%2Fvisu.git Fix for Bug GVIEW10317 Incorrect reading of "maill.3.med" file in Post-Pro module. --- diff --git a/src/CONVERTOR/VISU_Convertor_impl.cxx b/src/CONVERTOR/VISU_Convertor_impl.cxx index 85032edf..4564df60 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.cxx +++ b/src/CONVERTOR/VISU_Convertor_impl.cxx @@ -1313,13 +1313,14 @@ namespace void GetTimeStampOnProfile(const TVTKSource& theSource, const PFieldImpl& theField, - const PValForTimeImpl& theValForTime) + const PValForTimeImpl& theValForTime, + const VISU::TEntity& theEntity) { int aNbTuples = theField->myDataSize/theField->myNbComp; std::string aFieldName = GenerateFieldName(theField,theValForTime); vtkDataSetAttributes* aDataSetAttributes; - switch(theField->myEntity){ + switch(theEntity){ case VISU::NODE_ENTITY : aDataSetAttributes = theSource->GetPointData(); break; @@ -1492,6 +1493,8 @@ namespace const PMeshOnEntityImpl& theMeshOnEntity, const PProfileImpl& theProfile) { + INITMSG(MYDEBUG,"GetMeshOnProfile - anEntity = "<myEntity<myIsVTKDone) return; @@ -2068,6 +2071,29 @@ VISU_Convertor_impl } +//--------------------------------------------------------------- +VISU::TVTKOutput* +VISU_Convertor_impl +::GetTimeStampOnProfile(const VISU::PMeshImpl& theMesh, + const VISU::PMeshOnEntityImpl& theMeshOnEntity, + const VISU::PFieldImpl& theField, + const VISU::PValForTimeImpl& theValForTime, + const VISU::PIDMapperFilter& theIDMapperFilter, + 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); + return anOutput; +} + + //--------------------------------------------------------------- VISU::PIDMapper VISU_Convertor_impl @@ -2103,26 +2129,26 @@ VISU_Convertor_impl if(!anIDMapperFilter->myIsVTKDone){ LoadValForTimeOnMesh(aMesh,aMeshOnEntity,aField,aValForTime); + TVTKOutput* anOutput; try{ - LoadMeshOnEntity(aMesh,aVTKMeshOnEntity); + anOutput = GetTimeStampOnProfile(aMesh, + aVTKMeshOnEntity, + aField, + aValForTime, + anIDMapperFilter, + aValForTime->myProfile, + aMeshOnEntity->myEntity); }catch(std::exception& exc){ - aVTKMeshOnEntity = aMeshOnEntity; MSG(MYDEBUG,"Follow exception was occured :\n"<myProfile, + aVTKMeshOnEntity->myEntity); } - GetMeshOnEntity(aVTKMeshOnEntity->myMeshName,aVTKMeshOnEntity->myEntity); - - PProfileImpl aProfile = aValForTime->myProfile; - GetMeshOnProfile(aMesh,aVTKMeshOnEntity,aProfile); - - anIDMapperFilter->myIDMapper = aProfile; - TVTKOutput* anOutput = anIDMapperFilter->GetVTKOutput(); - const TVTKSource& aSource = anIDMapperFilter->mySource.GetSource(); - GetTimeStampOnProfile(aSource,aField,aValForTime); - anIDMapperFilter->myIsVTKDone = true; if(MYDEBUGWITHFILES){ diff --git a/src/CONVERTOR/VISU_Convertor_impl.hxx b/src/CONVERTOR/VISU_Convertor_impl.hxx index 18e494cf..c4efc7d2 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.hxx +++ b/src/CONVERTOR/VISU_Convertor_impl.hxx @@ -945,6 +945,15 @@ protected: const VISU::TEntity& theEntity, const std::string& theFieldName, int theStampsNum); + + VISU::TVTKOutput* + GetTimeStampOnProfile(const VISU::PMeshImpl& theMesh, + const VISU::PMeshOnEntityImpl& theMeshOnEntity, + const VISU::PFieldImpl& theField, + const VISU::PValForTimeImpl& theValForTime, + const VISU::PIDMapperFilter& theIDMapperFilter, + const VISU::PProfileImpl& theProfile, + const VISU::TEntity& theEntity); protected: //! To fill intermeiate representation of TMeshOnEntity from a MED source