#3441 Valve visualisation in 3D view.

This commit is contained in:
Gaute Lindkvist
2018-10-10 16:57:43 +02:00
parent cfbe6a1a24
commit e7a39fb2f8
17 changed files with 590 additions and 149 deletions

View File

@@ -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";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -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;

View File

@@ -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";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -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;

View File

@@ -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();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -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;

View File

@@ -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;
};

View File

@@ -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;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -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;

View File

@@ -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();
}
}
//--------------------------------------------------------------------------------------------------

View File

@@ -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;