Salome HOME
Merge branch 'V9_10_BR'
authorjfa <jfa@opencascade.com>
Fri, 16 Dec 2022 08:16:57 +0000 (11:16 +0300)
committerjfa <jfa@opencascade.com>
Fri, 16 Dec 2022 08:16:57 +0000 (11:16 +0300)
src/Plugins/MEDReader/plugin/MEDReaderIO/vtkFileSeriesGroupReader.cxx
src/Plugins/StaticMesh/plugin/StaticMeshModule/vtkStaticDataSetSurfaceFilter.cxx

index 28f64fcd59a33f59472718e18f95bd6917d00207..d666796ddd367e4f23a8ab7eedc7d9c38d82d5e3 100644 (file)
@@ -136,7 +136,6 @@ int vtkFileSeriesGroupReader::RequestData(vtkInformation* vtkNotUsed(request),
   {
     // Make sure the information is up to date
     this->ReaderSetFileName(this->GetFileName(0));
-    vtkMEDReader::SafeDownCast(this->Reader)->ReloadInternals();
     this->Reader->UpdateInformation();
 
     this->Reader->UpdateTimeStep(time);
index 43b701f8f0ddba2a913161b9d867b345f0f816e6..6eb5aac3ea81967835e9023db638f92baf144150 100644 (file)
@@ -75,11 +75,7 @@ int vtkStaticDataSetSurfaceFilter::UnstructuredGridExecute(vtkDataSet* input, vt
     // Remove array that have disappeared from input
     for (int iArr = outPD->GetNumberOfArrays() - 1; iArr >= 0; iArr--)
     {
-      vtkAbstractArray* inArr = inPD->GetAbstractArray(outPD->GetArrayName(iArr));
-      if (!inArr)
-      {
-        outPD->RemoveArray(iArr);
-      }
+      outPD->RemoveArray(iArr);
     }
 
     // Update or create arrays present in input
@@ -113,21 +109,19 @@ int vtkStaticDataSetSurfaceFilter::UnstructuredGridExecute(vtkDataSet* input, vt
       cellIds->SetId(i, origCellArray->GetTuple1(i));
     }
 
-    // Remove array that have disappeared from input
+    // EDF26573 : Initially At the begining Remove array that have disappeared from input
+    // But after investigation ShallowCopy of Cache leads to a same array on input/output and leads to conflicts
+    // on inArr->GetTuples(cellIds.Get(), outArr); operation. So here a deepCopy of arrays is done inconditionnaly
     for (int iArr = outCD->GetNumberOfArrays() - 1; iArr >= 0; iArr--)
     {
-      vtkAbstractArray* inArr = inCD->GetAbstractArray(outCD->GetArrayName(iArr));
-      if (!inArr)
-      {
-        outCD->RemoveArray(iArr);
-      }
+      outCD->RemoveArray(iArr);
     }
 
     for (int iArr = 0; iArr < inCD->GetNumberOfArrays(); iArr++)
     {
       vtkAbstractArray* outArr = outCD->GetAbstractArray(inCD->GetArrayName(iArr));
-      if (outArr)
-      {
+      if(outArr)
+      {// EDF26573 : normally this condition is never fetched
         inCD->GetAbstractArray(iArr)->GetTuples(cellIds.Get(), outArr);
       }
       else