Salome HOME
Update Help for VISU module.
[modules/visu.git] / src / VISU_I / VISU_DeformedShape_i.cc
index b53ec71274d4ec582cf12d0b0389b4cbe259dc43..1198ad2d3d31b797a08d9d0136589fdc4eedb4db 100644 (file)
 #include "VISU_DeformedShape_i.hh"
 #include "VISU_ScalarMapAct.h"
 
+#include <vtkDataSetMapper.h>
+
 using namespace VISU;
 using namespace std;
 
 #ifdef _DEBUG_
 static int MYDEBUG = 0;
-static int MYDEBUGWITHFILES = 0;
 #else
 static int MYDEBUG = 0;
-static int MYDEBUGWITHFILES = 0;
 #endif
 
 int VISU::DeformedShape_i::IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity, 
@@ -45,12 +45,12 @@ int VISU::DeformedShape_i::IsPossible(Result_i* theResult, const char* theMeshNa
 {
   try{
     if(!VISU::ScalarMap_i::IsPossible(theResult,theMeshName,theEntity,theFieldName,theIteration,isMemoryCheck)) return 0;
-    const VISU::TField& aField = theResult->GetInput()->GetField(theMeshName,(VISU::TEntity)theEntity,theFieldName);
-    return aField.myNbComp > 1;
-  }catch(std::runtime_error& exc){
-    INFOS("Follow exception was accured :\n"<<exc.what());
+    const VISU::PField aField = theResult->GetInput()->GetField(theMeshName,(VISU::TEntity)theEntity,theFieldName);
+    return aField->myNbComp > 1;
+  }catch(std::exception& exc){
+    INFOS("Follow exception was occured :\n"<<exc.what());
   }catch(...){
-    INFOS("Unknown exception was accured!");
+    INFOS("Unknown exception was occured!");
   }
   return 0;
 }
@@ -62,16 +62,29 @@ const string VISU::DeformedShape_i::myComment = "DEFORMEDSHAPE";
 const char* VISU::DeformedShape_i::GetComment() const { return myComment.c_str();}
 
 
-VISU::DeformedShape_i::DeformedShape_i(Result_i* theResult, bool theAddToStudy, SALOMEDS::SObject_ptr theSObject) : 
-       PrsObject_i(theResult->GetStudyDocument()), 
-       Prs3d_i(theResult,theSObject),
-       ScalarMap_i(theResult,theAddToStudy,theSObject)
+VISU::DeformedShape_i::
+DeformedShape_i(Result_i* theResult, 
+               bool theAddToStudy) : 
+  PrsObject_i(theResult->GetStudyDocument()), 
+  Prs3d_i(theResult,theAddToStudy),
+  ScalarMap_i(theResult,theAddToStudy),
+  myDeformedShapePL(NULL)
 {
   if(MYDEBUG) MESSAGE("DeformedShape_i::DeformedShape_i");
-  myDeformedShapePL = NULL;
 }
 
 
+VISU::DeformedShape_i::
+DeformedShape_i(Result_i* theResult, 
+               SALOMEDS::SObject_ptr theSObject) : 
+  PrsObject_i(theResult->GetStudyDocument()), 
+  Prs3d_i(theResult,theSObject),
+  ScalarMap_i(theResult,theSObject),
+  myDeformedShapePL(NULL)
+{
+  if(MYDEBUG) MESSAGE("DeformedShape_i::DeformedShape_i");
+}
+
 
 void VISU::DeformedShape_i::SameAs(const DeformedShape_i* theOrigin)
 {
@@ -93,7 +106,6 @@ VISU::Storable* VISU::DeformedShape_i::Create(const char* theMeshName, VISU::Ent
 
 
 VISU::Storable* VISU::DeformedShape_i::Restore(const Storable::TRestoringMap& theMap)
-     throw(std::logic_error&)
 {
   DoHook();
   SetScale(VISU::Storable::FindValue(theMap,"myFactor").toDouble());
@@ -146,7 +158,6 @@ void VISU::DeformedShape_i::SetMapScale(double theMapScale){
 
 
 VISU_Actor* VISU::DeformedShape_i::CreateActor(const Handle(SALOME_InteractiveObject)& theIO) 
-  throw (std::runtime_error&)
 {
   VISU_Actor* anActor = VISU::ScalarMap_i::CreateActor(theIO);
   anActor->SetRepresentation(1);
@@ -155,7 +166,7 @@ VISU_Actor* VISU::DeformedShape_i::CreateActor(const Handle(SALOME_InteractiveOb
 }
 
 
-void VISU::DeformedShape_i::UpdateActor(VISU_Actor* theActor) throw(std::runtime_error&){
+void VISU::DeformedShape_i::UpdateActor(VISU_Actor* theActor) {
   if(VISU_ScalarMapAct* anActor = dynamic_cast<VISU_ScalarMapAct*>(theActor)){
     if(IsColored()){
       anActor->SetBarVisibility(true);