mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3677 2d Maps: Make sure property filters are handled correctly.
This commit is contained in:
@@ -175,7 +175,7 @@ void RimContourMapView::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrder
|
||||
uiTreeOrdering.add(wellCollection());
|
||||
uiTreeOrdering.add(faultCollection());
|
||||
uiTreeOrdering.add(m_rangeFilterCollection());
|
||||
uiTreeOrdering.add(nonOverridePropertyFilterCollection());
|
||||
uiTreeOrdering.add(nativePropertyFilterCollection());
|
||||
|
||||
uiTreeOrdering.skipRemainingChildren();
|
||||
}
|
||||
@@ -185,15 +185,32 @@ void RimContourMapView::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrder
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimContourMapView::updateCurrentTimeStep()
|
||||
{
|
||||
static_cast<RimEclipsePropertyFilterCollection*>(nativePropertyFilterCollection())->updateFromCurrentTimeStep();
|
||||
|
||||
this->updateVisibleGeometriesAndCellColors();
|
||||
|
||||
if (m_contourMapProjection->isChecked())
|
||||
{
|
||||
m_contourMapProjection->generateResults();
|
||||
}
|
||||
|
||||
static_cast<RimEclipsePropertyFilterCollection*>(nonOverridePropertyFilterCollection())->updateFromCurrentTimeStep();
|
||||
|
||||
updateLegends(); // To make sure the scalar mappers are set up correctly
|
||||
|
||||
appendWellsAndFracturesToModel();
|
||||
|
||||
appendContourMapProjectionToModel();
|
||||
|
||||
if (m_overlayInfoConfig->isActive())
|
||||
{
|
||||
m_overlayInfoConfig()->update3DInfo();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimContourMapView::appendContourMapProjectionToModel()
|
||||
{
|
||||
if (m_viewer && m_contourMapProjection->isChecked())
|
||||
{
|
||||
cvf::Scene* frameScene = m_viewer->frame(m_currentTimeStep);
|
||||
@@ -210,10 +227,6 @@ void RimContourMapView::updateCurrentTimeStep()
|
||||
contourMapProjectionModelBasicList->updateBoundingBoxesRecursive();
|
||||
frameScene->addModel(contourMapProjectionModelBasicList.p());
|
||||
|
||||
if (m_overlayInfoConfig->isActive())
|
||||
{
|
||||
m_overlayInfoConfig()->update3DInfo();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,3 +315,17 @@ caf::PdmFieldHandle* RimContourMapView::userDescriptionField()
|
||||
{
|
||||
return m_nameConfig()->nameField();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<RivCellSetEnum> RimContourMapView::allVisibleFaultGeometryTypes() const
|
||||
{
|
||||
std::set<RivCellSetEnum> faultGeoTypes;
|
||||
// Normal eclipse views always shows faults for active and visible eclipse cells.
|
||||
if (faultCollection()->showFaultCollection())
|
||||
{
|
||||
faultGeoTypes = RimEclipseView::allVisibleFaultGeometryTypes();
|
||||
}
|
||||
return faultGeoTypes;
|
||||
}
|
||||
|
||||
@@ -39,14 +39,20 @@ protected:
|
||||
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
|
||||
void updateCurrentTimeStep() override;
|
||||
|
||||
void appendContourMapProjectionToModel();
|
||||
|
||||
void updateLegends() override;
|
||||
void updateViewWidgetAfterCreation() override;
|
||||
void updateViewFollowingRangeFilterUpdates() override;
|
||||
void onLoadDataAndUpdate() override;
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
|
||||
caf::PdmFieldHandle* userDescriptionField() override;
|
||||
|
||||
|
||||
virtual std::set<RivCellSetEnum> allVisibleFaultGeometryTypes() const override;
|
||||
|
||||
private:
|
||||
cvf::ref<RivContourMapProjectionPartMgr> m_contourMapProjectionPartMgr;
|
||||
caf::PdmChildField<RimContourMapProjection*> m_contourMapProjection;
|
||||
|
||||
@@ -565,6 +565,22 @@ void RimEclipseView::updateCurrentTimeStep()
|
||||
|
||||
updateLegends(); // To make sure the scalar mappers are set up correctly
|
||||
|
||||
updateVisibleGeometriesAndCellColors();
|
||||
|
||||
appendWellsAndFracturesToModel();
|
||||
|
||||
m_overlayInfoConfig()->update3DInfo();
|
||||
|
||||
// Invisible Wells are marked as read only when "show wells intersecting visible cells" is enabled
|
||||
// Visibility of wells differ betweeen time steps, so trigger a rebuild of tree state items
|
||||
wellCollection()->updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseView::updateVisibleGeometriesAndCellColors()
|
||||
{
|
||||
std::vector<RivCellSetEnum> geometriesToRecolor;
|
||||
|
||||
if (this->viewController() && this->viewController()->isVisibleCellsOveridden())
|
||||
@@ -578,10 +594,10 @@ void RimEclipseView::updateCurrentTimeStep()
|
||||
|
||||
std::vector<size_t> gridIndices = this->indicesToVisibleGrids();
|
||||
|
||||
geometriesToRecolor.push_back( PROPERTY_FILTERED);
|
||||
geometriesToRecolor.push_back( PROPERTY_FILTERED_WELL_CELLS);
|
||||
geometriesToRecolor.push_back(PROPERTY_FILTERED);
|
||||
geometriesToRecolor.push_back(PROPERTY_FILTERED_WELL_CELLS);
|
||||
|
||||
if ( isGridVisualizationMode() )
|
||||
if (isGridVisualizationMode())
|
||||
{
|
||||
m_reservoirGridPartManager->appendDynamicGeometryPartsToModel(frameParts.p(), PROPERTY_FILTERED, m_currentTimeStep, gridIndices);
|
||||
m_reservoirGridPartManager->appendDynamicGeometryPartsToModel(frameParts.p(), PROPERTY_FILTERED_WELL_CELLS, m_currentTimeStep, gridIndices);
|
||||
@@ -619,19 +635,19 @@ void RimEclipseView::updateCurrentTimeStep()
|
||||
}
|
||||
|
||||
// Set the transparency on all the Wellcell parts before setting the result color
|
||||
float opacity = static_cast< float> (1 - cvf::Math::clamp(this->wellCollection()->wellCellTransparencyLevel(), 0.0, 1.0));
|
||||
float opacity = static_cast<float> (1 - cvf::Math::clamp(this->wellCollection()->wellCellTransparencyLevel(), 0.0, 1.0));
|
||||
m_reservoirGridPartManager->updateCellColor(PROPERTY_FILTERED_WELL_CELLS, m_currentTimeStep, cvf::Color4f(cvf::Color3f(cvf::Color3::WHITE), opacity));
|
||||
|
||||
|
||||
if (this->showInactiveCells())
|
||||
{
|
||||
if (this->rangeFilterCollection()->hasActiveFilters() ) // Wells not considered, because we do not have a INACTIVE_WELL_CELLS group yet.
|
||||
if (this->rangeFilterCollection()->hasActiveFilters()) // Wells not considered, because we do not have a INACTIVE_WELL_CELLS group yet.
|
||||
{
|
||||
m_reservoirGridPartManager->appendStaticGeometryPartsToModel(frameParts.p(), RANGE_FILTERED_INACTIVE, gridIndices);
|
||||
m_reservoirGridPartManager->appendStaticGeometryPartsToModel(frameParts.p(), RANGE_FILTERED_INACTIVE, gridIndices);
|
||||
|
||||
if (!faultCollection()->isShowingFaultsAndFaultsOutsideFilters())
|
||||
{
|
||||
m_reservoirGridPartManager->appendFaultsStaticGeometryPartsToModel(frameParts.p(), RANGE_FILTERED_INACTIVE);
|
||||
m_reservoirGridPartManager->appendFaultsStaticGeometryPartsToModel(frameParts.p(), RANGE_FILTERED_INACTIVE);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -673,7 +689,7 @@ void RimEclipseView::updateCurrentTimeStep()
|
||||
geometriesToRecolor.push_back(RANGE_FILTERED);
|
||||
geometriesToRecolor.push_back(RANGE_FILTERED_WELL_CELLS);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
geometriesToRecolor.push_back(ACTIVE);
|
||||
geometriesToRecolor.push_back(ALL_WELL_CELLS);
|
||||
@@ -684,7 +700,7 @@ void RimEclipseView::updateCurrentTimeStep()
|
||||
if (this->hasUserRequestedAnimation() && this->cellEdgeResult()->hasResult())
|
||||
{
|
||||
m_reservoirGridPartManager->updateCellEdgeResultColor(geometriesToRecolor[i], m_currentTimeStep, this->cellResult(), this->cellEdgeResult());
|
||||
}
|
||||
}
|
||||
else if ((this->hasUserRequestedAnimation() && this->cellResult()->hasResult()) || this->cellResult()->isTernarySaturationSelected())
|
||||
{
|
||||
m_reservoirGridPartManager->updateCellResultColor(geometriesToRecolor[i], m_currentTimeStep, this->cellResult());
|
||||
@@ -700,15 +716,21 @@ void RimEclipseView::updateCurrentTimeStep()
|
||||
|
||||
if ((this->hasUserRequestedAnimation() && this->cellResult()->hasResult()) || this->cellResult()->isTernarySaturationSelected())
|
||||
{
|
||||
m_crossSectionCollection->updateCellResultColor(m_currentTimeStep,
|
||||
this->cellResult()->legendConfig()->scalarMapper(),
|
||||
this->cellResult()->ternaryLegendConfig()->scalarMapper());
|
||||
m_crossSectionCollection->updateCellResultColor(m_currentTimeStep,
|
||||
this->cellResult()->legendConfig()->scalarMapper(),
|
||||
this->cellResult()->ternaryLegendConfig()->scalarMapper());
|
||||
}
|
||||
else
|
||||
{
|
||||
m_crossSectionCollection->applySingleColorEffect();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseView::appendWellsAndFracturesToModel()
|
||||
{
|
||||
if (m_viewer)
|
||||
{
|
||||
cvf::Scene* frameScene = m_viewer->frame(m_currentTimeStep);
|
||||
@@ -735,7 +757,7 @@ void RimEclipseView::updateCurrentTimeStep()
|
||||
{
|
||||
cvf::String name = "WellPathMod";
|
||||
this->removeModelByName(frameScene, name);
|
||||
|
||||
|
||||
cvf::ref<cvf::ModelBasicList> wellPathModelBasicList = new cvf::ModelBasicList;
|
||||
wellPathModelBasicList->setName(name);
|
||||
|
||||
@@ -774,15 +796,9 @@ void RimEclipseView::updateCurrentTimeStep()
|
||||
|
||||
simWellFracturesModelBasicList->updateBoundingBoxesRecursive();
|
||||
frameScene->addModel(simWellFracturesModelBasicList.p());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_overlayInfoConfig()->update3DInfo();
|
||||
|
||||
// Invisible Wells are marked as read only when "show wells intersecting visible cells" is enabled
|
||||
// Visibility of wells differ betweeen time steps, so trigger a rebuild of tree state items
|
||||
wellCollection()->updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1868,7 +1884,7 @@ const RimPropertyFilterCollection* RimEclipseView::propertyFilterCollection() co
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPropertyFilterCollection* RimEclipseView::nonOverridePropertyFilterCollection()
|
||||
RimPropertyFilterCollection* RimEclipseView::nativePropertyFilterCollection()
|
||||
{
|
||||
return m_propertyFilterCollection();
|
||||
}
|
||||
|
||||
@@ -92,7 +92,6 @@ public:
|
||||
|
||||
// Access internal objects
|
||||
const RimPropertyFilterCollection* propertyFilterCollection() const override;
|
||||
RimPropertyFilterCollection* nonOverridePropertyFilterCollection();
|
||||
|
||||
RimEclipsePropertyFilterCollection* eclipsePropertyFilterCollection();
|
||||
const RimEclipsePropertyFilterCollection* eclipsePropertyFilterCollection() const;
|
||||
@@ -138,7 +137,7 @@ public:
|
||||
|
||||
bool isUsingFormationNames() const override;
|
||||
|
||||
void calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility, int timeStep) override;
|
||||
virtual void calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility, int timeStep) override;
|
||||
|
||||
virtual std::vector<RimLegendConfig*> legendConfigs() const override;
|
||||
cvf::Color4f colorFromCellCategory(RivCellSetEnum geometryType) const;
|
||||
@@ -152,7 +151,12 @@ protected:
|
||||
void createPartCollectionFromSelection(cvf::Collection<cvf::Part>* parts) override;
|
||||
bool showActiveCellsOnly() override;
|
||||
virtual void updateCurrentTimeStep() override;
|
||||
void updateVisibleGeometriesAndCellColors();
|
||||
void appendWellsAndFracturesToModel();
|
||||
|
||||
virtual void createDisplayModel() override;
|
||||
RimPropertyFilterCollection* nativePropertyFilterCollection();
|
||||
virtual std::set<RivCellSetEnum> allVisibleFaultGeometryTypes() const;
|
||||
|
||||
private:
|
||||
void updateDisplayModelVisibility() override;
|
||||
@@ -169,7 +173,6 @@ private:
|
||||
void resetLegendsInViewer() override;
|
||||
void updateVirtualConnectionLegendRanges();
|
||||
|
||||
std::set<RivCellSetEnum> allVisibleFaultGeometryTypes() const;
|
||||
void updateFaultColors();
|
||||
|
||||
void syncronizeWellsWithResults();
|
||||
|
||||
Reference in New Issue
Block a user