mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-05 13:47:06 -06:00
#1479 RigWellPath: improve api to force pairs of points and measured depths.
Refactored RigWellPath to ensure that a well path points and measured depths always come pairs, as their usage often relies on both being present. Fixes #1479.
This commit is contained in:
1 parent
61ff5748ce
commit
a222b8fdcb
8 files changed
+12
-36
No files matched your search
@@ -300,7 +300,6 @@ void RimFileWellPath::ensureWellPathStartAtSeaLevel( RigWellPath* wellPath )
|
||||
// first point in the read well path.
|
||||
std::vector<cvf::Vec3d> newPoints = { cvf::Vec3d( firstPoint.x(), firstPoint.y(), 0.0 ) };
|
||||
newPoints.insert( newPoints.end(), wellPathPoints.begin(), wellPathPoints.end() );
|
||||
wellPath->setWellPathPoints( newPoints );
|
||||
|
||||
// Use rkbDiff as MD for the point at sea level
|
||||
double mdAtSeaLevel = 0.0;
|
||||
@@ -316,7 +315,7 @@ void RimFileWellPath::ensureWellPathStartAtSeaLevel( RigWellPath* wellPath )
|
||||
std::vector<double> newMeasuredDepths = { mdAtSeaLevel };
|
||||
newMeasuredDepths.insert( newMeasuredDepths.end(), measuredDepths.begin(), measuredDepths.end() );
|
||||
|
||||
wellPath->setMeasuredDepths( newMeasuredDepths );
|
||||
wellPath->setWellPathPoints( newPoints, newMeasuredDepths );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -294,8 +294,7 @@ cvf::ref<RigWellPath>
|
||||
measuredDepths.push_back( md + startMD );
|
||||
}
|
||||
}
|
||||
wellPathGeometry->setWellPathPoints( wellPathPoints );
|
||||
wellPathGeometry->setMeasuredDepths( measuredDepths );
|
||||
wellPathGeometry->setWellPathPoints( wellPathPoints, measuredDepths );
|
||||
|
||||
if ( m_airGap != 0.0 )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user