fix(ensight): renew internal ensight point cache to avoid shadowing

Previously, the EnSight 6 readers' caches were always reallocated in
place. This interferes with things that might store pointers to certain
data downstream (like the temporal cache).

This fix adds a renewal mechanism to the internal point cache for the
EnSight 6 readers.
HTGUnlimitedGradien
Julien Fausty 3 months ago
parent 1b857b1fe2
commit c7122c5faf
  1. 5
      IO/EnSight/vtkEnSight6BinaryReader.cxx
  2. 5
      IO/EnSight/vtkEnSight6Reader.cxx

@ -231,6 +231,11 @@ int vtkEnSight6BinaryReader::ReadGeometryFile(
return 0;
}
if (this->UnstructuredPoints)
{
this->UnstructuredPoints->Delete();
}
this->UnstructuredPoints = vtkPoints::New();
this->UnstructuredPoints->SetNumberOfPoints(this->NumberOfUnstructuredPoints);
if (pointIdsListed)

@ -266,6 +266,11 @@ int vtkEnSight6Reader::ReadGeometryFile(
this->ReadNextDataLine(line); // "coordinates"
this->ReadNextDataLine(line);
this->NumberOfUnstructuredPoints = atoi(line);
if (this->UnstructuredPoints)
{
this->UnstructuredPoints->Delete();
}
this->UnstructuredPoints = vtkPoints::New();
this->UnstructuredPoints->Allocate(this->NumberOfUnstructuredPoints);
int* tmpIds = new int[this->NumberOfUnstructuredPoints];

Loading…
Cancel
Save