Skip to content

Fix contour bands for non-monotonous scalars

The contouring algorithm incorrectly assumed that each subsequent intersection point encountered while traversing the edges from minimum to maximum value would not be less than the current clip value. This is not true when a cell has scalars that do not monotonously increase around the edges from the minimum to the maximum.

This has been addressed by:

  1. detecting a decreasing scalar value
  2. determining the remaining polygon
  3. searching the new minimum
  4. re-start traversal from the new minimum

The bookkeeping of the polygon points, clockwise/counter-clockwise iteration and generation of sub-polygons for each band has been rewritten using std algorithms and iterators.

Merge request reports