Add optional measured depth labels to well path

This commit is contained in:
Magne Sjaastad
2023-09-12 12:54:43 +02:00
parent 3e340361e8
commit f18eb29552
3 changed files with 46 additions and 2 deletions

View File

@@ -114,6 +114,10 @@ RimWellPath::RimWellPath()
CAF_PDM_InitField( &m_branchIndex, "SimBranchIndex", 0, "Branch" );
CAF_PDM_InitField( &m_showWellPathLabel, "ShowWellPathLabel", true, "Show Well Path Label" );
CAF_PDM_InitField( &m_measuredDepthLabelInterval,
"MeasuredDepthLabelInterval",
std::make_pair( false, 50.0 ),
"Enable Labels at Measured Depth Intervals" );
CAF_PDM_InitField( &m_showWellPath, "ShowWellPath", true, "Show Well Path" );
m_showWellPath.uiCapability()->setUiHidden( true );
@@ -647,6 +651,16 @@ void RimWellPath::setShowWellPath( bool showWellPath )
m_showWellPath = showWellPath;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::optional<double> RimWellPath::measuredDepthLabelInterval() const
{
if ( m_measuredDepthLabelInterval().first ) return m_measuredDepthLabelInterval().second;
return std::nullopt;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -699,6 +713,7 @@ void RimWellPath::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& ui
appGroup->add( &m_showWellPathLabel );
appGroup->add( &m_wellPathColor );
appGroup->add( &m_wellPathRadiusScaleFactor );
appGroup->add( &m_measuredDepthLabelInterval );
caf::PdmUiGroup* simWellGroup = uiOrdering.addNewGroup( "Simulation Well" );
simWellGroup->add( &m_simWellName );

View File

@@ -141,6 +141,8 @@ public:
bool showWellPath() const;
void setShowWellPath( bool showWellPath );
std::optional<double> measuredDepthLabelInterval() const;
cvf::Color3f wellPathColor() const;
void setWellPathColor( const cvf::Color3f& color );
@@ -199,8 +201,9 @@ private:
caf::PdmField<caf::FilePath> m_wellPathFormationFilePath;
caf::PdmField<QString> m_formationKeyInFile;
caf::PdmField<bool> m_showWellPath;
caf::PdmField<bool> m_showWellPathLabel;
caf::PdmField<bool> m_showWellPath;
caf::PdmField<bool> m_showWellPathLabel;
caf::PdmField<std::pair<bool, double>> m_measuredDepthLabelInterval;
caf::PdmField<double> m_wellPathRadiusScaleFactor;
caf::PdmField<cvf::Color3f> m_wellPathColor;