mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 07:00:17 -05:00
isFaceNormalsOutwards lazily computes whether cell face normals point outward and caches the answer in m_isFaceNormalsOutwardsComputed. setFlipAxis was mirroring the node coordinates without resetting that cache, so any consumer that had triggered the lazy computation before the user toggled Flip X/Y kept the pre-flip answer. The well-path/cell intersection in RigEclipseWellLogExtractor::calculateIntersection then inverted the entering/leaving flag the wrong way, causing the proper-pair filter in populateReturnArrays to discard every intermediate cell along a perforation interval - only the start and end cells survived through the well-starts/ends-inside-a-cell fallback. Reset m_isFaceNormalsOutwardsComputed when the flip state actually changes. Add unit tests covering all four combinations of Flip X / Flip Y for both the data-level node mirroring and the well-path/cell intersection (freshly-built grid and interactive-toggle scenarios).