#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

@@ -468,8 +468,8 @@ void RimGeoMechResultDefinition::loadResult()
{
if ( m_geomCase && m_geomCase->geoMechData() )
{
if ( this->resultAddress().fieldName == RiaDefines::wellPathFGResultName().toStdString() ||
this->resultAddress().fieldName == RiaDefines::wellPathSFGResultName().toStdString() )
if ( this->resultAddress().fieldName == RiaDefines::wbsFGResultName().toStdString() ||
this->resultAddress().fieldName == RiaDefines::wbsSFGResultName().toStdString() )
{
RigFemResultAddress stressResAddr( RIG_ELEMENT_NODAL, std::string( "ST" ), "" );
RigFemResultAddress porBarResAddr( RIG_ELEMENT_NODAL, std::string( "POR-Bar" ), "" );
@@ -625,6 +625,7 @@ QString RimGeoMechResultDefinition::convertToUiResultFieldName( QString resultFi
if ( resultFieldName == "POR-Bar" ) newName = "POR"; // POR-Bar appear as POR
if ( resultFieldName == "MODULUS" ) newName = "Young's Modulus";
if ( resultFieldName == "RATIO" ) newName = "Poisson's Ratio";
if ( resultFieldName == "UCS" ) newName = "UCS bar/ 100";
return newName;
}

View File

@@ -563,6 +563,19 @@ void RimWellLogExtractionCurve::findAndLoadWbsParametersFromLasFiles( const RimW
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogExtractionCurve::setAutoNameComponents(
bool addCaseName, bool addProperty, bool addWellname, bool addTimeStep, bool addDate )
{
m_addCaseNameToCurveName = addCaseName;
m_addPropertyToCurveName = addProperty;
m_addWellNameToCurveName = addWellname;
m_addTimestepToCurveName = addTimeStep;
m_addDateToCurveName = addDate;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -86,6 +86,8 @@ public:
static void findAndLoadWbsParametersFromLasFiles( const RimWellPath* wellPath,
RigGeoMechWellLogExtractor* geomExtractor );
void setAutoNameComponents( bool addCaseName, bool addProperty, bool addWellname, bool addTimeStep, bool addDate );
protected:
QString createCurveAutoName() override;
void onLoadDataAndUpdate( bool updateParentPlot ) override;

View File

@@ -362,6 +362,22 @@ std::vector<RimWellLogTrack*> RimWellLogPlot::tracks() const
return m_tracks.childObjects();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimWellLogTrack*> RimWellLogPlot::visibleTracks() const
{
std::vector<RimWellLogTrack*> tracks;
for ( RimWellLogTrack* track : m_tracks() )
{
if ( track->isVisible() )
{
tracks.push_back( track );
}
}
return tracks;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -835,7 +851,10 @@ void RimWellLogPlot::updateTrackNames()
{
for ( size_t tIdx = 0; tIdx < m_tracks.size(); tIdx++ )
{
m_tracks[tIdx]->setDescription( QString( "Track %1" ).arg( tIdx + 1 ) );
QString description = m_tracks[tIdx]->description();
QRegularExpression regexp( "Track \\d+" );
description.replace( regexp, QString( "Track %1" ).arg( tIdx + 1 ) );
m_tracks[tIdx]->setDescription( description );
}
}

View File

@@ -105,6 +105,7 @@ public:
RimWellLogTrack* trackByIndex( size_t index ) const;
size_t firstVisibleTrackIndex() const;
std::vector<RimWellLogTrack*> tracks() const;
std::vector<RimWellLogTrack*> visibleTracks() const;
void updateTracks( bool autoScaleXAxis = false );
void updateTrackNames();

View File

@@ -1534,6 +1534,14 @@ bool RimWellLogTrack::isVisible()
return m_show;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogTrack::setVisible( bool visible )
{
m_show = visible;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -1675,6 +1683,24 @@ std::vector<RimWellLogCurve*> RimWellLogTrack::curvesVector()
return curvesVector;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimWellLogCurve*> RimWellLogTrack::visibleCurvesVector()
{
std::vector<RimWellLogCurve*> curvesVector;
for ( RimWellLogCurve* curve : curves )
{
if ( curve->isCurveVisible() )
{
curvesVector.push_back( curve );
}
}
return curvesVector;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -96,6 +96,7 @@ public:
void setDescription( const QString& description );
bool isVisible();
void setVisible( bool visible );
void addCurve( RimWellLogCurve* curve );
void insertCurve( RimWellLogCurve* curve, size_t index );
void takeOutCurve( RimWellLogCurve* curve );
@@ -175,6 +176,7 @@ public:
QString description();
std::vector<RimWellLogCurve*> curvesVector();
std::vector<RimWellLogCurve*> visibleCurvesVector();
void uiOrderingForRftPltFormations( caf::PdmUiOrdering& uiOrdering );
void uiOrderingForXAxisSettings( caf::PdmUiOrdering& uiOrdering );