Fix invalid MD interpolation for wells starting at zero depth.

The interpolation procedure adds a point at zero depth. If the well already
had a starting point there the interpolation would set all MD values to zero.
Fixed by adding the zero point only when necessary.
This commit is contained in:
Kristian Bendiksen
2020-09-07 14:04:43 +02:00
committed by Magne Sjaastad
parent 85ba3a3bc9
commit b0448043f3
2 changed files with 17 additions and 1 deletions

View File

@@ -322,9 +322,10 @@ QwtSpline RigWellPathGeometryTools::createSpline( const std::vector<double>& ori
QwtSplineCurveFitter curveFitter;
QPolygonF splinePoints = curveFitter.fitCurve( polygon );
// Extend spline from 0.0 to a large value for MD
// Extend spline from 0.0 (if it does not already exist) to a large value for MD
// This is to force a specific and known extrapolation.
// Otherwise we get an undefined and unknown extrapolation.
if ( !( splinePoints[0].x() == 0.0 && splinePoints[0].y() == 0.0 ) )
{
double x1 = splinePoints[0].x();
double x2 = splinePoints[1].x();