#4800 WBS: Add parameter track which is off by default (#4816)

* Initial WIP

* Identical results with spreadsheet

* Improved and more robust smoothing by filtering points first

* Improved smoothing and more GUI

* Include mixed-label for smoothing threshold

* Implement WBS parameters track

* Much better alignment of tracks without flickering

* Don't replace user description when dragging and dropping tracks

* Fix missing OBG and SH curves

* Fix curve and track D&D

* Make sure parameter curves aren't WBS curves
This commit is contained in:
Gaute Lindkvist
2019-10-03 14:41:37 +02:00
committed by GitHub
parent 55f0cac713
commit f5b10b4d70
22 changed files with 330 additions and 138 deletions

View File

@@ -89,7 +89,7 @@ void RicDeleteWellLogPlotTrackFeature::onActionTriggered( bool isChecked )
for ( RimWellLogPlot* wellLogPlot : alteredWellLogPlots )
{
RiuWellLogPlot* viewWidget = dynamic_cast<RiuWellLogPlot*>( wellLogPlot->viewWidget() );
plotWindow->setWidthOfMdiWindow( viewWidget, viewWidget->preferredSize().width() );
plotWindow->setWidthOfMdiWindow( viewWidget, viewWidget->preferredWidth() );
wellLogPlot->calculateAvailableDepthRange();
wellLogPlot->updateDepthZoom();
wellLogPlot->uiCapability()->updateConnectedEditors();

View File

@@ -120,7 +120,12 @@ void RicNewWellBoreStabilityPlotFeature::onActionTriggered( bool isChecked )
}
{
auto task = progInfo.task( "Creating stability curves track", 75 );
auto task = progInfo.task( "Creating parameters track", 15 );
createParametersTrack( plot, wellPath, geoMechView );
}
{
auto task = progInfo.task( "Creating stability curves track", 60 );
createStabilityCurvesTrack( plot, wellPath, geoMechView );
}
@@ -193,6 +198,50 @@ void RicNewWellBoreStabilityPlotFeature::createCasingShoeTrack( RimWellBoreStabi
casingShoeTrack->loadDataAndUpdate();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicNewWellBoreStabilityPlotFeature::createParametersTrack( RimWellBoreStabilityPlot* plot,
RimWellPath* wellPath,
RimGeoMechView* geoMechView )
{
RimWellLogTrack* paramCurvesTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack( false,
"WBS Parameters",
plot );
paramCurvesTrack->setWidthScaleFactor( RimWellLogTrack::WIDE_TRACK );
paramCurvesTrack->setAutoScaleXEnabled( true );
paramCurvesTrack->setTickIntervals( 0.5, 0.05 );
paramCurvesTrack->setXAxisGridVisibility( RimWellLogPlot::AXIS_GRID_MAJOR_AND_MINOR );
paramCurvesTrack->setFormationWellPath( wellPath );
paramCurvesTrack->setFormationCase( geoMechView->geoMechCase() );
paramCurvesTrack->setAnnotationType( RiuPlotAnnotationTool::CURVE_ANNOTATIONS );
paramCurvesTrack->setShowRegionLabels( true );
paramCurvesTrack->setVisible( false );
std::vector<QString> resultNames = RiaDefines::wellPathStabilityParameterNames();
std::vector<cvf::Color3f> colors = {cvf::Color3f::CRIMSON, cvf::Color3f::DARK_YELLOW};
for ( size_t i = 0; i < resultNames.size(); ++i )
{
const QString& resultName = resultNames[i];
RigFemResultAddress resAddr( RIG_WELLPATH_DERIVED, resultName.toStdString(), "" );
RimWellLogExtractionCurve* curve = RicWellLogTools::addWellLogExtractionCurve( paramCurvesTrack,
geoMechView,
wellPath,
nullptr,
-1,
false,
false );
curve->setGeoMechResultAddress( resAddr );
curve->setCurrentTimeStep( geoMechView->currentTimeStep() );
curve->setColor( colors[i % colors.size()] );
curve->setLineThickness( 2 );
curve->loadDataAndUpdate( false );
curve->setAutoNameComponents( false, true, false, false, false );
}
paramCurvesTrack->calculateXZoomRangeAndUpdateQwt();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -233,7 +282,7 @@ void RicNewWellBoreStabilityPlotFeature::createStabilityCurvesTrack( RimWellBore
false );
curve->setGeoMechResultAddress( resAddr );
curve->setCurrentTimeStep( geoMechView->currentTimeStep() );
curve->setCustomName( resultName );
curve->setAutoNameComponents( false, true, false, false, false );
curve->setColor( colors[i % colors.size()] );
curve->setLineThickness( 2 );
curve->loadDataAndUpdate( false );

View File

@@ -41,6 +41,7 @@ protected:
private:
void createFormationTrack( RimWellBoreStabilityPlot* plot, RimWellPath* wellPath, RimGeoMechCase* geoMechCase );
void createCasingShoeTrack( RimWellBoreStabilityPlot* plot, RimWellPath* wellPath, RimGeoMechCase* geoMechCase );
void createStabilityCurvesTrack( RimWellBoreStabilityPlot* plot, RimWellPath* wellPath, RimGeoMechView* geoMechCase );
void createParametersTrack( RimWellBoreStabilityPlot* plot, RimWellPath* wellPath, RimGeoMechView* geoMechView );
void createStabilityCurvesTrack( RimWellBoreStabilityPlot* plot, RimWellPath* wellPath, RimGeoMechView* geoMechView );
void createAnglesTrack( RimWellBoreStabilityPlot* plot, RimWellPath* wellPath, RimGeoMechView* geoMechView );
};

View File

@@ -68,7 +68,7 @@ void RicNewWellLogPlotTrackFeature::onActionTriggered( bool isChecked )
RiuWellLogPlot* viewWidget = dynamic_cast<RiuWellLogPlot*>( wellLogPlot->viewWidget() );
RicWellLogTools::addWellLogExtractionCurve( plotTrack, nullptr, nullptr, nullptr, -1, true );
plotWindow->setWidthOfMdiWindow( viewWidget, viewWidget->preferredSize().width() );
plotWindow->setWidthOfMdiWindow( viewWidget, viewWidget->preferredWidth() );
wellLogPlot->updateConnectedEditors();
wellLogPlot->loadDataAndUpdate();
}

View File

@@ -114,7 +114,7 @@ void RicWellLogPlotTrackFeatureImpl::moveTracksToWellLogPlot( RimWellLogPlot*
for ( std::set<RimWellLogPlot*>::iterator pIt = srcPlots.begin(); pIt != srcPlots.end(); ++pIt )
{
RiuWellLogPlot* viewWidget = dynamic_cast<RiuWellLogPlot*>( ( *pIt )->viewWidget() );
plotWindow->setWidthOfMdiWindow( viewWidget, viewWidget->preferredSize().width() );
plotWindow->setWidthOfMdiWindow( viewWidget, viewWidget->preferredWidth() );
( *pIt )->calculateAvailableDepthRange();
( *pIt )->updateTrackNames();
@@ -130,7 +130,7 @@ void RicWellLogPlotTrackFeatureImpl::moveTracksToWellLogPlot( RimWellLogPlot*
dstWellLogPlot->insertTrack( tracksToMove[tIdx], insertionStartIndex + tIdx );
}
RiuWellLogPlot* viewWidget = dynamic_cast<RiuWellLogPlot*>( dstWellLogPlot->viewWidget() );
plotWindow->setWidthOfMdiWindow( viewWidget, viewWidget->preferredSize().width() );
plotWindow->setWidthOfMdiWindow( viewWidget, viewWidget->preferredWidth() );
dstWellLogPlot->updateTrackNames();
dstWellLogPlot->updateTracks();