Read grid dimensions and verify equality before adding a result case
Harmonized and refactored creation of RimResultCases
p4#: 21156