//---------------------------------------------------------------
- void
+ bool
GetMeshOnProfile(const PMeshImpl& theMesh,
const PMeshOnEntityImpl& theMeshOnEntity,
const PProfileImpl& theProfile)
{
INITMSG(MYDEBUG,"GetMeshOnProfile - anEntity = "<<theMeshOnEntity->myEntity<<endl);
+ if(theProfile->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));
}
}
anAppendFilter->Update(); // Fix on VTK
+ theProfile->myMeshOnEntity = theMeshOnEntity.get();
theProfile->myNamedPointCoords = theMesh->myNamedPointCoords;
theProfile->myIsVTKDone = true;
+ return true;
}
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"<<exc.what());
+ return NULL;
+ }
return anOutput;
}
if(!anIDMapperFilter->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"<<exc.what());
+ TVTKOutput* anOutput = GetTimeStampOnProfile(aMesh,
+ aVTKMeshOnEntity,
+ aField,
+ aValForTime,
+ anIDMapperFilter,
+ aValForTime->myProfile,
+ aMeshOnEntity->myEntity);
+ if(!anOutput)
anOutput = GetTimeStampOnProfile(aMesh,
aMeshOnEntity,
aField,
anIDMapperFilter,
aValForTime->myProfile,
aVTKMeshOnEntity->myEntity);
- }
anIDMapperFilter->myIsVTKDone = true;