mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3467 New interface class for completions +use RiaDefines::CompletionType
This commit is contained in:
parent
f3a2521eda
commit
1019eeaa6a
@ -63,10 +63,15 @@ namespace caf
|
||||
void caf::AppEnum< RiaDefines::CompletionType >::setUp()
|
||||
{
|
||||
addItem(RiaDefines::WELL_PATH, "WELL_PATH", "Well Path");
|
||||
addItem(RiaDefines::CASING, "CASING", "Casing");
|
||||
addItem(RiaDefines::LINER, "LINER", "Liner");
|
||||
addItem(RiaDefines::PACKER, "PACKER", "Packer");
|
||||
addItem(RiaDefines::PERFORATION_INTERVAL, "PERFORATION_INTERVAL", "Perforation Interval");
|
||||
addItem(RiaDefines::FISHBONES, "FISHBONES", "Fishbones");
|
||||
addItem(RiaDefines::FRACTURE, "FRACTURE", "Fracture");
|
||||
|
||||
addItem(RiaDefines::ICD, "ICD", "ICD");
|
||||
addItem(RiaDefines::AICD, "AICD", "AICD");
|
||||
addItem(RiaDefines::ICV, "ICV", "ICV");
|
||||
setDefault(RiaDefines::WELL_PATH);
|
||||
}
|
||||
}
|
||||
|
@ -41,10 +41,18 @@ namespace RiaDefines
|
||||
};
|
||||
|
||||
enum CompletionType {
|
||||
// Well path construction features
|
||||
WELL_PATH,
|
||||
CASING,
|
||||
LINER,
|
||||
PACKER,
|
||||
// Well path flow completions
|
||||
PERFORATION_INTERVAL,
|
||||
FISHBONES,
|
||||
FRACTURE,
|
||||
ICD,
|
||||
AICD,
|
||||
ICV
|
||||
};
|
||||
|
||||
bool isPerCellFaceResult(const QString& resultName);
|
||||
|
@ -215,8 +215,8 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneLateralsWell
|
||||
|
||||
for (const auto& fishboneDefinition : wellPath->fishbonesCollection()->activeFishbonesSubs())
|
||||
{
|
||||
double startMD = fishboneDefinition->startOfSubMD();
|
||||
double endMD = fishboneDefinition->endOfSubMD();
|
||||
double startMD = fishboneDefinition->startMD();
|
||||
double endMD = fishboneDefinition->endMD();
|
||||
|
||||
if (fabs(startMD - endMD) < 1e-3)
|
||||
{
|
||||
|
@ -99,7 +99,7 @@ void RicNewWellPathAttributeFeature::setupActionLook(QAction* actionToSetup)
|
||||
caf::SelectionManager::instance()->objectsByType(&attributes, caf::SelectionManager::FIRST_LEVEL);
|
||||
if (attributes.size() == 1u)
|
||||
{
|
||||
actionToSetup->setText(QString("Insert New Attribute before %1").arg(attributes[0]->label()));
|
||||
actionToSetup->setText(QString("Insert New Attribute before %1").arg(attributes[0]->completionTypeLabel()));
|
||||
actionToSetup->setIcon(QIcon(":/Well.png"));
|
||||
}
|
||||
else
|
||||
|
@ -191,34 +191,6 @@ double RimFishbonesMultipleSubs::rotationAngle(size_t index) const
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFishbonesMultipleSubs::startOfSubMD() const
|
||||
{
|
||||
double measuredDepth = 0.0;
|
||||
if (!m_locationOfSubs().empty())
|
||||
{
|
||||
measuredDepth = m_locationOfSubs().front();
|
||||
}
|
||||
|
||||
return measuredDepth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFishbonesMultipleSubs::endOfSubMD() const
|
||||
{
|
||||
double measuredDepth = 0.0;
|
||||
if (!m_locationOfSubs().empty())
|
||||
{
|
||||
measuredDepth = m_locationOfSubs().back();
|
||||
}
|
||||
|
||||
return measuredDepth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -428,6 +400,58 @@ void RimFishbonesMultipleSubs::setUnitSystemSpecificDefaults()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaDefines::CompletionType RimFishbonesMultipleSubs::type() const
|
||||
{
|
||||
return RiaDefines::FISHBONES;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFishbonesMultipleSubs::startMD() const
|
||||
{
|
||||
double measuredDepth = 0.0;
|
||||
if (!m_locationOfSubs().empty())
|
||||
{
|
||||
measuredDepth = m_locationOfSubs().front();
|
||||
}
|
||||
|
||||
return measuredDepth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFishbonesMultipleSubs::endMD() const
|
||||
{
|
||||
double measuredDepth = 0.0;
|
||||
if (!m_locationOfSubs().empty())
|
||||
{
|
||||
measuredDepth = m_locationOfSubs().back();
|
||||
}
|
||||
|
||||
return measuredDepth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFishbonesMultipleSubs::completionLabel() const
|
||||
{
|
||||
return generatedName();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFishbonesMultipleSubs::completionTypeLabel() const
|
||||
{
|
||||
return "Fishbones";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -18,11 +18,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "RimCheckableNamedObject.h"
|
||||
#include "Rim3dPropertiesInterface.h"
|
||||
#include "RimFishbonesPipeProperties.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RimWellPathCompletionInterface.h"
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfVector3.h"
|
||||
@ -51,7 +52,7 @@ struct SubLateralIndex {
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimFishbonesMultipleSubs : public caf::PdmObject, public Rim3dPropertiesInterface
|
||||
class RimFishbonesMultipleSubs : public caf::PdmObject, public Rim3dPropertiesInterface, public RimWellPathCompletionInterface
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
@ -81,9 +82,6 @@ public:
|
||||
double measuredDepth(size_t subIndex) const;
|
||||
double rotationAngle(size_t subIndex) const;
|
||||
|
||||
double startOfSubMD() const;
|
||||
double endOfSubMD() const;
|
||||
|
||||
double exitAngle() const;
|
||||
double buildAngle() const;
|
||||
|
||||
@ -107,6 +105,14 @@ public:
|
||||
// Override from Rim3dPropertiesInterface
|
||||
virtual cvf::BoundingBox boundingBoxInDomainCoords() const override;
|
||||
|
||||
// Overrides from RimWellPathCompletionsInterface
|
||||
virtual RiaDefines::CompletionType type() const override;
|
||||
virtual double startMD() const override;
|
||||
virtual double endMD() const override;
|
||||
virtual QString completionLabel() const override;
|
||||
virtual QString completionTypeLabel() const override;
|
||||
|
||||
|
||||
public:
|
||||
caf::PdmField<cvf::Color3f> fishbonesColor;
|
||||
|
||||
|
@ -285,6 +285,60 @@ void RimFracture::clearCachedNonDarcyProperties()
|
||||
m_cachedFractureProperties = NonDarcyData();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaDefines::CompletionType RimFracture::type() const
|
||||
{
|
||||
return RiaDefines::FRACTURE;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFracture::startMD() const
|
||||
{
|
||||
if (fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH)
|
||||
{
|
||||
return fractureMD() - 0.5*perforationLength();
|
||||
}
|
||||
else
|
||||
{
|
||||
return fractureMD();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFracture::endMD() const
|
||||
{
|
||||
if (fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH)
|
||||
{
|
||||
return startMD() + perforationLength();
|
||||
}
|
||||
else
|
||||
{
|
||||
return startMD() + fractureTemplate()->computeFractureWidth(this);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFracture::completionLabel() const
|
||||
{
|
||||
return name();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFracture::completionTypeLabel() const
|
||||
{
|
||||
return "Fracture";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "Rim3dPropertiesInterface.h"
|
||||
#include "RimCheckableNamedObject.h"
|
||||
#include "RimWellPathCompletionInterface.h"
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfObject.h"
|
||||
@ -73,7 +74,7 @@ public:
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimFracture : public RimCheckableNamedObject, public Rim3dPropertiesInterface
|
||||
class RimFracture : public RimCheckableNamedObject, public Rim3dPropertiesInterface, public RimWellPathCompletionInterface
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
@ -127,6 +128,13 @@ public:
|
||||
|
||||
friend class RimFractureTemplate;
|
||||
|
||||
// RimWellPathCompletionsInterface overrides.
|
||||
virtual RiaDefines::CompletionType type() const override;
|
||||
virtual double startMD() const override;
|
||||
virtual double endMD() const override;
|
||||
virtual QString completionLabel() const override;
|
||||
virtual QString completionTypeLabel() const override;
|
||||
|
||||
protected:
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
|
@ -127,22 +127,6 @@ void RimPerforationInterval::setSkinFactor(double skinFactor)
|
||||
m_skinFactor = skinFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimPerforationInterval::startMD() const
|
||||
{
|
||||
return m_startMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimPerforationInterval::endMD() const
|
||||
{
|
||||
return m_endMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -221,6 +205,46 @@ void RimPerforationInterval::setUnitSystemSpecificDefaults()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaDefines::CompletionType RimPerforationInterval::type() const
|
||||
{
|
||||
return RiaDefines::PERFORATION_INTERVAL;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimPerforationInterval::startMD() const
|
||||
{
|
||||
return m_startMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimPerforationInterval::endMD() const
|
||||
{
|
||||
return m_endMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimPerforationInterval::completionLabel() const
|
||||
{
|
||||
return QString("Perforation Interval\n%1").arg(name());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimPerforationInterval::completionTypeLabel() const
|
||||
{
|
||||
return "Perforations";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include "RimCheckableNamedObject.h"
|
||||
#include "Rim3dPropertiesInterface.h"
|
||||
#include "RimWellPathCompletionInterface.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
@ -32,7 +33,7 @@
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimPerforationInterval : public RimCheckableNamedObject, public Rim3dPropertiesInterface
|
||||
class RimPerforationInterval : public RimCheckableNamedObject, public Rim3dPropertiesInterface, public RimWellPathCompletionInterface
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
public:
|
||||
@ -50,8 +51,6 @@ public:
|
||||
|
||||
void setDiameter(double diameter);
|
||||
void setSkinFactor(double skinFactor);
|
||||
double startMD() const;
|
||||
double endMD() const;
|
||||
double diameter(RiaEclipseUnitTools::UnitSystem unitSystem) const;
|
||||
double skinFactor() const;
|
||||
|
||||
@ -61,6 +60,13 @@ public:
|
||||
|
||||
void setUnitSystemSpecificDefaults();
|
||||
|
||||
// RimWellPathCompletionInterface overrides
|
||||
virtual RiaDefines::CompletionType type() const override;
|
||||
virtual double startMD() const;
|
||||
virtual double endMD() const;
|
||||
virtual QString completionLabel() const override;
|
||||
virtual QString completionTypeLabel() const override;
|
||||
|
||||
protected:
|
||||
virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
@ -0,0 +1,38 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2018 Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaDefines.h"
|
||||
|
||||
//==================================================================================================
|
||||
// Interface implemented by all well path completions
|
||||
//
|
||||
//
|
||||
//==================================================================================================
|
||||
class RimWellPathCompletionInterface
|
||||
{
|
||||
public:
|
||||
virtual RiaDefines::CompletionType type() const = 0;
|
||||
virtual double startMD() const = 0;
|
||||
virtual double endMD() const = 0;
|
||||
virtual QString completionLabel() const = 0;
|
||||
virtual QString completionTypeLabel() const = 0;
|
||||
};
|
||||
|
||||
|
@ -22,8 +22,12 @@
|
||||
|
||||
#include "RimFishbonesCollection.h"
|
||||
#include "RimFishboneWellPathCollection.h"
|
||||
#include "RimFishbonesMultipleSubs.h"
|
||||
#include "RimPerforationCollection.h"
|
||||
#include "RimPerforationInterval.h"
|
||||
#include "RimWellPathFractureCollection.h"
|
||||
#include "RimWellPathFracture.h"
|
||||
#include "RimWellPathCompletionInterface.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
|
||||
@ -165,6 +169,29 @@ RimWellPathFractureCollection* RimWellPathCompletions::fractureCollection() cons
|
||||
return m_fractureCollection;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<const RimWellPathCompletionInterface*> RimWellPathCompletions::allCompletions() const
|
||||
{
|
||||
std::vector<const RimWellPathCompletionInterface*> completions;
|
||||
|
||||
for (const RimWellPathFracture* fracture : fractureCollection()->allFractures())
|
||||
{
|
||||
completions.push_back(fracture);
|
||||
}
|
||||
for (const RimFishbonesMultipleSubs* fishbones : fishbonesCollection()->allFishbonesSubs())
|
||||
{
|
||||
completions.push_back(fishbones);
|
||||
}
|
||||
for (const RimPerforationInterval* perforation : perforationCollection()->perforations())
|
||||
{
|
||||
completions.push_back(perforation);
|
||||
}
|
||||
|
||||
return completions;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -25,6 +25,7 @@
|
||||
class RimFishbonesCollection;
|
||||
class RimPerforationCollection;
|
||||
class RimWellPathFractureCollection;
|
||||
class RimWellPathCompletionInterface;
|
||||
|
||||
|
||||
//==================================================================================================
|
||||
@ -45,6 +46,8 @@ public:
|
||||
RimPerforationCollection* perforationCollection() const;
|
||||
RimWellPathFractureCollection* fractureCollection() const;
|
||||
|
||||
std::vector<const RimWellPathCompletionInterface*> allCompletions() const;
|
||||
|
||||
void setWellNameForExport(const QString& name);
|
||||
QString wellNameForExport() const;
|
||||
QString wellGroupNameForExport() const;
|
||||
|
@ -1819,7 +1819,6 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
||||
|
||||
if (m_wellPathAttributeCollection)
|
||||
{
|
||||
|
||||
std::vector<RimWellPathAttribute*> attributes = m_wellPathAttributeCollection->attributes();
|
||||
std::sort(attributes.begin(), attributes.end(), [](const RimWellPathAttribute* lhs, const RimWellPathAttribute* rhs)
|
||||
{
|
||||
@ -1833,27 +1832,11 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
||||
}
|
||||
if (m_showWellPathAttributesFromCompletions())
|
||||
{
|
||||
const RimWellPathCompletions* completions = wellPathAttributeSource()->completions();
|
||||
const RimWellPathCompletions* completionsCollection = wellPathAttributeSource()->completions();
|
||||
std::vector<const RimWellPathCompletionInterface*> allCompletions = completionsCollection->allCompletions();
|
||||
for (const RimWellPathCompletionInterface* completion : allCompletions)
|
||||
{
|
||||
RimPerforationCollection* perforationsCollection = completions->perforationCollection();
|
||||
for (const RimPerforationInterval* perforationInterval : perforationsCollection->perforations())
|
||||
{
|
||||
m_wellPathAttributePlotObjects.push_back(new RiuWellPathAttributePlotObject(wellPathAttributeSource(), perforationInterval));
|
||||
}
|
||||
}
|
||||
{
|
||||
RimFishbonesCollection* fishbonesCollection = completions->fishbonesCollection();
|
||||
for (const RimFishbonesMultipleSubs* fishbones : fishbonesCollection->activeFishbonesSubs())
|
||||
{
|
||||
m_wellPathAttributePlotObjects.push_back(new RiuWellPathAttributePlotObject(wellPathAttributeSource(), fishbones));
|
||||
}
|
||||
}
|
||||
{
|
||||
RimWellPathFractureCollection* fractureCollection = completions->fractureCollection();
|
||||
for (const RimFracture* fracture : fractureCollection->activeFractures())
|
||||
{
|
||||
m_wellPathAttributePlotObjects.push_back(new RiuWellPathAttributePlotObject(wellPathAttributeSource(), fracture));
|
||||
}
|
||||
m_wellPathAttributePlotObjects.push_back(new RiuWellPathAttributePlotObject(wellPathAttributeSource(), completion));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1866,7 +1849,7 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
||||
for (cvf::ref<RiuWellPathAttributePlotObject> attributePlotObject : m_wellPathAttributePlotObjects)
|
||||
{
|
||||
cvf::Color3f attributeColor = cvf::Color3::LIGHT_GRAY;
|
||||
if (attributePlotObject->attributeType() != RimWellPathAttribute::AttributeWellTube)
|
||||
if (attributePlotObject->completionType() != RiaDefines::WELL_PATH)
|
||||
{
|
||||
attributeColor = RiaColorTables::wellLogPlotPaletteColors().cycledColor3f(++index);
|
||||
}
|
||||
@ -1877,9 +1860,10 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
||||
bool contributeToLegend = m_wellPathAttributesInLegend() &&
|
||||
!attributesAssignedToLegend.count(legendTitle);
|
||||
attributePlotObject->setContributeToLegend(contributeToLegend);
|
||||
attributesAssignedToLegend.insert(legendTitle);
|
||||
attributePlotObject->loadDataAndUpdate(false);
|
||||
attributePlotObject->setParentQwtPlotNoReplot(m_wellLogTrackPlotWidget);
|
||||
|
||||
attributesAssignedToLegend.insert(legendTitle);
|
||||
}
|
||||
}
|
||||
applyXZoomFromVisibleRange();
|
||||
|
@ -27,18 +27,6 @@
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimWellPathAttribute, "WellPathAttribute");
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template<>
|
||||
void caf::AppEnum<RimWellPathAttribute::AttributeType>::setUp()
|
||||
{
|
||||
addItem(RimWellPathAttribute::AttributeCasing, "CASING", "Casing");
|
||||
addItem(RimWellPathAttribute::AttributeLiner, "LINER", "Liner");
|
||||
addItem(RimWellPathAttribute::AttributePacker, "PACKER", "Packer");
|
||||
setDefault(RimWellPathAttribute::AttributeCasing);
|
||||
}
|
||||
}
|
||||
|
||||
double RimWellPathAttribute::MAX_DIAMETER_IN_INCHES = 30.0;
|
||||
double RimWellPathAttribute::MIN_DIAMETER_IN_INCHES = 7.0;
|
||||
|
||||
@ -48,10 +36,11 @@ double RimWellPathAttribute::MIN_DIAMETER_IN_INCHES = 7.0;
|
||||
RimWellPathAttribute::RimWellPathAttribute()
|
||||
{
|
||||
CAF_PDM_InitObject("RimWellPathAttribute", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_type, "AttributeType", "Type ", "", "", "");
|
||||
CAF_PDM_InitField(&m_depthStart, "DepthStart", -1.0, "Start MD", "", "", "");
|
||||
CAF_PDM_InitField(&m_depthEnd, "DepthEnd", -1.0, "End MD", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_type, "CompletionType", "Type ", "", "", "");
|
||||
CAF_PDM_InitField(&m_startMD, "DepthStart", -1.0, "Start MD", "", "", "");
|
||||
CAF_PDM_InitField(&m_endMD, "DepthEnd", -1.0, "End MD", "", "", "");
|
||||
CAF_PDM_InitField(&m_diameterInInches, "DiameterInInches", MAX_DIAMETER_IN_INCHES, "Diameter", "", "", "");
|
||||
m_type = RiaDefines::CASING;
|
||||
m_diameterInInches.uiCapability()->setUiEditorTypeName(caf::PdmUiComboBoxEditor::uiEditorTypeName());
|
||||
}
|
||||
|
||||
@ -62,31 +51,6 @@ RimWellPathAttribute::~RimWellPathAttribute()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellPathAttribute::AttributeType RimWellPathAttribute::type() const
|
||||
{
|
||||
return m_type();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimWellPathAttribute::depthStart() const
|
||||
{
|
||||
return m_depthStart();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimWellPathAttribute::depthEnd() const
|
||||
{
|
||||
return m_depthEnd();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -95,63 +59,6 @@ double RimWellPathAttribute::diameterInInches() const
|
||||
return m_diameterInInches;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimWellPathAttribute::label() const
|
||||
{
|
||||
QString fullLabel = typeLabel(m_type());
|
||||
if (m_type() == AttributeCasing || m_type() == AttributeLiner)
|
||||
{
|
||||
fullLabel += QString(" %1").arg(diameterLabel());
|
||||
}
|
||||
return fullLabel;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimWellPathAttribute::typeLabel(AttributeType type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case AttributeCasing:
|
||||
return QString("Casing");
|
||||
break;
|
||||
case AttributeLiner:
|
||||
return QString("Liner");
|
||||
break;
|
||||
case AttributePacker:
|
||||
return QString("Packer");
|
||||
break;
|
||||
case AttributeWellTube:
|
||||
return QString("Production Tube");
|
||||
break;
|
||||
case AttributeFracture:
|
||||
return QString("Fracture");
|
||||
break;
|
||||
case AttributePerforationInterval:
|
||||
return QString("Perforations");
|
||||
break;
|
||||
case AttributeFishbonesInterval:
|
||||
return QString("Fishbones");
|
||||
break;
|
||||
case AttributeAICD:
|
||||
return QString("AICD");
|
||||
break;
|
||||
case AttributeICD:
|
||||
return QString("ICD");
|
||||
break;
|
||||
case AttributeICV:
|
||||
return QString("ICV");
|
||||
break;
|
||||
default:
|
||||
CVF_ASSERT(false);
|
||||
return QString("UNKNOWN TYPE");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -169,7 +76,7 @@ bool RimWellPathAttribute::operator<(const RimWellPathAttribute& rhs) const
|
||||
{
|
||||
return type() < rhs.type();
|
||||
}
|
||||
return depthEnd() > rhs.depthEnd();
|
||||
return endMD() > rhs.endMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -177,8 +84,61 @@ bool RimWellPathAttribute::operator<(const RimWellPathAttribute& rhs) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathAttribute::setDepthsFromWellPath(const RimWellPath* wellPath)
|
||||
{
|
||||
m_depthStart = wellPath->wellPathGeometry()->measureDepths().front();
|
||||
m_depthEnd = wellPath->wellPathGeometry()->measureDepths().back();
|
||||
m_startMD = wellPath->wellPathGeometry()->measureDepths().front();
|
||||
m_endMD = wellPath->wellPathGeometry()->measureDepths().back();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaDefines::CompletionType RimWellPathAttribute::type() const
|
||||
{
|
||||
return m_type();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimWellPathAttribute::startMD() const
|
||||
{
|
||||
return m_startMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimWellPathAttribute::endMD() const
|
||||
{
|
||||
return m_endMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimWellPathAttribute::completionLabel() const
|
||||
{
|
||||
QString fullLabel = completionTypeLabel();
|
||||
if (m_type() == RiaDefines::CASING || m_type() == RiaDefines::LINER)
|
||||
{
|
||||
fullLabel += QString(" %1").arg(diameterLabel());
|
||||
}
|
||||
return fullLabel;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimWellPathAttribute::completionTypeLabel() const
|
||||
{
|
||||
return m_type().uiText();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellPathAttribute::isDiameterSupported() const
|
||||
{
|
||||
return m_type() == RiaDefines::CASING || m_type() == RiaDefines::LINER;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -187,9 +147,17 @@ void RimWellPathAttribute::setDepthsFromWellPath(const RimWellPath* wellPath)
|
||||
QList<caf::PdmOptionItemInfo> RimWellPathAttribute::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly)
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
if (fieldNeedingOptions == &m_diameterInInches)
|
||||
if (fieldNeedingOptions == &m_type)
|
||||
{
|
||||
if (m_type() == AttributeCasing || m_type() == AttributeLiner)
|
||||
std::set<RiaDefines::CompletionType> supportedTypes = { RiaDefines::CASING, RiaDefines::LINER, RiaDefines::PACKER };
|
||||
for (RiaDefines::CompletionType type : supportedTypes)
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(CompletionTypeEnum::uiText(type), type));
|
||||
}
|
||||
}
|
||||
else if (fieldNeedingOptions == &m_diameterInInches)
|
||||
{
|
||||
if (isDiameterSupported())
|
||||
{
|
||||
std::vector<double> values = { MAX_DIAMETER_IN_INCHES, 22.0, 20.0, 18.0 + 5.0 / 8.0, 16.0, 14.0, 13.0 + 3.0 / 8.0, 10.0 + 3.0 / 4.0, 9.0 + 7.0 / 8.0, 9.0 + 5.0 / 8.0, MIN_DIAMETER_IN_INCHES };
|
||||
|
||||
@ -232,11 +200,11 @@ void RimWellPathAttribute::fieldChangedByUi(const caf::PdmFieldHandle* changedFi
|
||||
{
|
||||
if (changedField == &m_type)
|
||||
{
|
||||
if (m_type() == AttributeCasing)
|
||||
if (m_type() == RiaDefines::CASING)
|
||||
{
|
||||
RimWellPath* wellPath = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted(wellPath);
|
||||
m_depthStart = wellPath->wellPathGeometry()->measureDepths().front();
|
||||
m_startMD = wellPath->wellPathGeometry()->measureDepths().front();
|
||||
}
|
||||
}
|
||||
|
||||
@ -252,11 +220,10 @@ void RimWellPathAttribute::fieldChangedByUi(const caf::PdmFieldHandle* changedFi
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathAttribute::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
bool startDepthAvailable = m_type() != AttributeCasing;
|
||||
bool startDepthAvailable = m_type() != RiaDefines::CASING;
|
||||
bool endDepthAvailable = true;
|
||||
bool diameterAvailable = m_type() == AttributeCasing || m_type() == AttributeLiner;
|
||||
|
||||
m_depthStart.uiCapability()->setUiReadOnly(!startDepthAvailable);
|
||||
m_depthEnd.uiCapability()->setUiReadOnly(!endDepthAvailable);
|
||||
m_diameterInInches.uiCapability()->setUiReadOnly(!diameterAvailable);
|
||||
m_startMD.uiCapability()->setUiReadOnly(!startDepthAvailable);
|
||||
m_endMD.uiCapability()->setUiReadOnly(!endDepthAvailable);
|
||||
m_diameterInInches.uiCapability()->setUiReadOnly(!isDiameterSupported());
|
||||
}
|
||||
|
@ -17,6 +17,8 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
#pragma once
|
||||
|
||||
#include "RimWellPathCompletionInterface.h"
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
@ -27,54 +29,41 @@
|
||||
|
||||
class RimWellPath;
|
||||
|
||||
class RimWellPathAttribute : public caf::PdmObject
|
||||
class RimWellPathAttribute : public caf::PdmObject, public RimWellPathCompletionInterface
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
public:
|
||||
static double MAX_DIAMETER_IN_INCHES;
|
||||
static double MIN_DIAMETER_IN_INCHES;
|
||||
|
||||
enum AttributeType
|
||||
{
|
||||
// Visible and selectable attributes
|
||||
AttributeCasing,
|
||||
AttributeLiner,
|
||||
AttributePacker,
|
||||
// Attribute types generated from well path and completions
|
||||
AttributeWellTube,
|
||||
AttributeFracture,
|
||||
AttributePerforationInterval,
|
||||
AttributeFishbonesInterval,
|
||||
AttributeAICD,
|
||||
AttributeICD,
|
||||
AttributeICV
|
||||
};
|
||||
typedef caf::AppEnum<AttributeType> AttributeTypeEnum;
|
||||
typedef caf::AppEnum<RiaDefines::CompletionType> CompletionTypeEnum;
|
||||
|
||||
RimWellPathAttribute();
|
||||
~RimWellPathAttribute();
|
||||
|
||||
AttributeType type() const;
|
||||
double depthStart() const;
|
||||
double depthEnd() const;
|
||||
double diameterInInches() const;
|
||||
QString label() const;
|
||||
static QString typeLabel(AttributeType type);
|
||||
QString diameterLabel() const;
|
||||
bool operator<(const RimWellPathAttribute& rhs) const;
|
||||
void setDepthsFromWellPath(const RimWellPath* wellPath);
|
||||
|
||||
// Overrides from RimWellPathCompletionInterface
|
||||
virtual RiaDefines::CompletionType type() const override;
|
||||
virtual double startMD() const override;
|
||||
virtual double endMD() const override;
|
||||
virtual QString completionLabel() const override;
|
||||
virtual QString completionTypeLabel() const override;
|
||||
|
||||
private:
|
||||
bool isDiameterSupported() const;
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
||||
static QString generateInchesLabel(double diameter);
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
static QString generateInchesLabel(double diameter);
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
|
||||
private:
|
||||
caf::PdmField<AttributeTypeEnum> m_type;
|
||||
caf::PdmField<double> m_depthStart;
|
||||
caf::PdmField<double> m_depthEnd;
|
||||
caf::PdmField<double> m_diameterInInches;
|
||||
caf::PdmField<CompletionTypeEnum> m_type;
|
||||
caf::PdmField<double> m_startMD;
|
||||
caf::PdmField<double> m_endMD;
|
||||
caf::PdmField<double> m_diameterInInches;
|
||||
};
|
||||
|
||||
|
||||
|
@ -44,7 +44,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuWellPathAttributePlotObject::RiuWellPathAttributePlotObject(const RimWellPath* wellPath)
|
||||
: m_wellPath(wellPath)
|
||||
, m_attributeType(RimWellPathAttribute::AttributeWellTube)
|
||||
, m_completionType(RiaDefines::WELL_PATH)
|
||||
, m_depthType(RimWellLogPlot::MEASURED_DEPTH)
|
||||
, m_baseColor(cvf::Color4f(cvf::Color3::BLACK))
|
||||
, m_showLabel(false)
|
||||
@ -60,93 +60,15 @@ RiuWellPathAttributePlotObject::RiuWellPathAttributePlotObject(const RimWellPath
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuWellPathAttributePlotObject::RiuWellPathAttributePlotObject(const RimWellPath* wellPath,
|
||||
const RimWellPathAttribute* wellPathAttribute)
|
||||
: m_wellPath(wellPath)
|
||||
, m_attributeType(RimWellPathAttribute::AttributeCasing)
|
||||
, m_startMD(0.0)
|
||||
, m_endMD(0.0)
|
||||
, m_depthType(RimWellLogPlot::MEASURED_DEPTH)
|
||||
, m_baseColor(cvf::Color4f(cvf::Color3::BLACK))
|
||||
, m_showLabel(false)
|
||||
RiuWellPathAttributePlotObject::RiuWellPathAttributePlotObject(const RimWellPath* wellPath, const RimWellPathCompletionInterface* completion)
|
||||
{
|
||||
CVF_ASSERT(wellPathAttribute);
|
||||
if (wellPathAttribute)
|
||||
{
|
||||
m_attributeType = wellPathAttribute->type();
|
||||
m_startMD = wellPathAttribute->depthStart();
|
||||
m_endMD = wellPathAttribute->depthEnd();
|
||||
m_label = wellPathAttribute->label();
|
||||
m_legendTitle = wellPathAttribute->label();
|
||||
}
|
||||
}
|
||||
CVF_ASSERT(wellPath && completion);
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuWellPathAttributePlotObject::RiuWellPathAttributePlotObject(
|
||||
const RimWellPath* wellPath,
|
||||
const RimPerforationInterval* perforationInterval)
|
||||
: m_wellPath(wellPath)
|
||||
, m_attributeType(RimWellPathAttribute::AttributePerforationInterval)
|
||||
, m_depthType(RimWellLogPlot::MEASURED_DEPTH)
|
||||
, m_baseColor(cvf::Color4f(cvf::Color3::BLACK))
|
||||
, m_showLabel(false)
|
||||
{
|
||||
CVF_ASSERT(wellPath && perforationInterval);
|
||||
|
||||
m_startMD = perforationInterval->startMD();
|
||||
m_endMD = perforationInterval->endMD();
|
||||
m_label = QString("Perforation Interval\n%1").arg(perforationInterval->name());
|
||||
m_legendTitle = "Perforations";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuWellPathAttributePlotObject::RiuWellPathAttributePlotObject(
|
||||
const RimWellPath* wellPath,
|
||||
const RimFishbonesMultipleSubs* fishbones)
|
||||
: m_wellPath(wellPath)
|
||||
, m_attributeType(RimWellPathAttribute::AttributeFishbonesInterval)
|
||||
, m_depthType(RimWellLogPlot::MEASURED_DEPTH)
|
||||
, m_baseColor(cvf::Color4f(cvf::Color3::BLACK))
|
||||
, m_showLabel(false)
|
||||
{
|
||||
CVF_ASSERT(wellPath && fishbones);
|
||||
|
||||
m_startMD = fishbones->startOfSubMD();
|
||||
m_endMD = fishbones->endOfSubMD();
|
||||
m_label = fishbones->generatedName();
|
||||
m_legendTitle = "Fishbones";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuWellPathAttributePlotObject::RiuWellPathAttributePlotObject(
|
||||
const RimWellPath* wellPath,
|
||||
const RimFracture* fracture)
|
||||
: m_wellPath(wellPath)
|
||||
, m_attributeType(RimWellPathAttribute::AttributeFracture)
|
||||
, m_depthType(RimWellLogPlot::MEASURED_DEPTH)
|
||||
, m_baseColor(cvf::Color4f(cvf::Color3::BLACK))
|
||||
, m_showLabel(false)
|
||||
{
|
||||
CVF_ASSERT(wellPath && fracture);
|
||||
|
||||
if (fracture->fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH)
|
||||
{
|
||||
m_startMD = fracture->fractureMD() - 0.5*fracture->perforationLength();
|
||||
m_endMD = m_startMD + fracture->perforationLength();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_startMD = fracture->fractureMD();
|
||||
m_endMD = m_startMD + fracture->fractureTemplate()->computeFractureWidth(fracture);
|
||||
}
|
||||
m_label = fracture->name();
|
||||
m_legendTitle = "Fracture";
|
||||
m_completionType = completion->type();
|
||||
m_startMD = completion->startMD();
|
||||
m_endMD = completion->endMD();
|
||||
m_label = completion->completionLabel();
|
||||
m_legendTitle = completion->completionTypeLabel();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -181,9 +103,9 @@ void RiuWellPathAttributePlotObject::loadDataAndUpdate(bool updateParentPlot)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellPathAttribute::AttributeType RiuWellPathAttributePlotObject::attributeType() const
|
||||
RiaDefines::CompletionType RiuWellPathAttributePlotObject::completionType() const
|
||||
{
|
||||
return m_attributeType;
|
||||
return m_completionType;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -199,24 +121,24 @@ void RiuWellPathAttributePlotObject::onLoadDataAndUpdate(bool updateParentPlot)
|
||||
|
||||
cvf::Color4f transparentBaseColor = m_baseColor;
|
||||
transparentBaseColor.a() = 0.0;
|
||||
if (m_attributeType == RimWellPathAttribute::AttributeWellTube)
|
||||
if (m_completionType == RiaDefines::WELL_PATH)
|
||||
{
|
||||
addColumnFeature(-0.25, 0.25, startDepth, endDepth, m_baseColor);
|
||||
}
|
||||
else if (m_attributeType == RimWellPathAttribute::AttributeCasing)
|
||||
else if (m_completionType == RiaDefines::CASING)
|
||||
{
|
||||
addColumnFeature(-0.75, -0.5, startDepth, endDepth, m_baseColor);
|
||||
addColumnFeature(0.5, 0.75, startDepth, endDepth, m_baseColor);
|
||||
addMarker(-0.75, endDepth,10, RiuQwtSymbol::SYMBOL_LEFT_ANGLED_TRIANGLE, m_baseColor);
|
||||
addMarker(0.75, endDepth, 10, RiuQwtSymbol::SYMBOL_RIGHT_ANGLED_TRIANGLE, m_baseColor, label());
|
||||
}
|
||||
else if (m_attributeType == RimWellPathAttribute::AttributeLiner)
|
||||
else if (m_completionType == RiaDefines::LINER)
|
||||
{
|
||||
addColumnFeature(-0.5, -0.25, startDepth, endDepth, m_baseColor);
|
||||
addColumnFeature(0.25, 0.5, startDepth, endDepth, m_baseColor);
|
||||
addMarker(0.75, endDepth, 10, RiuQwtSymbol::SYMBOL_RIGHT_ANGLED_TRIANGLE, transparentBaseColor, label());
|
||||
}
|
||||
else if (m_attributeType == RimWellPathAttribute::AttributePerforationInterval)
|
||||
else if (m_completionType == RiaDefines::PERFORATION_INTERVAL)
|
||||
{
|
||||
addColumnFeature(-0.75, -0.25, startDepth, endDepth, cvf::Color4f(cvf::Color3::WHITE, columnAlpha), Qt::Dense6Pattern);
|
||||
addColumnFeature(0.25, 0.75, startDepth, endDepth, cvf::Color4f(cvf::Color3::WHITE, columnAlpha), Qt::Dense6Pattern);
|
||||
@ -240,13 +162,13 @@ void RiuWellPathAttributePlotObject::onLoadDataAndUpdate(bool updateParentPlot)
|
||||
m_combinedAttributeGroup.addLegendItem(legendItem1);
|
||||
m_combinedAttributeGroup.addLegendItem(legendItem2);
|
||||
}
|
||||
else if (m_attributeType == RimWellPathAttribute::AttributeFishbonesInterval)
|
||||
else if (m_completionType == RiaDefines::FISHBONES)
|
||||
{
|
||||
addColumnFeature(-0.75, -0.25, startDepth, endDepth, cvf::Color4f(cvf::Color3::WHITE, columnAlpha), Qt::BDiagPattern);
|
||||
addColumnFeature(0.25, 0.75, startDepth, endDepth, cvf::Color4f(cvf::Color3::WHITE, columnAlpha), Qt::FDiagPattern);
|
||||
addMarker(0.75, midDepth, 10, RiuQwtSymbol::SYMBOL_RIGHT_ANGLED_TRIANGLE, cvf::Color4f(cvf::Color3::BLACK, 0.0f), label());
|
||||
}
|
||||
else if (m_attributeType == RimWellPathAttribute::AttributeFracture)
|
||||
else if (m_completionType == RiaDefines::FRACTURE)
|
||||
{
|
||||
addColumnFeature(-0.75, -0.25, startDepth, endDepth, cvf::Color4f(cvf::Color3::ORANGE_RED, columnAlpha), Qt::SolidPattern);
|
||||
addColumnFeature(0.25, 0.75, startDepth, endDepth, cvf::Color4f(cvf::Color3::ORANGE_RED, columnAlpha), Qt::SolidPattern);
|
||||
@ -254,11 +176,11 @@ void RiuWellPathAttributePlotObject::onLoadDataAndUpdate(bool updateParentPlot)
|
||||
addMarker(0.75, endDepth, 10, RiuQwtSymbol::SYMBOL_NONE, cvf::Color4f(cvf::Color3::ORANGE_RED, 1.0f), "", Qt::AlignTop | Qt::AlignRight, Qt::Horizontal, true);
|
||||
addMarker(0.75, startDepth, 1, RiuQwtSymbol::SYMBOL_RIGHT_ANGLED_TRIANGLE, cvf::Color4f(cvf::Color3::ORANGE_RED, 0.0f), label(), Qt::AlignTop | Qt::AlignRight);
|
||||
}
|
||||
else if (m_attributeType == RimWellPathAttribute::AttributeICD)
|
||||
else if (m_completionType == RiaDefines::ICD)
|
||||
{
|
||||
addMarker(0.0, startDepth, 30, RiuQwtSymbol::SYMBOL_ELLIPSE, m_baseColor, label(), Qt::AlignCenter, Qt::Horizontal);
|
||||
}
|
||||
else if (m_attributeType == RimWellPathAttribute::AttributePacker)
|
||||
else if (m_completionType == RiaDefines::PACKER)
|
||||
{
|
||||
addColumnFeature(-1.0, -0.25, startDepth, endDepth, cvf::Color4f(cvf::Color3::GRAY, 1.0f), Qt::DiagCrossPattern);
|
||||
addColumnFeature(0.25, 1.0, startDepth, endDepth, cvf::Color4f(cvf::Color3::GRAY, 1.0f), Qt::DiagCrossPattern);
|
||||
@ -463,10 +385,10 @@ void RiuWellPathAttributePlotObject::setBaseColor(const cvf::Color4f& baseColor)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuWellPathAttributePlotObject::setContributeToLegend(bool contributeToLegend)
|
||||
{
|
||||
bool actuallyContributeToLegend = contributeToLegend && (m_attributeType == RimWellPathAttribute::AttributeFishbonesInterval ||
|
||||
m_attributeType == RimWellPathAttribute::AttributeFracture ||
|
||||
m_attributeType == RimWellPathAttribute::AttributePerforationInterval ||
|
||||
m_attributeType == RimWellPathAttribute::AttributePacker);
|
||||
bool actuallyContributeToLegend = contributeToLegend && (m_completionType == RiaDefines::FISHBONES ||
|
||||
m_completionType == RiaDefines::FRACTURE ||
|
||||
m_completionType == RiaDefines::PERFORATION_INTERVAL ||
|
||||
m_completionType == RiaDefines::PACKER);
|
||||
m_combinedAttributeGroup.setItemAttribute(QwtPlotItem::Legend, actuallyContributeToLegend);
|
||||
}
|
||||
|
||||
|
@ -18,11 +18,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaDefines.h"
|
||||
#include "RiuQwtPlotItemGroup.h"
|
||||
|
||||
#include "RimPlotCurve.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellPathAttribute.h"
|
||||
#include "RimWellPathCompletionInterface.h"
|
||||
|
||||
#include "cafPdmBase.h"
|
||||
#include "cafPdmObject.h"
|
||||
@ -35,9 +37,6 @@
|
||||
#include <QString>
|
||||
|
||||
class RigWellLogCurveData;
|
||||
class RimFishbonesMultipleSubs;
|
||||
class RimFracture;
|
||||
class RimPerforationInterval;
|
||||
class RimWellPath;
|
||||
class QwtPlotItem;
|
||||
|
||||
@ -53,17 +52,8 @@ class RiuWellPathAttributePlotObject : public cvf::Object
|
||||
public:
|
||||
RiuWellPathAttributePlotObject(const RimWellPath* wellPath);
|
||||
|
||||
RiuWellPathAttributePlotObject(const RimWellPath* wellPath,
|
||||
const RimWellPathAttribute* wellPathAttribute);
|
||||
|
||||
RiuWellPathAttributePlotObject(const RimWellPath* wellPath,
|
||||
const RimPerforationInterval* perforationInterval);
|
||||
|
||||
RiuWellPathAttributePlotObject(const RimWellPath* wellPath,
|
||||
const RimFishbonesMultipleSubs* fishbones);
|
||||
|
||||
RiuWellPathAttributePlotObject(const RimWellPath* wellPath,
|
||||
const RimFracture* fracture);
|
||||
RiuWellPathAttributePlotObject(const RimWellPath* wellPath,
|
||||
const RimWellPathCompletionInterface* completion);
|
||||
|
||||
~RiuWellPathAttributePlotObject();
|
||||
|
||||
@ -72,7 +62,7 @@ public:
|
||||
|
||||
void loadDataAndUpdate(bool updateParentPlot);
|
||||
|
||||
RimWellPathAttribute::AttributeType attributeType() const;
|
||||
RiaDefines::CompletionType completionType() const;
|
||||
|
||||
bool xValueRange(double* minimumValue, double* maximumValue) const;
|
||||
bool yValueRange(double* minimumValue, double* maximumValue) const;
|
||||
@ -131,7 +121,7 @@ private:
|
||||
private:
|
||||
const RimWellPath* m_wellPath;
|
||||
|
||||
RimWellPathAttribute::AttributeType m_attributeType;
|
||||
RiaDefines::CompletionType m_completionType;
|
||||
double m_startMD;
|
||||
double m_endMD;
|
||||
QString m_label;
|
||||
|
Loading…
Reference in New Issue
Block a user