If a geometry generator is switched out and the material indices array is not correctly updated, you can either have a silent error (where potentially the wrong material is applied) or a pretty esoteric error like
ERROR: LoadError: BoundsError: attempt to access NTuple{4, Int64} at index [5]
but vaguely inside smooth_\varepsilon somewhere.
Adding an explicit check or assertion that the number of provided material indices matches the number of geometric objects would make debugging both these errors much faster.
If a geometry generator is switched out and the material indices array is not correctly updated, you can either have a silent error (where potentially the wrong material is applied) or a pretty esoteric error like
but vaguely inside
smooth_\varepsilonsomewhere.Adding an explicit check or assertion that the number of provided material indices matches the number of geometric objects would make debugging both these errors much faster.