]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Minor changes
authorapo <apo@opencascade.com>
Mon, 29 Aug 2005 14:07:50 +0000 (14:07 +0000)
committerapo <apo@opencascade.com>
Mon, 29 Aug 2005 14:07:50 +0000 (14:07 +0000)
src/CONVERTOR/VISU_MedConvertor.cxx
src/VISU_I/VISU_GaussPoints_i.cc

index 633fd38d724c9ce187190fb287552b82a2421335..d66a8df2dd7ad245fe2ceec5c8321f3f7a6a31eb 100644 (file)
@@ -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 = "<<theIsGauss<<endl);
 
   //Check on loading already done
-  TSource& aMeshSource = theValForTime->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);
 }
index 9271eabdf3a92e957874d38256abdf77df3a7838..f2eae4f6d160ade8e4adec30fb5d7b26d144d3bc 100644 (file)
@@ -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;
 }