From 9981337c1343609008a76af274be88e7850ceb86 Mon Sep 17 00:00:00 2001 From: apo Date: Mon, 29 Aug 2005 14:07:50 +0000 Subject: [PATCH] Minor changes --- src/CONVERTOR/VISU_MedConvertor.cxx | 28 +++++++++++++++++++++------- src/VISU_I/VISU_GaussPoints_i.cc | 16 +++++++++++++--- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/src/CONVERTOR/VISU_MedConvertor.cxx b/src/CONVERTOR/VISU_MedConvertor.cxx index 633fd38d..d66a8df2 100644 --- a/src/CONVERTOR/VISU_MedConvertor.cxx +++ b/src/CONVERTOR/VISU_MedConvertor.cxx @@ -677,7 +677,7 @@ namespace BuildGroupMap(PMEDMesh theMesh, const MED::TFamilyInfoSet& theFamilyInfoSet) { - INITMSG(MY_GROUP_DEBUG,"BuildGroupMap:\n"); + INITMSG(MYDEBUG,"BuildGroupMap:\n"); TGroupMap& aGroupMap = theMesh->myGroupMap; MED::TGroupInfo aGroupInfo = MED::GetGroupInfo(theFamilyInfoSet); MED::TGroupInfo::const_iterator aGroupInfoIter = aGroupInfo.begin(); @@ -1443,13 +1443,13 @@ LoadValForTime(const MED::PWrapper& theMed, VISU::PMEDMeshOnEntity theMeshOnEntity, VISU::PMEDField theField, VISU::PMEDValForTime theValForTime, - bool theIsGauss) + bool theIsGauss, + bool& theIsDone) { INITMSG(MYDEBUG,"LoadValForTime - theIsGauss = "<myMeshSource; - if(aMeshSource.myIsDone) + if(theIsDone) return 0; //Main part of code @@ -1549,7 +1549,7 @@ LoadValForTime(const MED::PWrapper& theMed, } } - aMeshSource.myIsDone = true; + theIsDone = true; return 1; } @@ -1564,7 +1564,14 @@ VISU_MedConvertor VISU::PMEDField theField, VISU::PMEDValForTime theValForTime) { - return LoadValForTime(theMed,theMesh,theMeshOnEntity,theField,theValForTime,false); + TSource& aMeshSource = theValForTime->myMeshSource; + return LoadValForTime(theMed, + theMesh, + theMeshOnEntity, + theField, + theValForTime, + false, + aMeshSource.myIsDone); } @@ -1577,5 +1584,12 @@ VISU_MedConvertor VISU::PMEDField theField, VISU::PMEDValForTime theValForTime) { - return LoadValForTime(theMed,theMesh,theMeshOnEntity,theField,theValForTime,true); + TSource& aGaussPtsSource = theValForTime->myGaussPtsSource; + return LoadValForTime(theMed, + theMesh, + theMeshOnEntity, + theField, + theValForTime, + true, + aGaussPtsSource.myIsDone); } diff --git a/src/VISU_I/VISU_GaussPoints_i.cc b/src/VISU_I/VISU_GaussPoints_i.cc index 9271eabd..f2eae4f6 100644 --- a/src/VISU_I/VISU_GaussPoints_i.cc +++ b/src/VISU_I/VISU_GaussPoints_i.cc @@ -26,6 +26,7 @@ #include "VISU_GaussPoints_i.hh" #include "VISU_GaussPointsPL.hxx" +#include "VISU_GaussPtsAct.h" #include "VISU_Result_i.hh" using namespace VISU; @@ -43,7 +44,7 @@ VISU::GaussPoints_i const char* theFieldName, int theIteration, int isMemoryCheck) { try{ - if(theEntity != VISU::NODE) + if(theEntity != VISU::NODE_ENTITY) return VISU::ScalarMap_i::IsPossible(theResult,theMeshName,theEntity,theFieldName,theIteration,isMemoryCheck); else return false; @@ -135,8 +136,10 @@ VISU::GaussPoints_i myField = theResult->GetInput()->GetField(myMeshName,myEntity,myFieldName); if(myField == NULL) throw std::runtime_error("There is no Field with the parameters !!!"); - VISU_Convertor::TOutput *anOutput = + + VISU_Convertor::TOutput *anOutput = theResult->GetInput()->GetTimeStampOnGaussPts(myMeshName,myEntity,myFieldName,myIteration); + if(anOutput == NULL) throw std::runtime_error("There is no TimeStamp with the parameters !!!"); myScalarMapPL->SetInput(anOutput); @@ -160,7 +163,14 @@ VISU_Actor* VISU::GaussPoints_i ::CreateActor(const Handle(SALOME_InteractiveObject)& theIO) { - VISU_Actor* anActor = VISU::ScalarMap_i::CreateActor(theIO); + VISU_GaussPtsAct* anActor = VISU_GaussPtsAct::New(); + try{ + VISU::Prs3d_i::CreateActor(anActor,theIO); + UpdateActor(anActor); + }catch(...){ + anActor->Delete(); + throw ; + } return anActor; } -- 2.39.2