#5402 WELSEGS: Report center of segments instead of end of segment

This commit is contained in:
Gaute Lindkvist 2020-01-27 15:12:21 +01:00
parent 15ee092338
commit aea98ec12b

View File

@ -307,15 +307,18 @@ void RicWellPathExportMswCompletionsImpl::generateWelsegsTable( RifTextDataTable
double depth = 0; double depth = 0;
double length = 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" ) ) if ( exportInfo.lengthAndDepthText() == QString( "INC" ) )
{ {
depth = location->endTVD() - prevTVD; depth = midPointTVD - prevTVD;
length = location->endMD() - prevMD; length = midPointMD - prevMD;
} }
else else
{ {
depth = location->endTVD(); depth = midPointTVD;
length = location->endMD(); length = midPointMD;
} }
if ( location->subIndex() != cvf::UNDEFINED_SIZE_T ) if ( location->subIndex() != cvf::UNDEFINED_SIZE_T )
@ -333,8 +336,8 @@ void RicWellPathExportMswCompletionsImpl::generateWelsegsTable( RifTextDataTable
formatter.add( exportInfo.linerDiameter() ); formatter.add( exportInfo.linerDiameter() );
formatter.add( exportInfo.roughnessFactor() ); formatter.add( exportInfo.roughnessFactor() );
formatter.rowCompleted(); formatter.rowCompleted();
prevMD = location->endMD(); prevMD = midPointMD;
prevTVD = location->endTVD(); prevTVD = midPointTVD;
} }
} }