mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-30 17:10:19 -05:00
#13967 RigMainGrid: Invalidate face-normal direction cache on setFlipAxis
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).
This commit is contained in:
1 parent
b18f676884
commit
9e60bf1ce4
2 files changed
+110
No files matched your search
@@ -349,6 +349,9 @@ void RigMainGrid::setFlipAxis( bool flipXAxis, bool flipYAxis )
|
||||
|
||||
m_flipXAxis = flipXAxis;
|
||||
m_flipYAxis = flipYAxis;
|
||||
|
||||
// Cell face normals flip direction with the geometry, so a cached value computed before the flip is stale.
|
||||
m_isFaceNormalsOutwardsComputed = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user