#include "VISU_Actor.h"
#include "VISU_PipeLine.hxx"
-#include "SALOME_ShrinkFilter.h"
-#include "SALOME_GeometryFilter.h"
-#include "SALOME_PassThroughFilter.h"
+#include "VTKViewer_ShrinkFilter.h"
+#include "VTKViewer_GeometryFilter.h"
+#include "VTKViewer_PassThroughFilter.h"
#include <stdexcept>
myIsShrunk = false;
myIsShrinkable = false;
- myShrinkFilter = SALOME_ShrinkFilter::New();
+ myShrinkFilter = VTKViewer_ShrinkFilter::New();
myShrinkFilter->SetStoreMapping(true);
SetShrinkFactor();
this->Modified();
vtkMapper *aMapper = myPipeLine->GetMapper();
vtkDataSet *aDataSet = aMapper->GetInput();
- if(!aDataSet)
- throw std::runtime_error("VISU_Actor::SetPipeLine >> There is no input data !!!");
- aDataSet->Update();
- static float eps = VTK_LARGE_FLOAT * 0.1 ;
- if(aDataSet->GetLength() > eps)
- throw std::runtime_error("VISU_Actor::SetPipeLine >> Diagonal of the actor is too large !!!");
- if(!aDataSet->GetNumberOfCells())
- throw std::runtime_error("VISU_Actor::SetPipeLine >> There is no visible elements");
+
+ //This code has been moved into VISU::Prs3d_i::UpdateActor() for bug 9808
+ //if(!aDataSet)
+ // throw std::runtime_error("VISU_Actor::SetPipeLine >> There is no input data !!!");
+ //aDataSet->Update();
+ //static float eps = VTK_LARGE_FLOAT * 0.1 ;
+ //if(aDataSet->GetLength() > eps)
+ // throw std::runtime_error("VISU_Actor::SetPipeLine >> Diagonal of the actor is too large !!!");
+ //if(!aDataSet->GetNumberOfCells())
+ // throw std::runtime_error("VISU_Actor::SetPipeLine >> There is no visible elements");
+
//Bug SAL4221: Mesh with less than 10 cells : shrink mode disable
//SetShrinkable(aDataSet->GetNumberOfCells() > 10);
- SetShrinkable(true);
+ SetShrinkable(thePipeLine->IsShrinkable());
//Now, we use vtkShrinkPolyData (not vtkShrinkFilter),
//and the class there is no such limitation.
-
+
myMapper->SetInput(aDataSet);
SetMapper(myMapper);
}