Split flying edges and marching cells into separate filters
The Contour
filter is bulky and slow to compile because it actually contains two separate contouring algorithms. If the input has a CellSetStructured<3>
cell set and an ArrayHandleUniformPointCoordinates
for point coordinates, then it uses flying edges. Otherwise, it uses marching cells.
These two algorithms could be separated into two separate filters (i.e., ContourFlyingEdges
and ContourMarchingCells
). The main advantage of doing this is to split up the code to compile more efficiently into two translation units. This helps ease the burden on some device compilers and makes parallel builds more efficient.
After the split, there should still be a Contour
filter. This filter would simply direct its input to either ContourFlyingEdges
or ContourMarchingCubes
depending on the input data type. The MeshQuality
filter does something similar.