Skip to content

Commit

Permalink
#5402 WELSEGS: Report center of segments instead of end of segment
Browse files Browse the repository at this point in the history
  • Loading branch information
lindkvis authored and magnesj committed Jan 28, 2020
1 parent 3185183 commit 314c910
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,15 +307,18 @@ void RicWellPathExportMswCompletionsImpl::generateWelsegsTable( RifTextDataTable
double depth = 0;
double length = 0;

double midPointMD = 0.5 * ( location->startMD() + location->endMD() );
double midPointTVD = 0.5 * ( location->startTVD() + location->endTVD() );

if ( exportInfo.lengthAndDepthText() == QString( "INC" ) )
{
depth = location->endTVD() - prevTVD;
length = location->endMD() - prevMD;
depth = midPointTVD - prevTVD;
length = midPointMD - prevMD;
}
else
{
depth = location->endTVD();
length = location->endMD();
depth = midPointTVD;
length = midPointMD;
}

if ( location->subIndex() != cvf::UNDEFINED_SIZE_T )
Expand All @@ -333,8 +336,8 @@ void RicWellPathExportMswCompletionsImpl::generateWelsegsTable( RifTextDataTable
formatter.add( exportInfo.linerDiameter() );
formatter.add( exportInfo.roughnessFactor() );
formatter.rowCompleted();
prevMD = location->endMD();
prevTVD = location->endTVD();
prevMD = midPointMD;
prevTVD = midPointTVD;
}
}

Expand Down

0 comments on commit 314c910

Please sign in to comment.