Rob777
(Roberto Putzu)
November 17, 2023, 6:50pm
1
Dear All,
As the title tells, I’m struggling to create a simple (legacy) unstructured mesh with just 1 triangle cell at the origin.
I’m opening the file with paraview 5.9.1 and keep getting unrecognized keyword.
I’ve read info on vtk unstr file https://examples.vtk.org/site/VTKFileFormats/#dataset-format
Here the mesh :
# vtk DataFile Version 2.0
Unstructured Grid Example
ASCII
DATASET UNSTRUCTURED_GRID
POINTS 3 float
0.0 0.0 0.0
1.0 0.0 0.0
0.5 0.5 0.0
CELLS 1 3
0 1 2
CELL_TYPES 1
5
Thank you very much for your help
Paraview these days uses vtk DataFile Version 5.1
. Unfortunately, however, there appears to be no formal documentation on this yet.
https://gitlab.kitware.com/vtk/vtk/-/issues/17989
Therefore, if you are applying Version 5.1 to your own data, you will need to output similar data from ParaView in ASCII format and decipher it.
In this example, you would need to do the following.
# vtk DataFile Version 5.1
Unstructured Grid Example
ASCII
DATASET UNSTRUCTURED_GRID
POINTS 3 float
0.0 0.0 0.0
1.0 0.0 0.0
0.5 0.5 0.0
CELLS 2 3
OFFSETS vtktypeint64
0 3
CONNECTIVITY vtktypeint64
0 1 2
CELL_TYPES 1
5