GMV Reader does not correctly load polygons
In the Paraview GMV Reader, polygons with one or two vertices are not correctly handled, and Paraview gives an error when trying to load a GMV file with it. A polygon with one vertex should result in a point. A polygon with two vertices should result in a line segment. This is specifically the polygons
clause of the GMV file format.
When trying to load a GMV file with one or two vertex polygons, the following error appears:
ERROR: In /opt/glr/paraview/paraview-ci/build/superbuild/paraview/src/VTK/Common/DataModel/vtkPolyData.cxx, line 966
vtkPolyData (0x7fbfdf7c2560): Error while constructing cell map: Invalid cell size for polys.
Here are some test GMV files which contain one and two vertex polygons:
Below is what two_vertex.gmv
looks like when loaded into a GMV viewer. There are two triangles, colored differently. Notice the two white line segments, those are the polygons.
For the GMV file format, see https://github.com/CPFDSoftware/gmv/blob/master/src/gmvdoc.pdf.
The general GMV viewer code is at https://github.com/CPFDSoftware/gmv. I was able to compile on a Linux machine.
This is pretty late, but if this could get in Paraview 5.10.1, that would be wonderful.