From 8e119910f6b43dc676db30d3beda063724d15fb2 Mon Sep 17 00:00:00 2001 From: smh Date: Thu, 13 May 2004 08:12:06 +0000 Subject: [PATCH] Fix on Bug PAL5877 - V1_4_1a: PAL-POST-012_4-05-13 checkpoint 9.29 fails (regression) --- src/VTKFilter/SALOME_PassThroughFilter.cxx | 3 --- src/VTKFilter/SALOME_TransformFilter.cxx | 30 ++++++++++------------ 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/src/VTKFilter/SALOME_PassThroughFilter.cxx b/src/VTKFilter/SALOME_PassThroughFilter.cxx index 68e7959fd..f1ee7c5e9 100644 --- a/src/VTKFilter/SALOME_PassThroughFilter.cxx +++ b/src/VTKFilter/SALOME_PassThroughFilter.cxx @@ -43,9 +43,6 @@ void SALOME_PassThroughFilter::Execute() // This has to be here because it initialized all field datas. output->CopyStructure( input ); - if(!input->GetNumberOfPoints()){ - vtkErrorMacro(<<"No input data"); - } // Pass all. (data object's field data is passed by the // superclass after this method) diff --git a/src/VTKFilter/SALOME_TransformFilter.cxx b/src/VTKFilter/SALOME_TransformFilter.cxx index de1459387..a7b1b2bc5 100644 --- a/src/VTKFilter/SALOME_TransformFilter.cxx +++ b/src/VTKFilter/SALOME_TransformFilter.cxx @@ -48,24 +48,22 @@ void SALOME_TransformFilter::Execute(){ vtkPointData *pd=input->GetPointData(), *outPD=output->GetPointData(); vtkCellData *cd=input->GetCellData(), *outCD=output->GetCellData(); output->CopyStructure( input ); - int anIdentity = 0; - if(SALOME_Transform* aTransform = dynamic_cast(this->Transform)) - anIdentity = aTransform->IsIdentity(); - if(!anIdentity && this->Transform != NULL){ + if(Transform){ + bool anIsIdentity = true; + if(SALOME_Transform* aTransform = dynamic_cast(Transform)) + anIsIdentity = aTransform->IsIdentity(); inPts = input->GetPoints(); - if(!inPts){ - vtkErrorMacro(<<"No input data"); - return; + if(!anIsIdentity && inPts){ + numPts = inPts->GetNumberOfPoints(); + numCells = input->GetNumberOfCells(); + newPts = vtkPoints::New(); + newPts->Allocate(numPts); + this->UpdateProgress(.2); + this->Transform->TransformPoints(inPts,newPts); + this->UpdateProgress(.8); + output->SetPoints(newPts); + newPts->Delete(); } - numPts = inPts->GetNumberOfPoints(); - numCells = input->GetNumberOfCells(); - newPts = vtkPoints::New(); - newPts->Allocate(numPts); - this->UpdateProgress(.2); - this->Transform->TransformPoints(inPts,newPts); - this->UpdateProgress(.8); - output->SetPoints(newPts); - newPts->Delete(); } outPD->PassData(pd); outCD->PassData(cd); -- 2.39.2