mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3441 Valve visualisation in 3D view.
This commit is contained in:
@@ -408,6 +408,30 @@ RiaDefines::WellPathComponentType RimFishbonesMultipleSubs::componentType() cons
|
||||
return RiaDefines::FISHBONES;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFishbonesMultipleSubs::componentLabel() const
|
||||
{
|
||||
return generatedName();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFishbonesMultipleSubs::componentTypeLabel() const
|
||||
{
|
||||
return "Fishbones";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Color3f RimFishbonesMultipleSubs::defaultComponentColor() const
|
||||
{
|
||||
return fishbonesColor();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -436,22 +460,6 @@ double RimFishbonesMultipleSubs::endMD() const
|
||||
return measuredDepth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFishbonesMultipleSubs::componentLabel() const
|
||||
{
|
||||
return generatedName();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFishbonesMultipleSubs::componentTypeLabel() const
|
||||
{
|
||||
return "Fishbones";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -107,11 +107,11 @@ public:
|
||||
|
||||
// Overrides from RimWellPathCompletionsInterface
|
||||
RiaDefines::WellPathComponentType componentType() const override;
|
||||
double startMD() const override;
|
||||
double endMD() const override;
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
|
||||
cvf::Color3f defaultComponentColor() const override;
|
||||
double startMD() const override;
|
||||
double endMD() const override;
|
||||
|
||||
public:
|
||||
caf::PdmField<cvf::Color3f> fishbonesColor;
|
||||
|
||||
@@ -293,6 +293,30 @@ RiaDefines::WellPathComponentType RimFracture::componentType() const
|
||||
return RiaDefines::FRACTURE;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFracture::componentLabel() const
|
||||
{
|
||||
return name();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFracture::componentTypeLabel() const
|
||||
{
|
||||
return "Fracture";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Color3f RimFracture::defaultComponentColor() const
|
||||
{
|
||||
return cvf::Color3f(cvf::Color3::ORANGE_RED);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -323,22 +347,6 @@ double RimFracture::endMD() const
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFracture::componentLabel() const
|
||||
{
|
||||
return name();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFracture::componentTypeLabel() const
|
||||
{
|
||||
return "Fracture";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -130,10 +130,11 @@ public:
|
||||
|
||||
// RimWellPathCompletionsInterface overrides.
|
||||
RiaDefines::WellPathComponentType componentType() const override;
|
||||
double startMD() const override;
|
||||
double endMD() const override;
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
cvf::Color3f defaultComponentColor() const override;
|
||||
double startMD() const override;
|
||||
double endMD() const override;
|
||||
|
||||
protected:
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
||||
|
||||
@@ -238,22 +238,6 @@ RiaDefines::WellPathComponentType RimPerforationInterval::componentType() const
|
||||
return RiaDefines::PERFORATION_INTERVAL;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimPerforationInterval::startMD() const
|
||||
{
|
||||
return m_startMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimPerforationInterval::endMD() const
|
||||
{
|
||||
return m_endMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -270,6 +254,30 @@ QString RimPerforationInterval::componentTypeLabel() const
|
||||
return "Perforations";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Color3f RimPerforationInterval::defaultComponentColor() const
|
||||
{
|
||||
return cvf::Color3f(cvf::Color3::GREEN);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimPerforationInterval::startMD() const
|
||||
{
|
||||
return m_startMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimPerforationInterval::endMD() const
|
||||
{
|
||||
return m_endMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -68,10 +68,11 @@ public:
|
||||
|
||||
// RimWellPathCompletionInterface overrides
|
||||
RiaDefines::WellPathComponentType componentType() const override;
|
||||
double startMD() const;
|
||||
double endMD() const;
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
cvf::Color3f defaultComponentColor() const override;
|
||||
double startMD() const;
|
||||
double endMD() const;
|
||||
|
||||
protected:
|
||||
virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
|
||||
#include "RiaDefines.h"
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfColor3.h"
|
||||
|
||||
//==================================================================================================
|
||||
// Interface implemented by all well path construction components and completions
|
||||
//
|
||||
@@ -29,10 +32,11 @@ class RimWellPathComponentInterface
|
||||
{
|
||||
public:
|
||||
virtual RiaDefines::WellPathComponentType componentType() const = 0;
|
||||
virtual double startMD() const = 0;
|
||||
virtual double endMD() const = 0;
|
||||
virtual QString componentLabel() const = 0;
|
||||
virtual QString componentTypeLabel() const = 0;
|
||||
virtual cvf::Color3f defaultComponentColor() const = 0;
|
||||
virtual double startMD() const = 0;
|
||||
virtual double endMD() const = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -68,22 +68,6 @@ RiaDefines::WellPathComponentType RimWellPathValve::componentType() const
|
||||
return m_type();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimWellPathValve::startMD() const
|
||||
{
|
||||
return m_measuredDepth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimWellPathValve::endMD() const
|
||||
{
|
||||
return m_measuredDepth + 0.5;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -100,6 +84,42 @@ QString RimWellPathValve::componentTypeLabel() const
|
||||
return m_type().uiText();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Color3f RimWellPathValve::defaultComponentColor() const
|
||||
{
|
||||
switch (m_type())
|
||||
{
|
||||
case RiaDefines::ICD:
|
||||
return cvf::Color3f(cvf::Color3::DARK_BLUE);
|
||||
case RiaDefines::AICD:
|
||||
return cvf::Color3f(cvf::Color3::BROWN);
|
||||
case RiaDefines::ICV:
|
||||
return cvf::Color3f(cvf::Color3::DARK_VIOLET);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
CVF_ASSERT(false);
|
||||
return cvf::Color3f(cvf::Color3::BLACK);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimWellPathValve::startMD() const
|
||||
{
|
||||
return m_measuredDepth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimWellPathValve::endMD() const
|
||||
{
|
||||
return m_measuredDepth + 0.5;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
#include "cvfBase.h"
|
||||
#include "cafPdmField.h"
|
||||
|
||||
#include <QList>
|
||||
@@ -44,11 +43,12 @@ public:
|
||||
|
||||
// Overrides from RimWellPathCompletionInterface
|
||||
RiaDefines::WellPathComponentType componentType() const override;
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
cvf::Color3f defaultComponentColor() const override;
|
||||
double startMD() const override;
|
||||
double endMD() const override;
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
|
||||
|
||||
private:
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#include "RimWellPathAttribute.h"
|
||||
|
||||
#include "RigWellPath.h"
|
||||
|
||||
#include "RimProject.h"
|
||||
#include "RimWellPathAttributeCollection.h"
|
||||
#include "RimWellPath.h"
|
||||
|
||||
@@ -96,22 +98,6 @@ RiaDefines::WellPathComponentType RimWellPathAttribute::componentType() const
|
||||
return m_type();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimWellPathAttribute::startMD() const
|
||||
{
|
||||
return m_startMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimWellPathAttribute::endMD() const
|
||||
{
|
||||
return m_endMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -133,6 +119,42 @@ QString RimWellPathAttribute::componentTypeLabel() const
|
||||
return m_type().uiText();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Color3f RimWellPathAttribute::defaultComponentColor() const
|
||||
{
|
||||
switch (m_type())
|
||||
{
|
||||
case RiaDefines::CASING:
|
||||
return cvf::Color3::FOREST_GREEN;
|
||||
case RiaDefines::LINER:
|
||||
return cvf::Color3::OLIVE;
|
||||
case RiaDefines::PACKER:
|
||||
return cvf::Color3::GRAY;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
CVF_ASSERT(false);
|
||||
return cvf::Color3f(cvf::Color3::BLACK);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimWellPathAttribute::startMD() const
|
||||
{
|
||||
return m_startMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimWellPathAttribute::endMD() const
|
||||
{
|
||||
return m_endMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -213,6 +235,11 @@ void RimWellPathAttribute::fieldChangedByUi(const caf::PdmFieldHandle* changedFi
|
||||
this->firstAncestorOrThisOfTypeAsserted(collection);
|
||||
collection->updateAllReferringTracks();
|
||||
}
|
||||
{
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfTypeAsserted(proj);
|
||||
proj->reloadCompletionTypeResultsInAllViews();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -47,11 +47,12 @@ public:
|
||||
|
||||
// Overrides from RimWellPathCompletionInterface
|
||||
RiaDefines::WellPathComponentType componentType() const override;
|
||||
double startMD() const override;
|
||||
double endMD() const override;
|
||||
QString componentLabel() const override;
|
||||
QString componentTypeLabel() const override;
|
||||
|
||||
cvf::Color3f defaultComponentColor() const override;
|
||||
double startMD() const override;
|
||||
double endMD() const override;
|
||||
|
||||
private:
|
||||
bool isDiameterSupported() const;
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
||||
|
||||
Reference in New Issue
Block a user