Osdu Well Log: make it possible to add Osdu well logs to plot.

This commit is contained in:
Kristian Bendiksen committed 2024-06-14 17:31:22 +02:00
1 parent 23d716754e
commit 10ad053c30
14 files changed
+104 -78

No files matched your search

@@ -69,13 +69,12 @@ void RicAddWellLogToPlotFeature::onActionTriggered( bool isChecked )
plot->loadDataAndUpdate();
for ( size_t wlIdx = 0; wlIdx < selection.size(); wlIdx++ )
bool isFirst = true;
for ( RimWellLogChannel* wellLogChannel : selection )
{
RimWellLogChannel* wellLog = selection[wlIdx];
auto wellPath = wellLog->firstAncestorOrThisOfType<RimWellPath>();
auto wellLogFile = wellLog->firstAncestorOrThisOfType<RimWellLogLasFile>();
if ( wellLogFile )
auto wellPath = wellLogChannel->firstAncestorOrThisOfType<RimWellPath>();
auto wellLog = wellLogChannel->firstAncestorOrThisOfType<RimWellLog>();
if ( wellLog )
{
RimWellLogLasFileCurve* curve = new RimWellLogLasFileCurve;
cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable( plotTrack->curveCount() );
@@ -83,18 +82,19 @@ void RicAddWellLogToPlotFeature::onActionTriggered( bool isChecked )
plotTrack->addCurve( curve );
RigWellLogLasFile* wellLogDataFile = wellLogFile->wellLogData();
CVF_ASSERT( wellLogDataFile );
RigWellLogData* wellLogData = wellLog->wellLogData();
CVF_ASSERT( wellLogData );
if ( wlIdx == 0 )
if ( isFirst )
{
// Initialize plot with depth unit from the first log file
plot->setDepthUnit( wellLogDataFile->depthUnit() );
plot->setDepthUnit( wellLogData->depthUnit() );
isFirst = false;
}
curve->setWellPath( wellPath );
curve->setWellLogChannelName( wellLog->name() );
curve->setWellLogFile( wellLogFile );
curve->setWellLogChannelName( wellLogChannel->name() );
curve->setWellLog( wellLog );
curve->loadDataAndUpdate( true );
}