]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Fix the GeometryTimeValue so the initial time may not be the first one V9_11_0a1 V9_11_0a2 V9_11_0b1
authorChristophe Bourcier <christophe.bourcier@cea.fr>
Wed, 10 May 2023 12:11:55 +0000 (14:11 +0200)
committerChristophe Bourcier <christophe.bourcier@cea.fr>
Wed, 10 May 2023 12:11:55 +0000 (14:11 +0200)
Thanks to Charles Gueunet at Kitware
SciViz #112

src/Plugins/StaticMesh/plugin/StaticMeshModule/vtkStaticEnSight6BinaryReader.cxx
src/Plugins/StaticMesh/plugin/StaticMeshModule/vtkStaticEnSightGoldBinaryReader.cxx

index 677df958137d1ec7ebfb74dff07fff702b5306d1..517f62747fbdffd843af3218a688ffaccc29c6f6 100644 (file)
@@ -85,6 +85,9 @@ int vtkStaticEnSight6BinaryReader::RequestData(vtkInformation* vtkNotUsed(reques
         vtkIdType timeSet = this->TimeSetIds->IsId(this->GeometryTimeSet);
         if (timeSet >= 0)
         {
+          // Always consider the first mesh when reading geometry
+          this->GeometryTimeValue = this->MinimumTimeValue;
+
           vtkDataArray* times = this->TimeSets->GetItem(timeSet);
           this->GeometryTimeValue = times->GetComponent(0, 0);
           for (vtkIdType i = 1; i < times->GetNumberOfTuples(); i++)
@@ -92,11 +95,11 @@ int vtkStaticEnSight6BinaryReader::RequestData(vtkInformation* vtkNotUsed(reques
             double newTime = times->GetComponent(i, 0);
             if (newTime <= this->ActualTimeValue && newTime > this->GeometryTimeValue)
             {
-              this->GeometryTimeValue = newTime;
               timeStep++;
               timeStepInFile++;
             }
           }
+
           if (this->TimeSetFileNameNumbers->GetNumberOfItems() > 0)
           {
             int collectionNum = this->TimeSetsWithFilenameNumbers->IsId(this->GeometryTimeSet);
index ed9d60d65c1e1d239bbf84176b98d12f0306b56e..707e58c9cc0e1a39f6edfacdd982b99385c88461 100644 (file)
@@ -85,6 +85,9 @@ int vtkStaticEnSightGoldBinaryReader::RequestData(vtkInformation* vtkNotUsed(req
         vtkIdType timeSet = this->TimeSetIds->IsId(this->GeometryTimeSet);
         if (timeSet >= 0)
         {
+          // Always consider the first mesh when reading geometry
+          this->GeometryTimeValue = this->MinimumTimeValue;
+
           vtkDataArray* times = this->TimeSets->GetItem(timeSet);
           this->GeometryTimeValue = times->GetComponent(0, 0);
           for (vtkIdType i = 1; i < times->GetNumberOfTuples(); i++)
@@ -92,11 +95,11 @@ int vtkStaticEnSightGoldBinaryReader::RequestData(vtkInformation* vtkNotUsed(req
             double newTime = times->GetComponent(i, 0);
             if (newTime <= this->ActualTimeValue && newTime > this->GeometryTimeValue)
             {
-              this->GeometryTimeValue = newTime;
               timeStep++;
               timeStepInFile++;
             }
           }
+
           if (this->TimeSetFileNameNumbers->GetNumberOfItems() > 0)
           {
             int collectionNum = this->TimeSetsWithFilenameNumbers->IsId(this->GeometryTimeSet);