mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge remote-tracking branch 'refs/remotes/origin/dev'
Conflicts: ApplicationCode/ProjectDataModel/RimEclipseWell.cpp
This commit is contained in:
@@ -43,6 +43,133 @@
|
||||
CAF_PDM_SOURCE_INIT(RimWellAllocationPlot, "WellAllocationPlot");
|
||||
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
|
||||
class RigAccWellFlowCalculator
|
||||
{
|
||||
|
||||
public:
|
||||
RigAccWellFlowCalculator(const std::vector< std::vector <cvf::Vec3d> >& pipeBranchesCLCoords,
|
||||
const std::vector< std::vector <RigWellResultPoint> >& pipeBranchesCellIds):
|
||||
m_pipeBranchesCLCoords(pipeBranchesCLCoords), m_pipeBranchesCellIds(pipeBranchesCellIds)
|
||||
{
|
||||
m_accConnectionFlowPrBranch.resize(m_pipeBranchesCellIds.size());
|
||||
|
||||
calculateAccumulatedFlowPrConnection(0,1);
|
||||
}
|
||||
|
||||
// Returned pair is connection number from top of well with accumulated flow
|
||||
|
||||
const std::vector<std::pair <size_t, double> >& accumulatedFlowPrConnection(size_t branchIdx)
|
||||
{
|
||||
return m_accConnectionFlowPrBranch[branchIdx];
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
const std::vector<std::pair <size_t, double> >& calculateAccumulatedFlowPrConnection(size_t branchIdx, size_t startConnectionNumberFromTop)
|
||||
{
|
||||
std::vector<std::pair <size_t, double> >& accConnectionFlow = m_accConnectionFlowPrBranch[branchIdx];
|
||||
|
||||
const std::vector<RigWellResultPoint>& branchCells = m_pipeBranchesCellIds[branchIdx];
|
||||
int clSegIdx = static_cast<int>( branchCells.size()) - 1;
|
||||
double accFlow = 0.0;
|
||||
|
||||
size_t prevGridIdx = -1;
|
||||
size_t prevGridCellIdx = -1;
|
||||
|
||||
std::vector<size_t> resPointToConnectionIndexFromBottom;
|
||||
resPointToConnectionIndexFromBottom.resize(branchCells.size(), -1);
|
||||
|
||||
size_t connIdxFromBottom = 0;
|
||||
|
||||
while (clSegIdx >= 0)
|
||||
{
|
||||
resPointToConnectionIndexFromBottom[clSegIdx] = connIdxFromBottom;
|
||||
|
||||
if ( branchCells[clSegIdx].m_gridIndex != prevGridIdx
|
||||
&& branchCells[clSegIdx].m_gridCellIndex != prevGridIdx )
|
||||
{
|
||||
++connIdxFromBottom;
|
||||
}
|
||||
|
||||
prevGridIdx = branchCells[clSegIdx].m_gridIndex ;
|
||||
prevGridCellIdx = branchCells[clSegIdx].m_gridCellIndex;
|
||||
|
||||
--clSegIdx;
|
||||
}
|
||||
|
||||
size_t prevConnIndx = -1;
|
||||
clSegIdx = static_cast<int>( branchCells.size()) - 1;
|
||||
|
||||
while (clSegIdx >= 0)
|
||||
{
|
||||
// Skip point if referring to the same cell as in the previous point did
|
||||
{
|
||||
if (resPointToConnectionIndexFromBottom[clSegIdx] == prevConnIndx)
|
||||
{
|
||||
--clSegIdx;
|
||||
continue;
|
||||
}
|
||||
|
||||
prevConnIndx = resPointToConnectionIndexFromBottom[clSegIdx];
|
||||
}
|
||||
|
||||
size_t connNumFromTop = connecionIdxFromTop(resPointToConnectionIndexFromBottom, clSegIdx) + startConnectionNumberFromTop;
|
||||
|
||||
accFlow += branchCells[clSegIdx].m_flowRate;
|
||||
std::vector<size_t> downstreamBranches = findDownstreamBranchIdxs(branchCells[clSegIdx]);
|
||||
for (size_t dsBidx : downstreamBranches )
|
||||
{
|
||||
if ( dsBidx != branchIdx && m_accConnectionFlowPrBranch[dsBidx].size() == 0) // Not this branch or already calculated
|
||||
{
|
||||
const std::pair <size_t, double>& brancFlowPair = calculateAccumulatedFlowPrConnection(dsBidx, connNumFromTop).back();
|
||||
accFlow += brancFlowPair.second;
|
||||
}
|
||||
}
|
||||
|
||||
accConnectionFlow.push_back(std::make_pair(connNumFromTop, accFlow));
|
||||
|
||||
--clSegIdx;
|
||||
}
|
||||
|
||||
return m_accConnectionFlowPrBranch[branchIdx];
|
||||
}
|
||||
|
||||
static size_t connecionIdxFromTop( std::vector<size_t> resPointToConnectionIndexFromBottom, size_t clSegIdx)
|
||||
{
|
||||
return resPointToConnectionIndexFromBottom.front() - resPointToConnectionIndexFromBottom[clSegIdx];
|
||||
}
|
||||
|
||||
std::vector<size_t> findDownstreamBranchIdxs(const RigWellResultPoint& connectionPoint)
|
||||
{
|
||||
std::vector<size_t> downStreamBranchIdxs;
|
||||
|
||||
for (size_t bIdx = 0; bIdx < m_pipeBranchesCellIds.size(); ++bIdx)
|
||||
{
|
||||
if ( m_pipeBranchesCellIds[bIdx][0].m_gridIndex == connectionPoint.m_gridIndex
|
||||
&& m_pipeBranchesCellIds[bIdx][0].m_gridCellIndex == connectionPoint.m_gridCellIndex)
|
||||
{
|
||||
downStreamBranchIdxs.push_back(bIdx);
|
||||
}
|
||||
}
|
||||
return downStreamBranchIdxs;
|
||||
}
|
||||
|
||||
|
||||
const std::vector< std::vector <cvf::Vec3d> >& m_pipeBranchesCLCoords;
|
||||
const std::vector< std::vector <RigWellResultPoint> >& m_pipeBranchesCellIds;
|
||||
|
||||
std::vector< std::vector<std::pair <size_t, double> > > m_accConnectionFlowPrBranch;
|
||||
|
||||
};
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -144,7 +271,8 @@ void RimWellAllocationPlot::updateFromWell()
|
||||
pipeBranchesCellIds);
|
||||
|
||||
accumulatedWellFlowPlot()->setDescription("Accumulated Well Flow (" + m_wellName + ")");
|
||||
|
||||
|
||||
RigAccWellFlowCalculator wfCalculator(pipeBranchesCLCoords, pipeBranchesCellIds);
|
||||
|
||||
// Delete existing tracks
|
||||
{
|
||||
@@ -171,6 +299,7 @@ void RimWellAllocationPlot::updateFromWell()
|
||||
|
||||
accumulatedWellFlowPlot()->addTrack(plotTrack);
|
||||
|
||||
#if 0
|
||||
std::vector<cvf::Vec3d> curveCoords;
|
||||
std::vector<double> flowRate;
|
||||
|
||||
@@ -199,9 +328,21 @@ void RimWellAllocationPlot::updateFromWell()
|
||||
}
|
||||
|
||||
RigSimulationWellCoordsAndMD helper(curveCoords);
|
||||
|
||||
#endif
|
||||
|
||||
const std::vector<std::pair <size_t, double> >& flowPrConnection = wfCalculator.accumulatedFlowPrConnection(brIdx);
|
||||
|
||||
std::vector<double> connNumbers;
|
||||
std::vector<double> accFlow;
|
||||
|
||||
for (const std::pair<size_t, double> & flowPair: flowPrConnection)
|
||||
{
|
||||
connNumbers.push_back(flowPair.first);
|
||||
accFlow.push_back(flowPair.second);
|
||||
}
|
||||
|
||||
RimWellFlowRateCurve* curve = new RimWellFlowRateCurve;
|
||||
curve->setFlowValues(helper.measuredDepths(), flowRate);
|
||||
curve->setFlowValues(connNumbers, accFlow);
|
||||
|
||||
plotTrack->addCurve(curve);
|
||||
|
||||
|
||||
@@ -433,6 +433,13 @@ QStringList RimContextCommandBuilder::commandsFromSelection()
|
||||
{
|
||||
commandIds << "RicExportFaultsFeature";
|
||||
}
|
||||
else if (dynamic_cast<RimEclipseWell*>(uiItem))
|
||||
{
|
||||
commandIds << "RicEclipseWellShowLabelFeature";
|
||||
commandIds << "RicEclipseWellShowHeadFeature";
|
||||
commandIds << "RicEclipseWellShowPipeFeature";
|
||||
commandIds << "RicEclipseWellShowSpheresFeature";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "RimEclipseWell.h"
|
||||
|
||||
#include "RigSimulationWellCenterLineCalculator.h"
|
||||
#include "RigSingleWellResultsData.h"
|
||||
|
||||
#include "RimEclipseView.h"
|
||||
@@ -28,7 +29,6 @@
|
||||
#include "RimSimWellFractureCollection.h"
|
||||
|
||||
#include "cvfMath.h"
|
||||
#include "RigSimulationWellCenterLineCalculator.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimEclipseWell, "Well");
|
||||
|
||||
@@ -39,16 +39,18 @@ RimEclipseWell::RimEclipseWell()
|
||||
{
|
||||
CAF_PDM_InitObject("Well", ":/Well.png", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&name, "WellName", "Name", "", "", "");
|
||||
CAF_PDM_InitField(&showWell, "ShowWell", true, "Show well ", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&name, "WellName", "Name", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&showWell, "ShowWell", true, "Show well ", "", "", "");
|
||||
showWell.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitField(&showWellLabel, "ShowWellLabel", true, "Show well label", "", "", "");
|
||||
CAF_PDM_InitField(&showWellLabel, "ShowWellLabel", true, "Show well label", "", "", "");
|
||||
CAF_PDM_InitField(&showWellHead, "ShowWellHead", true, "Show well head", "", "", "");
|
||||
CAF_PDM_InitField(&showWellPipe, "ShowWellPipe", true, "Show well pipe", "", "", "");
|
||||
CAF_PDM_InitField(&showWellSpheres, "ShowWellSpheres", false, "Show well spheres", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&showWellPipes, "ShowWellPipe", true, "Show well pipe", "", "", "");
|
||||
CAF_PDM_InitField(&showWellSpheres, "ShowWellSpheres", true, "Show well spheres", "", "", "");
|
||||
CAF_PDM_InitField(&pipeRadiusScaleFactor, "WellPipeRadiusScale",1.0, "Pipe radius scale", "", "", "");
|
||||
CAF_PDM_InitField(&wellPipeColor, "WellPipeColor", cvf::Color3f(0.588f, 0.588f, 0.804f), "Well pipe color", "", "", "");
|
||||
CAF_PDM_InitField(&pipeScaleFactor, "WellPipeRadiusScale", 1.0, "Well Pipe Scale Factor", "", "", "");
|
||||
CAF_PDM_InitField(&wellPipeColor, "WellPipeColor", cvf::Color3f(0.588f, 0.588f, 0.804f), "Well pipe color", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&showWellCells, "ShowWellCells", true, "Add cells to range filter", "", "", "");
|
||||
CAF_PDM_InitField(&showWellCellFence, "ShowWellCellFence", false, "Use well fence", "", "", "");
|
||||
@@ -89,7 +91,8 @@ void RimEclipseWell::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
|
||||
if (!m_reservoirView) return;
|
||||
|
||||
if (&showWellLabel == changedField ||
|
||||
&showWellPipes == changedField ||
|
||||
&showWellHead == changedField ||
|
||||
&showWellPipe == changedField ||
|
||||
&showWellSpheres == changedField ||
|
||||
&wellPipeColor == changedField)
|
||||
{
|
||||
@@ -103,7 +106,7 @@ void RimEclipseWell::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
|
||||
m_reservoirView->scheduleGeometryRegen(VISIBLE_WELL_CELLS);
|
||||
m_reservoirView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
else if (&pipeRadiusScaleFactor == changedField)
|
||||
else if (&pipeScaleFactor == changedField)
|
||||
{
|
||||
if (m_reservoirView)
|
||||
{
|
||||
@@ -205,15 +208,28 @@ bool RimEclipseWell::visibleCellsInstersectsWell(size_t frameIndex)
|
||||
void RimEclipseWell::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
caf::PdmUiGroup* pipeGroup = uiOrdering.addNewGroup("Appearance");
|
||||
pipeGroup->add(&showWellPipes);
|
||||
pipeGroup->add(&showWellSpheres);
|
||||
pipeGroup->add(&showWellLabel);
|
||||
pipeGroup->add(&showWellHead);
|
||||
pipeGroup->add(&showWellPipe);
|
||||
pipeGroup->add(&showWellSpheres);
|
||||
|
||||
pipeGroup->add(&pipeScaleFactor);
|
||||
|
||||
pipeGroup->add(&wellPipeColor);
|
||||
pipeGroup->add(&pipeRadiusScaleFactor);
|
||||
|
||||
caf::PdmUiGroup* filterGroup = uiOrdering.addNewGroup("Range filter");
|
||||
filterGroup->add(&showWellCells);
|
||||
filterGroup->add(&showWellCellFence);
|
||||
|
||||
RimEclipseWellCollection* wellColl = nullptr;
|
||||
this->firstAncestorOrThisOfType(wellColl);
|
||||
if (wellColl)
|
||||
{
|
||||
showWellLabel.uiCapability()->setUiReadOnly(!wellColl->showWellLabel());
|
||||
showWellHead.uiCapability()->setUiReadOnly(!wellColl->showWellHead());
|
||||
showWellPipe.uiCapability()->setUiReadOnly(!wellColl->showWellPipe());
|
||||
showWellSpheres.uiCapability()->setUiReadOnly(!wellColl->showWellSpheres());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -221,10 +237,10 @@ void RimEclipseWell::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimEclipseWell::isWellPipeVisible(size_t frameIndex)
|
||||
{
|
||||
RimEclipseView* m_reservoirView = nullptr;
|
||||
this->firstAncestorOrThisOfType(m_reservoirView);
|
||||
RimEclipseView* reservoirView = nullptr;
|
||||
this->firstAncestorOrThisOfType(reservoirView);
|
||||
|
||||
if (m_reservoirView == nullptr) return false;
|
||||
if (reservoirView == nullptr) return false;
|
||||
if (this->wellResults() == nullptr) return false;
|
||||
|
||||
if (frameIndex >= this->wellResults()->m_resultTimeStepIndexToWellTimeStepIndex.size())
|
||||
@@ -238,35 +254,29 @@ bool RimEclipseWell::isWellPipeVisible(size_t frameIndex)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_reservoirView->wellCollection()->isActive())
|
||||
if (!reservoirView->wellCollection()->isActive())
|
||||
return false;
|
||||
|
||||
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_FORCE_ALL_ON)
|
||||
if (!this->showWell())
|
||||
return false;
|
||||
|
||||
if (!this->showWellPipe())
|
||||
return false;
|
||||
|
||||
if (!reservoirView->wellCollection()->showWellPipe())
|
||||
return false;
|
||||
|
||||
if (reservoirView->crossSectionCollection()->hasActiveIntersectionForSimulationWell(this))
|
||||
return true;
|
||||
|
||||
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_FORCE_ALL_OFF)
|
||||
return false;
|
||||
|
||||
if (this->showWell() == false)
|
||||
return false;
|
||||
|
||||
if (this->showWellPipes() == false)
|
||||
return false;
|
||||
|
||||
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_INDIVIDUALLY)
|
||||
return true;
|
||||
|
||||
if (m_reservoirView->crossSectionCollection()->hasActiveIntersectionForSimulationWell(this))
|
||||
return true;
|
||||
|
||||
if (m_reservoirView->wellCollection()->wellPipeVisibility() == RimEclipseWellCollection::PIPES_OPEN_IN_VISIBLE_CELLS)
|
||||
if (reservoirView->wellCollection()->showWellsIntersectingVisibleCells())
|
||||
{
|
||||
return visibleCellsInstersectsWell(frameIndex);
|
||||
}
|
||||
|
||||
CVF_ASSERT(false); // Never end here. have you added new pipe visibility modes ?
|
||||
|
||||
return false;
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -294,28 +304,26 @@ bool RimEclipseWell::isWellSpheresVisible(size_t frameIndex)
|
||||
if (!m_reservoirView->wellCollection()->isActive())
|
||||
return false;
|
||||
|
||||
if (m_reservoirView->wellCollection()->wellSphereVisibility() == RimEclipseWellCollection::PIPES_FORCE_ALL_ON)
|
||||
return true;
|
||||
|
||||
if (m_reservoirView->wellCollection()->wellSphereVisibility() == RimEclipseWellCollection::PIPES_FORCE_ALL_OFF)
|
||||
if (!this->showWell())
|
||||
return false;
|
||||
|
||||
if (this->showWell() == false)
|
||||
if (!m_reservoirView->wellCollection()->showWellSpheres())
|
||||
return false;
|
||||
|
||||
if (this->showWellSpheres() == false)
|
||||
if (!this->showWellSpheres())
|
||||
return false;
|
||||
|
||||
if (m_reservoirView->wellCollection()->wellSphereVisibility() == RimEclipseWellCollection::PIPES_INDIVIDUALLY)
|
||||
return true;
|
||||
|
||||
if (m_reservoirView->crossSectionCollection()->hasActiveIntersectionForSimulationWell(this))
|
||||
return true;
|
||||
|
||||
if (m_reservoirView->wellCollection()->wellSphereVisibility() == RimEclipseWellCollection::PIPES_OPEN_IN_VISIBLE_CELLS)
|
||||
if (m_reservoirView->wellCollection()->showWellsIntersectingVisibleCells())
|
||||
{
|
||||
return visibleCellsInstersectsWell(frameIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
CVF_ASSERT(false); // Never end here. have you added new pipe visibility modes ?
|
||||
|
||||
|
||||
@@ -70,15 +70,18 @@ public:
|
||||
caf::PdmField<bool> showWell;
|
||||
|
||||
caf::PdmField<QString> name;
|
||||
|
||||
caf::PdmField<bool> showWellLabel;
|
||||
caf::PdmField<bool> showWellHead;
|
||||
caf::PdmField<bool> showWellPipe;
|
||||
caf::PdmField<bool> showWellSpheres;
|
||||
|
||||
caf::PdmField<double> pipeScaleFactor;
|
||||
|
||||
caf::PdmField<cvf::Color3f> wellPipeColor;
|
||||
|
||||
caf::PdmField<bool> showWellCells;
|
||||
caf::PdmField<bool> showWellCellFence;
|
||||
|
||||
caf::PdmField<bool> showWellPipes;
|
||||
caf::PdmField<bool> showWellSpheres;
|
||||
caf::PdmField<cvf::Color3f> wellPipeColor;
|
||||
caf::PdmField<double> pipeRadiusScaleFactor;
|
||||
|
||||
caf::PdmChildField<RimSimWellFractureCollection*> simwellFractureCollection;
|
||||
|
||||
|
||||
@@ -22,14 +22,20 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RigSingleWellResultsData.h"
|
||||
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEclipseWell.h"
|
||||
|
||||
#include "RivReservoirViewPartMgr.h"
|
||||
|
||||
#include "cafPdmUiPushButtonEditor.h"
|
||||
|
||||
|
||||
namespace caf
|
||||
{
|
||||
// OBSOLETE enum
|
||||
template<>
|
||||
void RimEclipseWellCollection::WellVisibilityEnum::setUp()
|
||||
{
|
||||
@@ -69,8 +75,8 @@ namespace caf
|
||||
template<>
|
||||
void RimEclipseWellCollection::WellHeadPositionEnum::setUp()
|
||||
{
|
||||
addItem(RimEclipseWellCollection::WELLHEAD_POS_ACTIVE_CELLS_BB, "WELLHEAD_POS_ACTIVE_CELLS_BB", "Top of active cells BB");
|
||||
addItem(RimEclipseWellCollection::WELLHEAD_POS_TOP_COLUMN, "WELLHEAD_POS_TOP_COLUMN", "Top of active cells IJ-column");
|
||||
addItem(RimEclipseWellCollection::WELLHEAD_POS_ACTIVE_CELLS_BB, "WELLHEAD_POS_ACTIVE_CELLS_BB", "All Active Cells");
|
||||
addItem(RimEclipseWellCollection::WELLHEAD_POS_TOP_COLUMN, "WELLHEAD_POS_TOP_COLUMN", "Active Cell Column");
|
||||
setDefault(RimEclipseWellCollection::WELLHEAD_POS_TOP_COLUMN);
|
||||
}
|
||||
}
|
||||
@@ -98,34 +104,59 @@ RimEclipseWellCollection::RimEclipseWellCollection()
|
||||
CAF_PDM_InitField(&isActive, "Active", true, "Active", "", "", "");
|
||||
isActive.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitField(&showWellHead, "ShowWellHead", true, "Show well heads", "", "", "");
|
||||
CAF_PDM_InitField(&showWellLabel, "ShowWellLabel", true, "Show well labels", "", "", "");
|
||||
CAF_PDM_InitField(&wellHeadScaleFactor, "WellHeadScale", 1.0, "Well head scale", "", "", "");
|
||||
CAF_PDM_InitField(&wellHeadPosition, "WellHeadPosition", WellHeadPositionEnum(WELLHEAD_POS_TOP_COLUMN), "Well head position", "", "", "");
|
||||
CAF_PDM_InitField(&showWellsIntersectingVisibleCells, "ShowWellsIntersectingVisibleCells", true, "Show Wells Intersecting Visible Cells", "", "", "");
|
||||
|
||||
// Appearance
|
||||
CAF_PDM_InitField(&showWellHead, "ShowWellHead", true, "Show Well Head", "", "", "");
|
||||
CAF_PDM_InitField(&showWellLabel, "ShowWellLabel", true, "Show Well Label", "", "", "");
|
||||
CAF_PDM_InitField(&showWellPipe, "ShowWellPipe", true, "Show Well Pipe", "", "", "");
|
||||
CAF_PDM_InitField(&showWellSpheres, "ShowWellSpheres", true, "Show Well Spheres", "", "", "");
|
||||
|
||||
// Scaling
|
||||
CAF_PDM_InitField(&wellHeadScaleFactor, "WellHeadScale", 1.0, "Well Head Scale Factor", "", "", "");
|
||||
CAF_PDM_InitField(&pipeScaleFactor, "WellPipeRadiusScale", 0.1, "Well Pipe Scale Factor", "", "", "");
|
||||
CAF_PDM_InitField(&spheresScaleFactor, "CellCenterSphereScale", 0.2, "Well Sphere Scale Factor", "", "", "");
|
||||
|
||||
// Color
|
||||
cvf::Color3f defWellLabelColor = RiaApplication::instance()->preferences()->defaultWellLabelColor();
|
||||
CAF_PDM_InitField(&wellLabelColor, "WellLabelColor", defWellLabelColor, "Well label color", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&wellPipeVisibility, "GlobalWellPipeVisibility", WellVisibilityEnum(PIPES_OPEN_IN_VISIBLE_CELLS), "Global well pipe visibility", "", "", "");
|
||||
CAF_PDM_InitField(&showConnectionStatusColors, "ShowConnectionStatusColors", true, "Show Connection Status Colors Along Well", "", "", "");
|
||||
|
||||
cvf::Color3f defaultApplyColor = cvf::Color3f::YELLOW;
|
||||
CAF_PDM_InitField(&m_wellColorForApply, "WellColorForApply", defaultApplyColor, "Single Well Color", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_applySingleColorToWells, "ApplySingleColorToWells", false, "", "", "", "");
|
||||
m_applySingleColorToWells.uiCapability()->setUiEditorTypeName(caf::PdmUiPushButtonEditor::uiEditorTypeName());
|
||||
m_applySingleColorToWells.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN);
|
||||
m_applySingleColorToWells.xmlCapability()->setIOReadable(false);
|
||||
m_applySingleColorToWells.xmlCapability()->setIOWritable(false);
|
||||
|
||||
CAF_PDM_InitField(&m_applyIndividualColorsToWells, "ApplyIndividualColorsToWells", false, "", "", "", "");
|
||||
m_applyIndividualColorsToWells.uiCapability()->setUiEditorTypeName(caf::PdmUiPushButtonEditor::uiEditorTypeName());
|
||||
m_applyIndividualColorsToWells.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN);
|
||||
m_applyIndividualColorsToWells.xmlCapability()->setIOReadable(false);
|
||||
m_applyIndividualColorsToWells.xmlCapability()->setIOWritable(false);
|
||||
|
||||
CAF_PDM_InitField(&pipeRadiusScaleFactor, "WellPipeRadiusScale", 0.1, "Pipe radius scale", "", "", "");
|
||||
CAF_PDM_InitField(&pipeCrossSectionVertexCount, "WellPipeVertexCount", 12, "Pipe vertex count", "", "", "");
|
||||
pipeCrossSectionVertexCount.uiCapability()->setUiHidden(true);
|
||||
CAF_PDM_InitField(&wellPipeCoordType, "WellPipeCoordType", WellPipeCoordEnum(WELLPIPE_INTERPOLATED), "Well Pipe Coords", "", "", "");
|
||||
CAF_PDM_InitField(&wellPipeCoordType, "WellPipeCoordType", WellPipeCoordEnum(WELLPIPE_INTERPOLATED), "Well Pipe Geometry", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&wellCellsToRangeFilterMode, "GlobalWellCellVisibility", WellCellsRangeFilterEnum(RANGE_ADD_NONE), "Add cells to range filter", "", "", "");
|
||||
CAF_PDM_InitField(&showWellCellFences, "ShowWellFences", false, "Use well fence", "", "", "");
|
||||
CAF_PDM_InitField(&wellCellFenceType, "DefaultWellFenceDirection", WellFenceEnum(K_DIRECTION), "Well Fence direction", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&wellCellTransparencyLevel, "WellCellTransparency", 0.5, "Well cell transparency", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&isAutoDetectingBranches, "IsAutoDetectingBranches", true, "Geometry based branch detection", "", "Toggle wether the well pipe visualization will try to detect when a part of the well \nis really a branch, and thus is starting from wellhead", "");
|
||||
|
||||
CAF_PDM_InitField(&wellSphereVisibility, "wellSphereVisibility", WellVisibilityEnum(PIPES_FORCE_ALL_OFF), "Global well sphere visibility", "", "", "");
|
||||
CAF_PDM_InitField(&cellCenterSpheresScaleFactor, "CellCenterSphereScale", 0.2, "Cell Center sphere radius", "", "", "");
|
||||
CAF_PDM_InitField(&wellCellTransparencyLevel, "WellCellTransparency", 0.5, "Well Cell Transparency", "", "", "");
|
||||
CAF_PDM_InitField(&isAutoDetectingBranches, "IsAutoDetectingBranches", true, "Branch Detection", "", "Toggle wether the well pipe visualization will try to detect when a part of the well \nis really a branch, and thus is starting from wellhead", "");
|
||||
CAF_PDM_InitField(&wellHeadPosition, "WellHeadPosition", WellHeadPositionEnum(WELLHEAD_POS_TOP_COLUMN), "Well Head Position On Top Of", "", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&wells, "Wells", "Wells", "", "", "");
|
||||
wells.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitField(&obsoleteField_wellPipeVisibility, "GlobalWellPipeVisibility", WellVisibilityEnum(PIPES_OPEN_IN_VISIBLE_CELLS), "Global well pipe visibility", "", "", "");
|
||||
obsoleteField_wellPipeVisibility.uiCapability()->setUiHidden(true);
|
||||
obsoleteField_wellPipeVisibility.xmlCapability()->setIOWritable(false);
|
||||
|
||||
m_reservoirView = NULL;
|
||||
}
|
||||
|
||||
@@ -188,15 +219,12 @@ bool RimEclipseWellCollection::hasVisibleWellCells()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Used to know if we need animation of timesteps due to the wells
|
||||
/// Used to know if we need animation of time steps due to the wells
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimEclipseWellCollection::hasVisibleWellPipes()
|
||||
{
|
||||
if (!this->isActive()) return false;
|
||||
if (this->wellPipeVisibility() == PIPES_FORCE_ALL_OFF && this->wellSphereVisibility() == PIPES_FORCE_ALL_OFF ) return false;
|
||||
if (this->wells().size() == 0 ) return false;
|
||||
if (this->wellPipeVisibility() == PIPES_FORCE_ALL_ON) return true;
|
||||
if (this->wellSphereVisibility() == PIPES_FORCE_ALL_ON) return true;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -206,77 +234,88 @@ bool RimEclipseWellCollection::hasVisibleWellPipes()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseWellCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
if (&showWellLabel == changedField || &isActive == changedField)
|
||||
if (&isActive == changedField)
|
||||
{
|
||||
this->updateUiIconFromToggleField();
|
||||
|
||||
if (m_reservoirView)
|
||||
{
|
||||
m_reservoirView->scheduleGeometryRegen(VISIBLE_WELL_CELLS);
|
||||
m_reservoirView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
if (&wellCellsToRangeFilterMode == changedField)
|
||||
{
|
||||
if (m_reservoirView)
|
||||
{
|
||||
m_reservoirView->scheduleGeometryRegen(VISIBLE_WELL_CELLS);
|
||||
m_reservoirView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
else if (&showWellCellFences == changedField)
|
||||
{
|
||||
if (m_reservoirView)
|
||||
{
|
||||
m_reservoirView->scheduleGeometryRegen(VISIBLE_WELL_CELLS);
|
||||
m_reservoirView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
else if (&wellCellTransparencyLevel == changedField)
|
||||
{
|
||||
if (m_reservoirView)
|
||||
{
|
||||
m_reservoirView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
else if ( &wellSphereVisibility == changedField
|
||||
|| &cellCenterSpheresScaleFactor == changedField)
|
||||
{
|
||||
if (m_reservoirView)
|
||||
{
|
||||
m_reservoirView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
else if (&wellCellFenceType == changedField)
|
||||
if (m_reservoirView)
|
||||
{
|
||||
if (m_reservoirView)
|
||||
{
|
||||
if ( &isActive == changedField
|
||||
|| &showWellLabel == changedField
|
||||
|| &wellCellsToRangeFilterMode == changedField
|
||||
|| &showWellCellFences == changedField
|
||||
|| &wellCellFenceType == changedField)
|
||||
{
|
||||
m_reservoirView->scheduleGeometryRegen(VISIBLE_WELL_CELLS);
|
||||
m_reservoirView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
else if (&wellPipeVisibility == changedField)
|
||||
{
|
||||
if (m_reservoirView)
|
||||
{
|
||||
else if (&wellCellTransparencyLevel == changedField)
|
||||
{
|
||||
m_reservoirView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
else if ( &pipeCrossSectionVertexCount == changedField
|
||||
|| &pipeRadiusScaleFactor == changedField
|
||||
|| &wellHeadScaleFactor == changedField
|
||||
|| &showWellHead == changedField
|
||||
|| &isAutoDetectingBranches == changedField
|
||||
|| &wellHeadPosition == changedField
|
||||
|| &wellLabelColor == changedField
|
||||
|| &wellPipeCoordType == changedField)
|
||||
{
|
||||
if (m_reservoirView)
|
||||
else if ( &spheresScaleFactor == changedField
|
||||
|| &showWellSpheres == changedField
|
||||
|| &showConnectionStatusColors == changedField)
|
||||
{
|
||||
m_reservoirView->schedulePipeGeometryRegen();
|
||||
m_reservoirView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
else if ( &pipeCrossSectionVertexCount == changedField
|
||||
|| &pipeScaleFactor == changedField
|
||||
|| &wellHeadScaleFactor == changedField
|
||||
|| &showWellHead == changedField
|
||||
|| &isAutoDetectingBranches == changedField
|
||||
|| &wellHeadPosition == changedField
|
||||
|| &wellLabelColor == changedField
|
||||
|| &showWellsIntersectingVisibleCells == changedField
|
||||
|| &wellPipeCoordType == changedField
|
||||
|| &showWellPipe == changedField)
|
||||
{
|
||||
m_reservoirView->schedulePipeGeometryRegen();
|
||||
m_reservoirView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
if ( &showWellPipe == changedField
|
||||
|| &showWellSpheres == changedField
|
||||
|| &showWellHead == changedField
|
||||
|| &showWellLabel == changedField)
|
||||
{
|
||||
for (RimEclipseWell* w : wells)
|
||||
{
|
||||
w->updateConnectedEditors();
|
||||
}
|
||||
}
|
||||
|
||||
if (&m_applyIndividualColorsToWells == changedField)
|
||||
{
|
||||
for (size_t i = 0; i < wells.size(); i++)
|
||||
{
|
||||
cvf::Color3f col = cycledPaletteColor(i);
|
||||
|
||||
wells[i]->wellPipeColor = col;
|
||||
wells[i]->updateConnectedEditors();
|
||||
}
|
||||
|
||||
if (m_reservoirView) m_reservoirView->scheduleCreateDisplayModelAndRedraw();
|
||||
|
||||
m_applyIndividualColorsToWells = false;
|
||||
}
|
||||
|
||||
if (&m_applySingleColorToWells == changedField)
|
||||
{
|
||||
cvf::Color3f col = m_wellColorForApply();
|
||||
|
||||
for (size_t i = 0; i < wells.size(); i++)
|
||||
{
|
||||
wells[i]->wellPipeColor = col;
|
||||
wells[i]->updateConnectedEditors();
|
||||
}
|
||||
|
||||
if (m_reservoirView) m_reservoirView->scheduleCreateDisplayModelAndRedraw();
|
||||
|
||||
m_applySingleColorToWells = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -293,30 +332,40 @@ void RimEclipseWellCollection::setReservoirView(RimEclipseView* ownerReservoirVi
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseWellCollection::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
uiOrdering.add(&showWellsIntersectingVisibleCells);
|
||||
|
||||
caf::PdmUiGroup* appearanceGroup = uiOrdering.addNewGroup("Appearance");
|
||||
appearanceGroup->add(&showWellLabel);
|
||||
appearanceGroup->add(&showWellHead);
|
||||
appearanceGroup->add(&showWellPipe);
|
||||
appearanceGroup->add(&showWellSpheres);
|
||||
|
||||
caf::PdmUiGroup* sizeScalingGroup = uiOrdering.addNewGroup("Size Scaling");
|
||||
sizeScalingGroup->add(&wellHeadScaleFactor);
|
||||
sizeScalingGroup->add(&pipeScaleFactor);
|
||||
sizeScalingGroup->add(&spheresScaleFactor);
|
||||
|
||||
caf::PdmUiGroup* colorGroup = uiOrdering.addNewGroup("Color");
|
||||
colorGroup->add(&wellLabelColor);
|
||||
colorGroup->add(&m_applyIndividualColorsToWells);
|
||||
|
||||
colorGroup->add(&m_wellColorForApply);
|
||||
colorGroup->add(&m_applySingleColorToWells);
|
||||
|
||||
colorGroup->add(&showConnectionStatusColors);
|
||||
|
||||
uiOrdering.add(&wellPipeCoordType);
|
||||
|
||||
caf::PdmUiGroup* advancedGroup = uiOrdering.addNewGroup("Advanced");
|
||||
advancedGroup->add(&isAutoDetectingBranches);
|
||||
advancedGroup->add(&wellCellTransparencyLevel);
|
||||
|
||||
uiOrdering.add(&wellHeadPosition);
|
||||
|
||||
caf::PdmUiGroup* filterGroup = uiOrdering.addNewGroup("Well range filter");
|
||||
filterGroup->add(&wellCellsToRangeFilterMode);
|
||||
filterGroup->add(&showWellCellFences);
|
||||
filterGroup->add(&wellCellFenceType);
|
||||
|
||||
caf::PdmUiGroup* wellHeadGroup = uiOrdering.addNewGroup("Well head");
|
||||
wellHeadGroup->add(&showWellHead);
|
||||
wellHeadGroup->add(&wellHeadScaleFactor);
|
||||
wellHeadGroup->add(&showWellLabel);
|
||||
wellHeadGroup->add(&wellHeadPosition);
|
||||
wellHeadGroup->add(&wellLabelColor);
|
||||
|
||||
caf::PdmUiGroup* wellPipe = uiOrdering.addNewGroup("Well pipe");
|
||||
wellPipe->add(&wellPipeVisibility);
|
||||
wellPipe->add(&pipeRadiusScaleFactor);
|
||||
wellPipe->add(&wellPipeCoordType);
|
||||
|
||||
caf::PdmUiGroup* cellCenterSpheres = uiOrdering.addNewGroup("Well cell center spheres");
|
||||
cellCenterSpheres->add(&wellSphereVisibility);
|
||||
cellCenterSpheres->add(&cellCenterSpheresScaleFactor);
|
||||
|
||||
caf::PdmUiGroup* advancedGroup = uiOrdering.addNewGroup("Advanced");
|
||||
advancedGroup->add(&wellCellTransparencyLevel);
|
||||
advancedGroup->add(&isAutoDetectingBranches);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -328,6 +377,72 @@ caf::PdmFieldHandle* RimEclipseWellCollection::objectToggleField()
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseWellCollection::initAfterRead()
|
||||
{
|
||||
if (obsoleteField_wellPipeVisibility() == PIPES_OPEN_IN_VISIBLE_CELLS)
|
||||
{
|
||||
showWellsIntersectingVisibleCells = true;
|
||||
}
|
||||
else if (obsoleteField_wellPipeVisibility() == PIPES_FORCE_ALL_OFF)
|
||||
{
|
||||
showWellsIntersectingVisibleCells = false;
|
||||
|
||||
for (RimEclipseWell* w : wells)
|
||||
{
|
||||
w->showWell = false;
|
||||
}
|
||||
}
|
||||
else if (obsoleteField_wellPipeVisibility() == PIPES_FORCE_ALL_ON)
|
||||
{
|
||||
showWellsIntersectingVisibleCells = false;
|
||||
|
||||
for (RimEclipseWell* w : wells)
|
||||
{
|
||||
w->showWell = true;
|
||||
}
|
||||
}
|
||||
else if (obsoleteField_wellPipeVisibility() == PIPES_INDIVIDUALLY)
|
||||
{
|
||||
showWellsIntersectingVisibleCells = false;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseWellCollection::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute)
|
||||
{
|
||||
if (&m_applyIndividualColorsToWells == field)
|
||||
{
|
||||
caf::PdmUiPushButtonEditorAttribute* editorAttr = dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>(attribute);
|
||||
if (editorAttr)
|
||||
{
|
||||
editorAttr->m_buttonText = "Apply Individual Well Colors";
|
||||
}
|
||||
}
|
||||
|
||||
if (&m_applySingleColorToWells == field)
|
||||
{
|
||||
caf::PdmUiPushButtonEditorAttribute* editorAttr = dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>(attribute);
|
||||
if (editorAttr)
|
||||
{
|
||||
QColor col;
|
||||
col.setRgbF(m_wellColorForApply().r(), m_wellColorForApply().g(), m_wellColorForApply().b());
|
||||
|
||||
QPixmap pixmap(100, 100);
|
||||
pixmap.fill(col);
|
||||
|
||||
QIcon colorIcon(pixmap);
|
||||
|
||||
editorAttr->m_buttonIcon = colorIcon;
|
||||
editorAttr->m_buttonText = "Apply Single Well Color";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -367,6 +482,39 @@ void RimEclipseWellCollection::calculateWellGeometryVisibility(size_t frameIndex
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// TODO: Consider creating a factory for colors, see also RimSummaryCurveAppearanceCalculator
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Color3f RimEclipseWellCollection::cycledPaletteColor(size_t colorIndex)
|
||||
{
|
||||
static const size_t colorCount = 15;
|
||||
static const cvf::ubyte colorData[][3] =
|
||||
{
|
||||
{ 0, 112, 136 }, // Dark Green-Blue
|
||||
{ 202, 0, 0 }, // Red
|
||||
{ 78, 204, 0 }, // Clear Green
|
||||
{ 236, 118, 0 }, // Orange
|
||||
{ 0 , 0, 0 }, // Black
|
||||
{ 56, 56, 255 }, // Vivid Blue
|
||||
{ 248, 0, 170 }, // Magenta
|
||||
{ 169, 2, 240 }, // Purple
|
||||
{ 0, 221, 221 }, // Turquoise
|
||||
{ 201, 168, 206 }, // Light Violet
|
||||
{ 0, 205, 68 }, // Bluish Green
|
||||
{ 236, 188, 0 }, // Mid Yellow
|
||||
{ 51, 204, 255 }, // Bluer Turquoise
|
||||
{ 164, 193, 0 }, // Mid Yellowish Green
|
||||
{ 0, 143, 239 }, // Dark Light Blue
|
||||
};
|
||||
|
||||
size_t paletteIdx = colorIndex % colorCount;
|
||||
|
||||
cvf::Color3ub ubColor(colorData[paletteIdx][0], colorData[paletteIdx][1], colorData[paletteIdx][2]);
|
||||
cvf::Color3f cvfColor(ubColor);
|
||||
|
||||
return cvfColor;
|
||||
}
|
||||
|
||||
bool lessEclipseWell(const caf::PdmPointer<RimEclipseWell>& w1, const caf::PdmPointer<RimEclipseWell>& w2)
|
||||
{
|
||||
if (w1.notNull() && w2.notNull())
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
// Include to make Pdm work for cvf::Color
|
||||
#include "cafPdmFieldCvfColor.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
class RimEclipseView;
|
||||
class RimEclipseWell;
|
||||
|
||||
@@ -88,31 +86,33 @@ public:
|
||||
typedef caf::AppEnum<RimEclipseWellCollection::WellPipeCoordType> WellPipeCoordEnum;
|
||||
|
||||
|
||||
caf::PdmField<bool> showWellLabel;
|
||||
caf::PdmField<cvf::Color3f> wellLabelColor;
|
||||
|
||||
caf::PdmField<bool> isActive;
|
||||
caf::PdmField<bool> showWellsIntersectingVisibleCells;
|
||||
|
||||
caf::PdmField<bool> showWellLabel;
|
||||
caf::PdmField<bool> showWellHead;
|
||||
caf::PdmField<bool> showWellPipe;
|
||||
caf::PdmField<bool> showWellSpheres;
|
||||
|
||||
caf::PdmField<double> wellHeadScaleFactor;
|
||||
caf::PdmField<double> pipeScaleFactor;
|
||||
caf::PdmField<double> spheresScaleFactor;
|
||||
|
||||
caf::PdmField<cvf::Color3f> wellLabelColor;
|
||||
caf::PdmField<bool> showConnectionStatusColors;
|
||||
|
||||
|
||||
caf::PdmField<WellCellsRangeFilterEnum> wellCellsToRangeFilterMode;
|
||||
caf::PdmField<bool> showWellCellFences;
|
||||
caf::PdmField<WellFenceEnum> wellCellFenceType;
|
||||
caf::PdmField<double> wellCellTransparencyLevel;
|
||||
|
||||
caf::PdmField<WellVisibilityEnum> wellPipeVisibility;
|
||||
caf::PdmField<double> pipeRadiusScaleFactor;
|
||||
caf::PdmField<int> pipeCrossSectionVertexCount;
|
||||
caf::PdmField<WellPipeCoordEnum> wellPipeCoordType;
|
||||
|
||||
caf::PdmField<double> wellHeadScaleFactor;
|
||||
caf::PdmField<bool> showWellHead;
|
||||
caf::PdmField<WellHeadPositionEnum> wellHeadPosition;
|
||||
|
||||
|
||||
caf::PdmField<bool> isAutoDetectingBranches;
|
||||
|
||||
caf::PdmField<WellVisibilityEnum> wellSphereVisibility;
|
||||
caf::PdmField<double> cellCenterSpheresScaleFactor;
|
||||
|
||||
|
||||
caf::PdmChildArrayField<RimEclipseWell*> wells;
|
||||
|
||||
@@ -125,14 +125,25 @@ public:
|
||||
void scheduleIsWellPipesVisibleRecalculation();
|
||||
|
||||
protected:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
|
||||
virtual caf::PdmFieldHandle* objectToggleField();
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
virtual caf::PdmFieldHandle* objectToggleField() override;
|
||||
virtual void initAfterRead() override;
|
||||
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
|
||||
|
||||
private:
|
||||
|
||||
void calculateWellGeometryVisibility(size_t frameIndex);
|
||||
static cvf::Color3f cycledPaletteColor(size_t colorIndex);
|
||||
|
||||
RimEclipseView* m_reservoirView;
|
||||
std::vector< std::vector< cvf::ubyte > >
|
||||
m_framesOfResultWellPipeVisibilities;
|
||||
private:
|
||||
RimEclipseView* m_reservoirView;
|
||||
std::vector< std::vector< cvf::ubyte > > m_framesOfResultWellPipeVisibilities;
|
||||
|
||||
// Fields
|
||||
caf::PdmField<cvf::Color3f> m_wellColorForApply;
|
||||
caf::PdmField<bool> m_applySingleColorToWells;
|
||||
caf::PdmField<bool> m_applyIndividualColorsToWells;
|
||||
|
||||
// Obsolete fields
|
||||
caf::PdmField<WellVisibilityEnum> obsoleteField_wellPipeVisibility;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user