#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,
{
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;
}
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)
{
VISU::Storable* VISU::DeformedShape_i::Restore(const Storable::TRestoringMap& theMap)
- throw(std::logic_error&)
{
DoHook();
SetScale(VISU::Storable::FindValue(theMap,"myFactor").toDouble());
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);
}
-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);