mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3492 Tidy up color code for well path components/completions and select colors that work better.
This commit is contained in:
@@ -76,23 +76,6 @@ namespace caf
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
std::vector<RiaDefines::WellPathComponentType> RiaDefines::wellPathCompletionTypes()
|
|
||||||
{
|
|
||||||
return { PERFORATION_INTERVAL, FISHBONES, FRACTURE, ICD, AICD, ICV };
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
std::vector<RiaDefines::WellPathComponentType> RiaDefines::wellPathAttributeTypes()
|
|
||||||
{
|
|
||||||
return { CASING, LINER, PACKER };
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -55,8 +55,6 @@ namespace RiaDefines
|
|||||||
LINER,
|
LINER,
|
||||||
PACKER
|
PACKER
|
||||||
};
|
};
|
||||||
std::vector<WellPathComponentType> wellPathCompletionTypes();
|
|
||||||
std::vector<WellPathComponentType> wellPathAttributeTypes();
|
|
||||||
|
|
||||||
bool isPerCellFaceResult(const QString& resultName);
|
bool isPerCellFaceResult(const QString& resultName);
|
||||||
|
|
||||||
|
|||||||
@@ -511,15 +511,20 @@ cvf::Color3f RiaColorTables::undefinedCellColor()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
cvf::Color3f RiaColorTables::perforationLengthColor()
|
RiaColorTables::WellPathComponentColors RiaColorTables::wellPathComponentColors()
|
||||||
{
|
{
|
||||||
// based on hwb ( 85, 9%, 67%) dark_olive_green
|
return {{RiaDefines::WELL_PATH, cvf::Color3::CEETRON},
|
||||||
// added 10 to each component
|
{RiaDefines::PERFORATION_INTERVAL, cvf::Color3::DARK_MAGENTA},
|
||||||
cvf::Color3ub color(69, 94, 33);
|
{RiaDefines::FISHBONES, cvf::Color3::DARK_GREEN},
|
||||||
|
{RiaDefines::FRACTURE, cvf::Color3::CRIMSON},
|
||||||
return cvf::Color3f(color);
|
{RiaDefines::ICD, cvf::Color3::DARK_ORANGE},
|
||||||
|
{RiaDefines::AICD, cvf::Color3::INDIGO},
|
||||||
|
{RiaDefines::ICV, cvf::Color3::ORCHID},
|
||||||
|
{RiaDefines::CASING, cvf::Color3::SEA_GREEN},
|
||||||
|
{RiaDefines::LINER, cvf::Color3::OLIVE},
|
||||||
|
{RiaDefines::PACKER, cvf::Color3::GRAY}};
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -18,8 +18,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "RiaDefines.h"
|
||||||
#include "cafColorTable.h"
|
#include "cafColorTable.h"
|
||||||
|
#include <map>
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
@@ -28,6 +29,8 @@
|
|||||||
class RiaColorTables
|
class RiaColorTables
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
typedef std::map<RiaDefines::WellPathComponentType, cvf::Color3::ColorIdent> WellPathComponentColors;
|
||||||
|
|
||||||
static const caf::ColorTable& normalPaletteColors();
|
static const caf::ColorTable& normalPaletteColors();
|
||||||
static const caf::ColorTable& normalPaletteOppositeOrderingColors();
|
static const caf::ColorTable& normalPaletteOppositeOrderingColors();
|
||||||
static const caf::ColorTable& blackWhitePaletteColors();
|
static const caf::ColorTable& blackWhitePaletteColors();
|
||||||
@@ -57,7 +60,8 @@ public:
|
|||||||
static const caf::ColorTable& wellPathsPaletteColors();
|
static const caf::ColorTable& wellPathsPaletteColors();
|
||||||
|
|
||||||
static cvf::Color3f undefinedCellColor();
|
static cvf::Color3f undefinedCellColor();
|
||||||
static cvf::Color3f perforationLengthColor();
|
|
||||||
|
static WellPathComponentColors wellPathComponentColors();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static std::vector<cvf::Color3ub> categoryColors();
|
static std::vector<cvf::Color3ub> categoryColors();
|
||||||
|
|||||||
@@ -18,13 +18,15 @@
|
|||||||
|
|
||||||
#include "Riv3dWellLogCurveGeometryGenerator.h"
|
#include "Riv3dWellLogCurveGeometryGenerator.h"
|
||||||
|
|
||||||
#include "RimWellPath.h"
|
|
||||||
#include "RimWellPathCollection.h"
|
|
||||||
|
|
||||||
#include "RiaCurveDataTools.h"
|
#include "RiaCurveDataTools.h"
|
||||||
#include "RigWellPath.h"
|
#include "RigWellPath.h"
|
||||||
#include "RigWellPathGeometryTools.h"
|
#include "RigWellPathGeometryTools.h"
|
||||||
|
|
||||||
|
#include "Rim3dWellLogCurve.h"
|
||||||
|
#include "RimWellPath.h"
|
||||||
|
#include "RimWellPathCollection.h"
|
||||||
|
|
||||||
|
|
||||||
#include "cafLine.h"
|
#include "cafLine.h"
|
||||||
#include "cafDisplayCoordTransform.h"
|
#include "cafDisplayCoordTransform.h"
|
||||||
#include "cvfPrimitiveSetIndexedUInt.h"
|
#include "cvfPrimitiveSetIndexedUInt.h"
|
||||||
|
|||||||
@@ -967,7 +967,7 @@ void RivWellFracturePartMgr::appendFracturePerforationLengthParts(const RimEclip
|
|||||||
|
|
||||||
RivPipeGeometryGenerator geoGenerator;
|
RivPipeGeometryGenerator geoGenerator;
|
||||||
geoGenerator.cylinderWithCenterLineParts(
|
geoGenerator.cylinderWithCenterLineParts(
|
||||||
&parts, displayCoords, RiaColorTables::perforationLengthColor(), perforationRadius);
|
&parts, displayCoords, RiaColorTables::wellPathComponentColors()[RiaDefines::PERFORATION_INTERVAL], perforationRadius);
|
||||||
|
|
||||||
for (auto part : parts)
|
for (auto part : parts)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "RimFishbonesMultipleSubs.h"
|
#include "RimFishbonesMultipleSubs.h"
|
||||||
|
|
||||||
|
#include "RiaColorTables.h"
|
||||||
#include "RigFishbonesGeometry.h"
|
#include "RigFishbonesGeometry.h"
|
||||||
#include "RigWellPath.h"
|
#include "RigWellPath.h"
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
@@ -71,7 +72,8 @@ RimFishbonesMultipleSubs::RimFishbonesMultipleSubs()
|
|||||||
m_name.uiCapability()->setUiReadOnly(true);
|
m_name.uiCapability()->setUiReadOnly(true);
|
||||||
m_name.xmlCapability()->setIOWritable(false);
|
m_name.xmlCapability()->setIOWritable(false);
|
||||||
|
|
||||||
CAF_PDM_InitField(&fishbonesColor, "Color", cvf::Color3f(0.999f, 0.333f, 0.999f), "Fishbones Color", "", "", "");
|
cvf::Color3f defaultColor = RiaColorTables::wellPathComponentColors()[RiaDefines::FISHBONES];
|
||||||
|
CAF_PDM_InitField(&fishbonesColor, "Color", defaultColor, "Fishbones Color", "", "", "");
|
||||||
|
|
||||||
CAF_PDM_InitField(&m_lateralCountPerSub, "LateralCountPerSub", 3, "Laterals Per Sub", "", "", "");
|
CAF_PDM_InitField(&m_lateralCountPerSub, "LateralCountPerSub", 3, "Laterals Per Sub", "", "", "");
|
||||||
CAF_PDM_InitField(&m_lateralLength, "LateralLength", QString("11.0"), "Length(s) [m]", "", "Specify multiple length values if the sub lengths differ", "");
|
CAF_PDM_InitField(&m_lateralLength, "LateralLength", QString("11.0"), "Length(s) [m]", "", "Specify multiple length values if the sub lengths differ", "");
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
#include "RimFracture.h"
|
#include "RimFracture.h"
|
||||||
|
|
||||||
#include "RiaApplication.h"
|
#include "RiaApplication.h"
|
||||||
|
#include "RiaColorTables.h"
|
||||||
#include "RiaCompletionTypeCalculationScheduler.h"
|
#include "RiaCompletionTypeCalculationScheduler.h"
|
||||||
#include "RiaEclipseUnitTools.h"
|
#include "RiaEclipseUnitTools.h"
|
||||||
#include "RiaLogging.h"
|
#include "RiaLogging.h"
|
||||||
@@ -314,7 +315,7 @@ QString RimFracture::componentTypeLabel() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
cvf::Color3f RimFracture::defaultComponentColor() const
|
cvf::Color3f RimFracture::defaultComponentColor() const
|
||||||
{
|
{
|
||||||
return cvf::Color3f(cvf::Color3::ORANGE_RED);
|
return RiaColorTables::wellPathComponentColors()[componentType()];
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "RimPerforationInterval.h"
|
#include "RimPerforationInterval.h"
|
||||||
|
|
||||||
|
#include "RiaColorTables.h"
|
||||||
#include "RigWellPath.h"
|
#include "RigWellPath.h"
|
||||||
#include "RigCaseCellResultsData.h"
|
#include "RigCaseCellResultsData.h"
|
||||||
|
|
||||||
@@ -259,7 +260,7 @@ QString RimPerforationInterval::componentTypeLabel() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
cvf::Color3f RimPerforationInterval::defaultComponentColor() const
|
cvf::Color3f RimPerforationInterval::defaultComponentColor() const
|
||||||
{
|
{
|
||||||
return cvf::Color3f(cvf::Color3::GREEN);
|
return RiaColorTables::wellPathComponentColors()[componentType()];
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
#include "RimWellPathValve.h"
|
#include "RimWellPathValve.h"
|
||||||
|
|
||||||
#include "RiaDefines.h"
|
#include "RiaDefines.h"
|
||||||
|
#include "RiaColorTables.h"
|
||||||
#include "RiaEclipseUnitTools.h"
|
#include "RiaEclipseUnitTools.h"
|
||||||
|
|
||||||
#include "RigWellPath.h"
|
#include "RigWellPath.h"
|
||||||
@@ -89,19 +90,7 @@ QString RimWellPathValve::componentTypeLabel() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
cvf::Color3f RimWellPathValve::defaultComponentColor() const
|
cvf::Color3f RimWellPathValve::defaultComponentColor() const
|
||||||
{
|
{
|
||||||
switch (m_type())
|
return RiaColorTables::wellPathComponentColors()[componentType()];
|
||||||
{
|
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
#include "RiaPreferences.h"
|
#include "RiaPreferences.h"
|
||||||
#include "RiaViewRedrawScheduler.h"
|
#include "RiaViewRedrawScheduler.h"
|
||||||
|
|
||||||
|
#include "Rim3dWellLogCurve.h"
|
||||||
#include "RimCase.h"
|
#include "RimCase.h"
|
||||||
#include "RimGridView.h"
|
#include "RimGridView.h"
|
||||||
#include "RimMainPlotCollection.h"
|
#include "RimMainPlotCollection.h"
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include "RimEclipseCellColors.h"
|
#include "RimEclipseCellColors.h"
|
||||||
|
|
||||||
|
#include "RiaColorTables.h"
|
||||||
#include "RigCaseCellResultsData.h"
|
#include "RigCaseCellResultsData.h"
|
||||||
#include "RigEclipseCaseData.h"
|
#include "RigEclipseCaseData.h"
|
||||||
#include "RigFlowDiagResults.h"
|
#include "RigFlowDiagResults.h"
|
||||||
@@ -392,34 +393,22 @@ void RimEclipseCellColors::updateLegendData(size_t currentTimeStep,
|
|||||||
legendConfig->setNamedCategoriesInverse(fnVector);
|
legendConfig->setNamedCategoriesInverse(fnVector);
|
||||||
}
|
}
|
||||||
else if ( this->resultType() == RiaDefines::DYNAMIC_NATIVE && this->resultVariable() == RiaDefines::completionTypeResultName() )
|
else if ( this->resultType() == RiaDefines::DYNAMIC_NATIVE && this->resultVariable() == RiaDefines::completionTypeResultName() )
|
||||||
{
|
{
|
||||||
std::vector< std::tuple<QString, int, cvf::Color3ub> > categories;
|
|
||||||
|
|
||||||
caf::AppEnum<RiaDefines::WellPathComponentType> wellPath(RiaDefines::WELL_PATH);
|
|
||||||
caf::AppEnum<RiaDefines::WellPathComponentType> fishbone(RiaDefines::FISHBONES);
|
|
||||||
caf::AppEnum<RiaDefines::WellPathComponentType> perforationInterval(RiaDefines::PERFORATION_INTERVAL);
|
|
||||||
caf::AppEnum<RiaDefines::WellPathComponentType> fracture(RiaDefines::FRACTURE);
|
|
||||||
|
|
||||||
const std::vector<int>& visibleCategories = cellResultsData->uniqueCellScalarValues(this->scalarResultIndex());
|
const std::vector<int>& visibleCategories = cellResultsData->uniqueCellScalarValues(this->scalarResultIndex());
|
||||||
|
|
||||||
if (std::find(visibleCategories.begin(), visibleCategories.end(), wellPath.index()) != visibleCategories.end())
|
std::vector<RiaDefines::WellPathComponentType> supportedCompletionTypes =
|
||||||
|
{ RiaDefines::WELL_PATH, RiaDefines::FISHBONES, RiaDefines::PERFORATION_INTERVAL, RiaDefines::FRACTURE };
|
||||||
|
|
||||||
|
RiaColorTables::WellPathComponentColors colors = RiaColorTables::wellPathComponentColors();
|
||||||
|
|
||||||
|
std::vector< std::tuple<QString, int, cvf::Color3ub> > categories;
|
||||||
|
for (auto completionType : supportedCompletionTypes)
|
||||||
{
|
{
|
||||||
categories.push_back(std::make_tuple(wellPath.uiText(), static_cast<int>(wellPath.index()), cvf::Color3::RED));
|
if (std::find(visibleCategories.begin(), visibleCategories.end(), completionType) != visibleCategories.end())
|
||||||
}
|
{
|
||||||
|
QString categoryText = caf::AppEnum<RiaDefines::WellPathComponentType>::uiText(completionType);
|
||||||
if (std::find(visibleCategories.begin(), visibleCategories.end(), fishbone.index()) != visibleCategories.end())
|
categories.push_back(std::make_tuple(categoryText, completionType, colors[completionType]));
|
||||||
{
|
}
|
||||||
categories.push_back(std::make_tuple(fishbone.uiText(), static_cast<int>(fishbone.index()), cvf::Color3::DARK_GREEN));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (std::find(visibleCategories.begin(), visibleCategories.end(), perforationInterval.index()) != visibleCategories.end())
|
|
||||||
{
|
|
||||||
categories.push_back(std::make_tuple(perforationInterval.uiText(), static_cast<int>(perforationInterval.index()), cvf::Color3::GREEN));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (std::find(visibleCategories.begin(), visibleCategories.end(), fracture.index()) != visibleCategories.end())
|
|
||||||
{
|
|
||||||
categories.push_back(std::make_tuple(fracture.uiText(), static_cast<int>(fracture.index()), cvf::Color3::YELLOW_GREEN));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
legendConfig->setCategoryItems(categories);
|
legendConfig->setCategoryItems(categories);
|
||||||
|
|||||||
@@ -391,13 +391,17 @@ void RimEclipsePropertyFilter::computeResultValueRange()
|
|||||||
}
|
}
|
||||||
else if (resultDefinition->resultVariable() == RiaDefines::completionTypeResultName())
|
else if (resultDefinition->resultVariable() == RiaDefines::completionTypeResultName())
|
||||||
{
|
{
|
||||||
std::vector<QString> ctNames;
|
std::vector<RiaDefines::WellPathComponentType> componentTypes =
|
||||||
ctNames.push_back(caf::AppEnum<RiaDefines::WellPathComponentType>::uiText(RiaDefines::WELL_PATH));
|
{
|
||||||
for (RiaDefines::WellPathComponentType type : RiaDefines::wellPathCompletionTypes())
|
RiaDefines::WELL_PATH, RiaDefines::PERFORATION_INTERVAL,
|
||||||
|
RiaDefines::FISHBONES, RiaDefines::FRACTURE
|
||||||
|
};
|
||||||
|
std::vector<std::pair<QString, int>> ctNamesAndValues;
|
||||||
|
for (RiaDefines::WellPathComponentType type : componentTypes)
|
||||||
{
|
{
|
||||||
ctNames.push_back(caf::AppEnum<RiaDefines::WellPathComponentType>::uiText(type));
|
ctNamesAndValues.push_back(std::make_pair(caf::AppEnum<RiaDefines::WellPathComponentType>::uiText(type), type));
|
||||||
}
|
}
|
||||||
setCategoryNames(ctNames);
|
setCategoryNamesAndValues(ctNamesAndValues);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
#include "RimWellPath.h"
|
#include "RimWellPath.h"
|
||||||
|
|
||||||
#include "RiaApplication.h"
|
#include "RiaApplication.h"
|
||||||
|
#include "RiaColorTables.h"
|
||||||
#include "RiaSimWellBranchTools.h"
|
#include "RiaSimWellBranchTools.h"
|
||||||
#include "RiaWellNameComparer.h"
|
#include "RiaWellNameComparer.h"
|
||||||
|
|
||||||
@@ -190,6 +191,62 @@ double RimWellPath::wellPathRadiusScaleFactor() const
|
|||||||
return m_wellPathRadiusScaleFactor();
|
return m_wellPathRadiusScaleFactor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RiaDefines::WellPathComponentType RimWellPath::componentType() const
|
||||||
|
{
|
||||||
|
return RiaDefines::WELL_PATH;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RimWellPath::componentLabel() const
|
||||||
|
{
|
||||||
|
return name();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RimWellPath::componentTypeLabel() const
|
||||||
|
{
|
||||||
|
return "Well Path";
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
cvf::Color3f RimWellPath::defaultComponentColor() const
|
||||||
|
{
|
||||||
|
return RiaColorTables::wellPathComponentColors()[componentType()];
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
double RimWellPath::startMD() const
|
||||||
|
{
|
||||||
|
if (wellPathGeometry())
|
||||||
|
{
|
||||||
|
return wellPathGeometry()->measureDepths().front();
|
||||||
|
}
|
||||||
|
return 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
double RimWellPath::endMD() const
|
||||||
|
{
|
||||||
|
if (wellPathGeometry())
|
||||||
|
{
|
||||||
|
return wellPathGeometry()->measureDepths().back();
|
||||||
|
}
|
||||||
|
return 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "RiaEclipseUnitTools.h"
|
#include "RiaEclipseUnitTools.h"
|
||||||
|
|
||||||
#include "Rim3dWellLogCurve.h"
|
#include "RimWellPathComponentInterface.h"
|
||||||
|
|
||||||
#include "cafPdmField.h"
|
#include "cafPdmField.h"
|
||||||
#include "cafPdmObject.h"
|
#include "cafPdmObject.h"
|
||||||
@@ -53,13 +53,14 @@ class RimWellPathCompletions;
|
|||||||
class RigWellPathFormations;
|
class RigWellPathFormations;
|
||||||
|
|
||||||
class RimWellPathFractureCollection;
|
class RimWellPathFractureCollection;
|
||||||
|
class Rim3dWellLogCurve;
|
||||||
class Rim3dWellLogCurveCollection;
|
class Rim3dWellLogCurveCollection;
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
class RimWellPath : public caf::PdmObject
|
class RimWellPath : public caf::PdmObject, public RimWellPathComponentInterface
|
||||||
{
|
{
|
||||||
CAF_PDM_HEADER_INIT;
|
CAF_PDM_HEADER_INIT;
|
||||||
|
|
||||||
@@ -120,6 +121,15 @@ public:
|
|||||||
double combinedScaleFactor() const;
|
double combinedScaleFactor() const;
|
||||||
double wellPathRadius(double characteristicCellSize) const;
|
double wellPathRadius(double characteristicCellSize) const;
|
||||||
double wellPathRadiusScaleFactor() const;
|
double wellPathRadiusScaleFactor() const;
|
||||||
|
|
||||||
|
|
||||||
|
// RimWellPathComponentInterface overrides
|
||||||
|
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;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
#include "RimWellPathAttribute.h"
|
#include "RimWellPathAttribute.h"
|
||||||
|
|
||||||
|
#include "RiaColorTables.h"
|
||||||
#include "RigWellPath.h"
|
#include "RigWellPath.h"
|
||||||
|
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
@@ -124,19 +125,7 @@ QString RimWellPathAttribute::componentTypeLabel() const
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
cvf::Color3f RimWellPathAttribute::defaultComponentColor() const
|
cvf::Color3f RimWellPathAttribute::defaultComponentColor() const
|
||||||
{
|
{
|
||||||
switch (m_type())
|
return RiaColorTables::wellPathComponentColors()[componentType()];
|
||||||
{
|
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "RiuWellPathComponentPlotItem.h"
|
#include "RiuWellPathComponentPlotItem.h"
|
||||||
|
|
||||||
|
#include "RiaColorTables.h"
|
||||||
#include "RiaColorTools.h"
|
#include "RiaColorTools.h"
|
||||||
|
|
||||||
#include "RimFishbonesMultipleSubs.h"
|
#include "RimFishbonesMultipleSubs.h"
|
||||||
@@ -45,7 +46,6 @@
|
|||||||
RiuWellPathComponentPlotItem::RiuWellPathComponentPlotItem(const RimWellPath* wellPath)
|
RiuWellPathComponentPlotItem::RiuWellPathComponentPlotItem(const RimWellPath* wellPath)
|
||||||
: m_wellPath(wellPath)
|
: m_wellPath(wellPath)
|
||||||
, m_componentType(RiaDefines::WELL_PATH)
|
, m_componentType(RiaDefines::WELL_PATH)
|
||||||
, m_baseColor(cvf::Color3f(cvf::Color3::LIGHT_GRAY))
|
|
||||||
, m_depthType(RimWellLogPlot::MEASURED_DEPTH)
|
, m_depthType(RimWellLogPlot::MEASURED_DEPTH)
|
||||||
, m_showLabel(false)
|
, m_showLabel(false)
|
||||||
{
|
{
|
||||||
@@ -71,7 +71,6 @@ RiuWellPathComponentPlotItem::RiuWellPathComponentPlotItem(const RimWellPath* we
|
|||||||
m_componentType = component->componentType();
|
m_componentType = component->componentType();
|
||||||
m_label = component->componentLabel();
|
m_label = component->componentLabel();
|
||||||
m_legendTitle = component->componentTypeLabel();
|
m_legendTitle = component->componentTypeLabel();
|
||||||
m_baseColor = component->defaultComponentColor();
|
|
||||||
m_startMD = component->startMD();
|
m_startMD = component->startMD();
|
||||||
m_endMD = component->endMD();
|
m_endMD = component->endMD();
|
||||||
}
|
}
|
||||||
@@ -149,16 +148,16 @@ void RiuWellPathComponentPlotItem::onLoadDataAndUpdate(bool updateParentPlot)
|
|||||||
double markerDepth = startDepth;
|
double markerDepth = startDepth;
|
||||||
while (markerDepth < endDepth - 5)
|
while (markerDepth < endDepth - 5)
|
||||||
{
|
{
|
||||||
addMarker(-0.75, markerDepth, markerSize, RiuQwtSymbol::SYMBOL_LEFT_TRIANGLE, symbolColor());
|
addMarker(-0.75, markerDepth, markerSize, RiuQwtSymbol::SYMBOL_LEFT_TRIANGLE, componentColor());
|
||||||
addMarker(0.75, markerDepth, markerSize, RiuQwtSymbol::SYMBOL_RIGHT_TRIANGLE, symbolColor());
|
addMarker(0.75, markerDepth, markerSize, RiuQwtSymbol::SYMBOL_RIGHT_TRIANGLE, componentColor());
|
||||||
|
|
||||||
markerDepth += markerSpacing;
|
markerDepth += markerSpacing;
|
||||||
}
|
}
|
||||||
addMarker(0.75, midDepth, 10, RiuQwtSymbol::SYMBOL_RIGHT_TRIANGLE, symbolColor(0.0), label());
|
addMarker(0.75, midDepth, 10, RiuQwtSymbol::SYMBOL_RIGHT_TRIANGLE, componentColor(0.0), label());
|
||||||
|
|
||||||
QwtPlotItem* legendItem1 = createMarker(16.0, 0.0, 6, RiuQwtSymbol::SYMBOL_RIGHT_TRIANGLE, symbolColor());
|
QwtPlotItem* legendItem1 = createMarker(16.0, 0.0, 6, RiuQwtSymbol::SYMBOL_RIGHT_TRIANGLE, componentColor());
|
||||||
legendItem1->setLegendIconSize(QSize(4, 8));
|
legendItem1->setLegendIconSize(QSize(4, 8));
|
||||||
QwtPlotItem* legendItem2 = createMarker(16.0, 8.0, 6, RiuQwtSymbol::SYMBOL_RIGHT_TRIANGLE, symbolColor());
|
QwtPlotItem* legendItem2 = createMarker(16.0, 8.0, 6, RiuQwtSymbol::SYMBOL_RIGHT_TRIANGLE, componentColor());
|
||||||
legendItem2->setLegendIconSize(QSize(4, 8));
|
legendItem2->setLegendIconSize(QSize(4, 8));
|
||||||
m_combinedComponentGroup.addLegendItem(legendItem1);
|
m_combinedComponentGroup.addLegendItem(legendItem1);
|
||||||
m_combinedComponentGroup.addLegendItem(legendItem2);
|
m_combinedComponentGroup.addLegendItem(legendItem2);
|
||||||
@@ -175,7 +174,7 @@ void RiuWellPathComponentPlotItem::onLoadDataAndUpdate(bool updateParentPlot)
|
|||||||
addColumnFeature(0.25, 0.75, startDepth, endDepth, componentColor(), Qt::SolidPattern);
|
addColumnFeature(0.25, 0.75, startDepth, endDepth, componentColor(), Qt::SolidPattern);
|
||||||
addMarker(0.75, startDepth, 10, RiuQwtSymbol::SYMBOL_NONE, componentColor(), "", Qt::AlignTop | Qt::AlignRight, Qt::Horizontal, true);
|
addMarker(0.75, startDepth, 10, RiuQwtSymbol::SYMBOL_NONE, componentColor(), "", Qt::AlignTop | Qt::AlignRight, Qt::Horizontal, true);
|
||||||
addMarker(0.75, endDepth, 10, RiuQwtSymbol::SYMBOL_NONE, componentColor(), "", Qt::AlignTop | Qt::AlignRight, Qt::Horizontal, true);
|
addMarker(0.75, endDepth, 10, RiuQwtSymbol::SYMBOL_NONE, componentColor(), "", 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);
|
addMarker(0.75, startDepth, 1, RiuQwtSymbol::SYMBOL_RIGHT_ANGLED_TRIANGLE, componentColor(0.0f), label(), Qt::AlignTop | Qt::AlignRight);
|
||||||
}
|
}
|
||||||
else if (m_componentType == RiaDefines::ICD)
|
else if (m_componentType == RiaDefines::ICD)
|
||||||
{
|
{
|
||||||
@@ -295,14 +294,14 @@ void RiuWellPathComponentPlotItem::addColumnFeature(double startX,
|
|||||||
QwtPlotItem* backgroundShape = createColumnShape(startX, endX, startDepth, endDepth, semiTransparentWhite, Qt::SolidPattern);
|
QwtPlotItem* backgroundShape = createColumnShape(startX, endX, startDepth, endDepth, semiTransparentWhite, Qt::SolidPattern);
|
||||||
m_combinedComponentGroup.addPlotItem(backgroundShape);
|
m_combinedComponentGroup.addPlotItem(backgroundShape);
|
||||||
|
|
||||||
QwtPlotItem* patternShape = createColumnShape(startX, endX, startDepth, endDepth, cvf::Color4f(cvf::Color3::BLACK), brushStyle);
|
QwtPlotItem* patternShape = createColumnShape(startX, endX, startDepth, endDepth, baseColor, brushStyle);
|
||||||
m_combinedComponentGroup.addPlotItem(patternShape);
|
m_combinedComponentGroup.addPlotItem(patternShape);
|
||||||
if (endX >= 0.0)
|
if (endX >= 0.0)
|
||||||
{
|
{
|
||||||
QwtPlotItem* legendBGShape = createColumnShape(0.0, 16.0, 0.0, 16.0, semiTransparentWhite, Qt::SolidPattern);
|
QwtPlotItem* legendBGShape = createColumnShape(0.0, 16.0, 0.0, 16.0, semiTransparentWhite, Qt::SolidPattern);
|
||||||
m_combinedComponentGroup.addLegendItem(legendBGShape);
|
m_combinedComponentGroup.addLegendItem(legendBGShape);
|
||||||
|
|
||||||
QwtPlotItem* legendShape = createColumnShape(0.0, 16.0, 0.0, 16.0, cvf::Color4f(cvf::Color3::BLACK), brushStyle);
|
QwtPlotItem* legendShape = createColumnShape(0.0, 16.0, 0.0, 16.0, baseColor, brushStyle);
|
||||||
m_combinedComponentGroup.addLegendItem(legendShape);
|
m_combinedComponentGroup.addLegendItem(legendShape);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -351,15 +350,7 @@ QwtPlotItem* RiuWellPathComponentPlotItem::createColumnShape(double star
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
cvf::Color4f RiuWellPathComponentPlotItem::componentColor(float alpha /*= 1.0*/) const
|
cvf::Color4f RiuWellPathComponentPlotItem::componentColor(float alpha /*= 1.0*/) const
|
||||||
{
|
{
|
||||||
return cvf::Color4f(m_baseColor, alpha);
|
return cvf::Color4f(RiaColorTables::wellPathComponentColors()[m_componentType], alpha);
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
cvf::Color4f RiuWellPathComponentPlotItem::symbolColor(float alpha) const
|
|
||||||
{
|
|
||||||
return cvf::Color4f(cvf::Color3f(cvf::Color3::BLACK), alpha);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ private:
|
|||||||
Qt::BrushStyle brushStyle = Qt::SolidPattern);
|
Qt::BrushStyle brushStyle = Qt::SolidPattern);
|
||||||
|
|
||||||
cvf::Color4f componentColor(float alpha = 1.0) const;
|
cvf::Color4f componentColor(float alpha = 1.0) const;
|
||||||
cvf::Color4f symbolColor(float alpha = 1.0) const;
|
|
||||||
private:
|
private:
|
||||||
const RimWellPath* m_wellPath;
|
const RimWellPath* m_wellPath;
|
||||||
|
|
||||||
@@ -126,7 +126,6 @@ private:
|
|||||||
double m_endMD;
|
double m_endMD;
|
||||||
QString m_label;
|
QString m_label;
|
||||||
QString m_legendTitle;
|
QString m_legendTitle;
|
||||||
cvf::Color3f m_baseColor;
|
|
||||||
|
|
||||||
RimWellLogPlot::DepthTypeEnum m_depthType;
|
RimWellLogPlot::DepthTypeEnum m_depthType;
|
||||||
QPointer<QwtPlot> m_parentQwtPlot;
|
QPointer<QwtPlot> m_parentQwtPlot;
|
||||||
|
|||||||
Reference in New Issue
Block a user