mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-26 00:06:49 -06:00
#5110 Show only relevant well measurements in WBS track.
This commit is contained in:
parent
0e4f9fe114
commit
12abf6494f
@ -40,6 +40,8 @@
|
|||||||
#include "RimWellLogPlotCollection.h"
|
#include "RimWellLogPlotCollection.h"
|
||||||
#include "RimWellLogTrack.h"
|
#include "RimWellLogTrack.h"
|
||||||
#include "RimWellLogWbsCurve.h"
|
#include "RimWellLogWbsCurve.h"
|
||||||
|
#include "RimWellMeasurement.h"
|
||||||
|
#include "RimWellMeasurementCurve.h"
|
||||||
#include "RimWellPath.h"
|
#include "RimWellPath.h"
|
||||||
|
|
||||||
#include "RicWellLogTools.h"
|
#include "RicWellLogTools.h"
|
||||||
@ -322,11 +324,12 @@ void RicNewWellBoreStabilityPlotFeature::createStabilityCurvesTrack( RimWellBore
|
|||||||
curve->setSmoothingThreshold( 0.002 );
|
curve->setSmoothingThreshold( 0.002 );
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<QString> measurementNames;
|
for ( QString measurementKind : RimWellMeasurement::measurementKindsForWellBoreStability() )
|
||||||
measurementNames.push_back( "XLOT" );
|
|
||||||
for ( size_t i = 0; i < measurementNames.size(); i++ )
|
|
||||||
{
|
{
|
||||||
RicWellLogTools::addWellMeasurementCurve( stabilityCurvesTrack, wellPath, measurementNames[i] );
|
RimWellMeasurementCurve* curve = RicWellLogTools::addWellMeasurementCurve( stabilityCurvesTrack,
|
||||||
|
wellPath,
|
||||||
|
measurementKind );
|
||||||
|
curve->loadDataAndUpdate( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
stabilityCurvesTrack->setAutoScaleXEnabled( true );
|
stabilityCurvesTrack->setAutoScaleXEnabled( true );
|
||||||
|
@ -205,3 +205,9 @@ bool RimWellMeasurement::kindHasValue( const QString& measurementKind )
|
|||||||
<< "CORE";
|
<< "CORE";
|
||||||
return !valueLessKind.contains( measurementKind );
|
return !valueLessKind.contains( measurementKind );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<QString> RimWellMeasurement::measurementKindsForWellBoreStability()
|
||||||
|
{
|
||||||
|
std::vector<QString> wbsMeasurementKinds = {"XLOT", "LOT", "FIT"};
|
||||||
|
return wbsMeasurementKinds;
|
||||||
|
}
|
||||||
|
@ -55,8 +55,9 @@ public:
|
|||||||
QString remark() const;
|
QString remark() const;
|
||||||
void setRemark( const QString& remark );
|
void setRemark( const QString& remark );
|
||||||
|
|
||||||
static bool kindHasValue( const QString& measurementKind );
|
static bool kindHasValue( const QString& measurementKind );
|
||||||
static cvf::Color3f mapToColor( const QString& measurementKind );
|
static cvf::Color3f mapToColor( const QString& measurementKind );
|
||||||
|
static std::vector<QString> measurementKindsForWellBoreStability();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||||
|
@ -59,6 +59,7 @@ RimWellMeasurementCurve::RimWellMeasurementCurve()
|
|||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault( &m_measurementKind, "CurveMeasurementKind", "Measurement Kind", "", "", "" );
|
CAF_PDM_InitFieldNoDefault( &m_measurementKind, "CurveMeasurementKind", "Measurement Kind", "", "", "" );
|
||||||
m_measurementKind.uiCapability()->setUiTreeChildrenHidden( true );
|
m_measurementKind.uiCapability()->setUiTreeChildrenHidden( true );
|
||||||
|
m_measurementKind.uiCapability()->setUiHidden( true );
|
||||||
|
|
||||||
m_wellPath = nullptr;
|
m_wellPath = nullptr;
|
||||||
}
|
}
|
||||||
@ -219,7 +220,6 @@ void RimWellMeasurementCurve::defineUiOrdering( QString uiConfigName, caf::PdmUi
|
|||||||
|
|
||||||
caf::PdmUiGroup* curveDataGroup = uiOrdering.addNewGroup( "Curve Data" );
|
caf::PdmUiGroup* curveDataGroup = uiOrdering.addNewGroup( "Curve Data" );
|
||||||
curveDataGroup->add( &m_wellPath );
|
curveDataGroup->add( &m_wellPath );
|
||||||
curveDataGroup->add( &m_measurementKind );
|
|
||||||
|
|
||||||
caf::PdmUiGroup* appearanceGroup = uiOrdering.addNewGroup( "Appearance" );
|
caf::PdmUiGroup* appearanceGroup = uiOrdering.addNewGroup( "Appearance" );
|
||||||
RimPlotCurve::appearanceUiOrdering( *appearanceGroup );
|
RimPlotCurve::appearanceUiOrdering( *appearanceGroup );
|
||||||
@ -268,32 +268,9 @@ QList<caf::PdmOptionItemInfo>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( fieldNeedingOptions == &m_measurementKind )
|
|
||||||
{
|
|
||||||
if ( m_wellPath() )
|
|
||||||
{
|
|
||||||
// TODO: take all options from somewhere and filter based on
|
|
||||||
// what the current well path has set.
|
|
||||||
options.push_back( caf::PdmOptionItemInfo( "XLOT", "XLOT" ) );
|
|
||||||
options.push_back( caf::PdmOptionItemInfo( "LOT", "LOT" ) );
|
|
||||||
options.push_back( caf::PdmOptionItemInfo( "FIT", "FIT" ) );
|
|
||||||
options.push_back( caf::PdmOptionItemInfo( "DP", "DP" ) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
void RimWellMeasurementCurve::initAfterRead()
|
|
||||||
{
|
|
||||||
if ( !m_wellPath ) return;
|
|
||||||
|
|
||||||
// TODO: do something here?
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -301,11 +278,7 @@ QString RimWellMeasurementCurve::createCurveAutoName()
|
|||||||
{
|
{
|
||||||
if ( m_wellPath )
|
if ( m_wellPath )
|
||||||
{
|
{
|
||||||
QStringList name;
|
return measurementKind();
|
||||||
name.push_back( wellName() );
|
|
||||||
name.push_back( measurementKind() );
|
|
||||||
|
|
||||||
return name.join( ", " );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return "Empty curve";
|
return "Empty curve";
|
||||||
|
@ -63,7 +63,6 @@ protected:
|
|||||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||||
bool* useOptionsOnly ) override;
|
bool* useOptionsOnly ) override;
|
||||||
void initAfterRead() override;
|
|
||||||
|
|
||||||
RiuQwtSymbol::PointSymbolEnum getSymbolForMeasurementKind( const QString& measurementKind );
|
RiuQwtSymbol::PointSymbolEnum getSymbolForMeasurementKind( const QString& measurementKind );
|
||||||
cvf::Color3f getColorForMeasurementKind( const QString& measurementKind );
|
cvf::Color3f getColorForMeasurementKind( const QString& measurementKind );
|
||||||
|
Loading…
Reference in New Issue
Block a user