View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003149 | OpenFOAM | Patch | public | 2019-01-13 11:50 | 2019-01-16 11:07 |
Reporter | tniemi | Assigned To | henry | ||
Priority | low | Severity | tweak | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | dev | ||||
Fixed in Version | dev | ||||
Summary | 0003149: Add support for VTK-files with METADATA | ||||
Description | The recent versions of Paraview can add METADATA-tags to VTK files when saving eg. feature edges. These tags confuse the vtk-reader and prevent using the feature edges in snappy unless the tags are manually removed. I have added a lightweight patch, which allows vtkUnstructuredReader to skip METADATA-blocks. According to (https://vtk.org/doc/nightly/html/IOLegacyInformationFormat.html), a METADATA-block is terminated by empty line, so the patch just reads lines until a next empty one is found. | ||||
Tags | No tags attached. | ||||
|
patch.diff (774 bytes)
diff --git a/src/fileFormats/vtk/vtkUnstructuredReader.C b/src/fileFormats/vtk/vtkUnstructuredReader.C index 1f8d42e..110ddb3 100644 --- a/src/fileFormats/vtk/vtkUnstructuredReader.C +++ b/src/fileFormats/vtk/vtkUnstructuredReader.C @@ -907,6 +907,19 @@ void Foam::vtkUnstructuredReader::read(ISstream& inFile) } } } + else if (tag == "METADATA") + { + // Read rest of the line + string line; + inFile.getLine(line); + + // Skip until an empty line is found + inFile.getLine(line); + while (!line.empty()) + { + inFile.getLine(line); + } + } else { FatalIOErrorInFunction(inFile) |
|
Thanks Timo, Resolved in OpenFOAM-dev by commit 18cda8d02c00824ec9fc07490eef4907851dc580 |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-01-13 11:50 | tniemi | New Issue | |
2019-01-13 11:50 | tniemi | File Added: patch.diff | |
2019-01-16 10:05 | henry | Assigned To | => henry |
2019-01-16 10:05 | henry | Status | new => resolved |
2019-01-16 10:05 | henry | Resolution | open => fixed |
2019-01-16 10:05 | henry | Fixed in Version | => dev |
2019-01-16 10:05 | henry | Note Added: 0010256 |