Added duplicate and collapsed triangle checks to vtkPolygonBuilder with tests
requested to merge mennodeij1/vtk:collapsed_and_duplicate_triangle_check_in_vtkpolygonbuilder into master
During contouring of polyhedral cells, the vtkPolygonBuilder would cause a crash for our data, due to the fact that it got into a state where naked, unconnected edges ended up in the builder, resulting in dereferencing of an iterator that could not be dereferenced.
This MR addresses this problem by the following measures:
- check for collapsed triangles
- check for duplicate triangles (clockwise/counter-clockwise)
These problems are addressed in three new tests.
- TestPolygonBuilder2 tests the problem based on the configuration from a real-life case
- TestPolygonBuilder3 tests basic null check
- TestPolygonBuilder4 tests the problem only for duplicate triangles