]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fix on Bug PAL5877 Ecole_Ete_a5
authorsmh <smh@opencascade.com>
Thu, 13 May 2004 08:12:06 +0000 (08:12 +0000)
committersmh <smh@opencascade.com>
Thu, 13 May 2004 08:12:06 +0000 (08:12 +0000)
- V1_4_1a: PAL-POST-012_4-05-13 checkpoint 9.29 fails (regression)

src/VTKFilter/SALOME_PassThroughFilter.cxx
src/VTKFilter/SALOME_TransformFilter.cxx

index 68e7959fdada508a57268f9de135995b049a7f46..f1ee7c5e90de3cd617ef21a2c48bd1f3d54ca6d7 100644 (file)
@@ -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)
index de14593873f0d32cf6776c1e7ee7cb6e02c003b1..a7b1b2bc50812beaa2021615a7ddb479c81349ff 100644 (file)
@@ -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<SALOME_Transform*>(this->Transform))
-    anIdentity = aTransform->IsIdentity();
-  if(!anIdentity && this->Transform != NULL){
+  if(Transform){
+    bool anIsIdentity = true;
+    if(SALOME_Transform* aTransform = dynamic_cast<SALOME_Transform*>(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);