Numerical roundoff issues in vtkBandedPolyDataContourFilter
Attached script demonstrates some numerical roundoff issues in vtkBandedPolyDataMapper The input unstructured grid has scalar point data in the range [10.0:20.0]. Some of the clip values exactly match scalar data values. Contour bands are expected to be symmetrical in horizontal and vertical directions.
Note that the contour bands in the upper left and right cells are incorrect. The upper right cell even produces two bands with the same index/clip value(!). Adding a small offset to the 17.5 clip value fixes this.
The cell_counts shows that there are 10 cells associated with clip value 15.0, apparently thin cells generated just above or below the original cell edges. In our FEA application where we use a similar pipeline, a numerical roundoff issue at the 15.0 clip value causes further distortions of the expected contour bands.
Expected contour plot:
Contour plot with incorrect contour bands in upper left and right corners: