-void VISU::Prs3d_i::UpdateActor(VISU_Actor* theActor) throw (std::runtime_error&){
- try{
- vtkGeometryFilter* aGeometryFilter = vtkGeometryFilter::New();
- vtkDataSet *aDataSet = theActor->GetMapper()->GetInput();
- aGeometryFilter->SetInput(aDataSet);
- vtkPolyData* aPolyData = aGeometryFilter->GetOutput();
- aPolyData->Update();
- static int INCMEMORY = 7;
- float aSize = INCMEMORY*aPolyData->GetActualMemorySize()*1024.0;
- int isPoss = VISU_PipeLine::CheckAvailableMemory(aSize);
- INFOS("UpdateActor - aSize = "<<aSize<<"; isPoss = "<<isPoss);
- aPolyData->Delete();
- if (aSize <= 0)
- throw std::runtime_error("Prs3d_i::UpdateActor >> Actor is empty !!!");
- if(!isPoss)
- throw std::runtime_error("Prs3d_i::UpdateActor >> There is no enough memory !!!");
-
- theActor->GetMapper()->ShallowCopy(myPipeLine->GetMapper());
- theActor->Modified();
- }catch(std::runtime_error& ex){
- throw ex;
- }catch(...){
- throw std::runtime_error("Prs3d_i::UpdateActor >> unexpected exception was caught!!!");
- }
+void VISU::Prs3d_i::UpdateActor(VISU_Actor* theActor) {
+ if(MYDEBUG) MESSAGE("Prs3d_i::UpdateActor() - this = "<<this);
+ theActor->GetMapper()->ShallowCopy(myPipeLine->GetMapper());
+ theActor->Modified();