#8294 Export Well Path: Error in MD description

For file well paths, always use text MDRKB
For modeled well paths use MDMSL if airgap is zero, otherwise MDRKB
This commit is contained in:
Magne Sjaastad 2021-11-23 14:30:46 +01:00
parent 44f588be27
commit 9a85f2f0d7

View File

@ -20,6 +20,7 @@
#include "RigWellPath.h"
#include "RimFileWellPath.h"
#include "RimModeledWellPath.h"
#include "RimWellPath.h"
#include "RimWellPathGeometryDef.h"
@ -40,21 +41,28 @@ void RigWellPathGeometryExporter::exportWellPathGeometry( gsl::not_null<const Ri
useMdRkb = false;
double rkbOffset = 0.0;
{
auto topLevelWellPath = wellPath.get()->topLevelWellPath();
// Always use top level modeled well path for definitions MD at first coordinate
const RimModeledWellPath* modeledWellPath =
dynamic_cast<const RimModeledWellPath*>( wellPath.get()->topLevelWellPath() );
const RimModeledWellPath* modeledWellPath = dynamic_cast<const RimModeledWellPath*>( topLevelWellPath );
if ( modeledWellPath )
{
useMdRkb = true;
if ( modeledWellPath->geometryDefinition()->airGap() != 0.0 )
{
useMdRkb = true;
rkbOffset = modeledWellPath->geometryDefinition()->airGap();
}
}
if ( dynamic_cast<const RimFileWellPath*>( topLevelWellPath ) )
{
useMdRkb = true;
}
}
exportWellPathGeometry( *wellPathGeom, mdStepSize, rkbOffset, xValues, yValues, tvdValues, mdValues );
}