diff --git a/plugin/StaticMeshModule/vtkStaticEnSight6BinaryReader.cxx b/plugin/StaticMeshModule/vtkStaticEnSight6BinaryReader.cxx index 677df958137d1ec7ebfb74dff07fff702b5306d1..517f62747fbdffd843af3218a688ffaccc29c6f6 100644 --- a/plugin/StaticMeshModule/vtkStaticEnSight6BinaryReader.cxx +++ b/plugin/StaticMeshModule/vtkStaticEnSight6BinaryReader.cxx @@ -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); diff --git a/plugin/StaticMeshModule/vtkStaticEnSightGoldBinaryReader.cxx b/plugin/StaticMeshModule/vtkStaticEnSightGoldBinaryReader.cxx index ed9d60d65c1e1d239bbf84176b98d12f0306b56e..707e58c9cc0e1a39f6edfacdd982b99385c88461 100644 --- a/plugin/StaticMeshModule/vtkStaticEnSightGoldBinaryReader.cxx +++ b/plugin/StaticMeshModule/vtkStaticEnSightGoldBinaryReader.cxx @@ -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);