#14451 Guard against well path without geometry

RigWellPath::interpolatedVectorValuesAlongWellPath indexed vectorValuesAlongWellPath.at( vxIdx - 1 ) when no measured depths were present, causing an out of range exception and terminate. Return cvf::Vec3d::UNDEFINED for empty geometry, matching tangentAlongWellPath. RimWellPathFracture keeps the zero anchor position when the point is undefined.
This commit is contained in:
Magne Sjaastad committed 2026-08-05 09:42:55 +02:00
1 parent dd16739a37
commit 8b07cee36d
4 files changed
+58 -1

No files matched your search

@@ -207,6 +207,8 @@ cvf::Vec3d RigWellPath::interpolatedVectorValuesAlongWellPath( const std::vector
if ( horizontalLengthAlongWellToStartClipPoint ) *horizontalLengthAlongWellToStartClipPoint = 0.0;
if ( m_measuredDepths.empty() || vectorValuesAlongWellPath.empty() ) return cvf::Vec3d::UNDEFINED;
size_t vxIdx = 0;
while ( vxIdx < m_measuredDepths.size() && m_measuredDepths.at( vxIdx ) < measuredDepth )
{