Make Well Path visualisation in Well Log Plots go all the way up to surface

This commit is contained in:
Gaute Lindkvist 2020-02-07 11:09:13 +01:00
parent 438febe049
commit 4405c1b25f
2 changed files with 29 additions and 11 deletions

View File

@ -2321,16 +2321,15 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
const std::pair<double, double> xRange = std::make_pair( m_visibleXRangeMin(), m_visibleXRangeMax() ); const std::pair<double, double> xRange = std::make_pair( m_visibleXRangeMin(), m_visibleXRangeMax() );
const caf::ColorTable waterAndRockColors = RiaColorTables::waterAndRockPaletteColors(); const caf::ColorTable waterAndRockColors = RiaColorTables::waterAndRockPaletteColors();
const std::vector<std::pair<double, double>> waterAndRockIntervals = waterAndRockRegions( plot->depthType(), const std::vector<std::pair<double, double>> waterAndRockIntervals = waterAndRockRegions( plot->depthType(),
extractor ); extractor );
int waterAndRockTransparency = m_colorShadingTransparency / 2;
m_annotationTool->attachNamedRegions( m_plotWidget, m_annotationTool->attachNamedRegions( m_plotWidget,
{"Water", ""}, {"Water", ""},
xRange, xRange,
waterAndRockIntervals, waterAndRockIntervals,
m_regionAnnotationDisplay(), m_regionAnnotationDisplay(),
waterAndRockColors, waterAndRockColors,
( ( 100 - waterAndRockTransparency ) * 255 ) / 100, ( ( 100 - m_colorShadingTransparency ) * 255 ) / 100,
m_showRegionLabels() ); m_showRegionLabels() );
if ( m_formationSource == CASE ) if ( m_formationSource == CASE )

View File

@ -53,7 +53,7 @@ RiuWellPathComponentPlotItem::RiuWellPathComponentPlotItem( const RimWellPath* w
, m_showLabel( false ) , m_showLabel( false )
{ {
CVF_ASSERT( wellPath && wellPath->wellPathGeometry() ); CVF_ASSERT( wellPath && wellPath->wellPathGeometry() );
double wellStart = wellPath->wellPathGeometry()->measureDepths().front(); double wellStart = 0.0;
double wellEnd = wellPath->wellPathGeometry()->measureDepths().back(); double wellEnd = wellPath->wellPathGeometry()->measureDepths().back();
m_startMD = wellStart; m_startMD = wellStart;
m_endMD = wellEnd; m_endMD = wellEnd;
@ -335,14 +335,33 @@ std::pair<double, double> RiuWellPathComponentPlotItem::depthsOfDepthType() cons
if ( m_depthType == RiaDefines::TRUE_VERTICAL_DEPTH || m_depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB ) if ( m_depthType == RiaDefines::TRUE_VERTICAL_DEPTH || m_depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB )
{ {
cvf::Vec3d startPoint = m_wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( m_startMD ); endDepth = -m_wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( m_endMD ).z();
cvf::Vec3d endPoint = m_wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( m_endMD ); double rkbDiff = m_wellPath->wellPathGeometry()->rkbDiff();
startDepth = -startPoint.z(); if ( rkbDiff == std::numeric_limits<double>::infinity() )
endDepth = -endPoint.z();
if ( m_depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB )
{ {
startDepth += m_wellPath->wellPathGeometry()->rkbDiff(); rkbDiff = 0.0;
endDepth += m_wellPath->wellPathGeometry()->rkbDiff(); }
if ( m_componentType == RiaDefines::WELL_PATH )
{
startDepth = 0.0;
if ( m_depthType == RiaDefines::TRUE_VERTICAL_DEPTH )
{
startDepth -= rkbDiff;
}
else if ( m_depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB )
{
endDepth += m_wellPath->wellPathGeometry()->rkbDiff();
}
}
else
{
startDepth = -m_wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( m_startMD ).z();
if ( m_depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB )
{
startDepth += m_wellPath->wellPathGeometry()->rkbDiff();
endDepth += m_wellPath->wellPathGeometry()->rkbDiff();
}
} }
} }
return std::make_pair( startDepth, endDepth ); return std::make_pair( startDepth, endDepth );