#2426 Add working legends to 2D intersection Views. Refactor to make legend update code work from a separate view with separate legend configs. Make sure legend and results are updated as the main view is updated. Adjust legendconfig->setTitle to use QString

This commit is contained in:
Jacob Støren
2018-02-01 17:45:22 +01:00
parent a4eb16883b
commit 29ac24f3dd
29 changed files with 428 additions and 225 deletions

View File

@@ -101,7 +101,9 @@ void RivIntersectionBoxPartMgr::updateCellResultColor(size_t timeStepIndex)
{ {
if (cellResultColors->isTernarySaturationSelected()) if (cellResultColors->isTernarySaturationSelected())
{ {
RivTernaryTextureCoordsCreator texturer(cellResultColors, cellResultColors->ternaryLegendConfig(), timeStepIndex); RivTernaryTextureCoordsCreator texturer(cellResultColors,
cellResultColors->ternaryLegendConfig()->scalarMapper(),
timeStepIndex);
texturer.createTextureCoords(m_intersectionBoxFacesTextureCoords.p(), m_intersectionBoxGenerator->triangleToCellIndex()); texturer.createTextureCoords(m_intersectionBoxFacesTextureCoords.p(), m_intersectionBoxGenerator->triangleToCellIndex());

View File

@@ -89,8 +89,12 @@ void RivIntersectionPartMgr::applySingleColorEffect()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivIntersectionPartMgr::updateCellResultColor(size_t timeStepIndex) void RivIntersectionPartMgr::updateCellResultColor(size_t timeStepIndex,
const cvf::ScalarMapper* scalarColorMapper,
const RivTernaryScalarMapper* ternaryColorMapper)
{ {
CVF_ASSERT(scalarColorMapper);
if (m_crossSectionGenerator.isNull()) return; if (m_crossSectionGenerator.isNull()) return;
if (!m_crossSectionGenerator->isAnyGeometryPresent()) return; if (!m_crossSectionGenerator->isAnyGeometryPresent()) return;
@@ -102,6 +106,7 @@ void RivIntersectionPartMgr::updateCellResultColor(size_t timeStepIndex)
{ {
RimEclipseCellColors* cellResultColors = eclipseView->cellResult(); RimEclipseCellColors* cellResultColors = eclipseView->cellResult();
CVF_ASSERT(cellResultColors); CVF_ASSERT(cellResultColors);
CVF_ASSERT(ternaryColorMapper);
RigEclipseCaseData* eclipseCase = eclipseView->eclipseCase()->eclipseCaseData(); RigEclipseCaseData* eclipseCase = eclipseView->eclipseCase()->eclipseCaseData();
@@ -110,14 +115,13 @@ void RivIntersectionPartMgr::updateCellResultColor(size_t timeStepIndex)
{ {
if (cellResultColors->isTernarySaturationSelected()) if (cellResultColors->isTernarySaturationSelected())
{ {
RivTernaryTextureCoordsCreator texturer(cellResultColors, cellResultColors->ternaryLegendConfig(), timeStepIndex); RivTernaryTextureCoordsCreator texturer(cellResultColors, ternaryColorMapper, timeStepIndex);
texturer.createTextureCoords(m_crossSectionFacesTextureCoords.p(), m_crossSectionGenerator->triangleToCellIndex()); texturer.createTextureCoords(m_crossSectionFacesTextureCoords.p(), m_crossSectionGenerator->triangleToCellIndex());
const RivTernaryScalarMapper* mapper = cellResultColors->ternaryLegendConfig()->scalarMapper();
RivScalarMapperUtils::applyTernaryTextureResultsToPart(m_crossSectionFaces.p(), RivScalarMapperUtils::applyTernaryTextureResultsToPart(m_crossSectionFaces.p(),
m_crossSectionFacesTextureCoords.p(), m_crossSectionFacesTextureCoords.p(),
mapper, ternaryColorMapper,
1.0, 1.0,
caf::FC_NONE, caf::FC_NONE,
eclipseView->isLightingDisabled()); eclipseView->isLightingDisabled());
@@ -126,7 +130,6 @@ void RivIntersectionPartMgr::updateCellResultColor(size_t timeStepIndex)
{ {
CVF_ASSERT(m_crossSectionGenerator.notNull()); CVF_ASSERT(m_crossSectionGenerator.notNull());
const cvf::ScalarMapper* mapper = cellResultColors->legendConfig()->scalarMapper();
cvf::ref<RigResultAccessor> resultAccessor; cvf::ref<RigResultAccessor> resultAccessor;
if (RiaDefines::isPerCellFaceResult(cellResultColors->resultVariable())) if (RiaDefines::isPerCellFaceResult(cellResultColors->resultVariable()))
@@ -144,12 +147,12 @@ void RivIntersectionPartMgr::updateCellResultColor(size_t timeStepIndex)
RivIntersectionPartMgr::calculateEclipseTextureCoordinates(m_crossSectionFacesTextureCoords.p(), RivIntersectionPartMgr::calculateEclipseTextureCoordinates(m_crossSectionFacesTextureCoords.p(),
m_crossSectionGenerator->triangleToCellIndex(), m_crossSectionGenerator->triangleToCellIndex(),
resultAccessor.p(), resultAccessor.p(),
mapper); scalarColorMapper);
RivScalarMapperUtils::applyTextureResultsToPart(m_crossSectionFaces.p(), RivScalarMapperUtils::applyTextureResultsToPart(m_crossSectionFaces.p(),
m_crossSectionFacesTextureCoords.p(), m_crossSectionFacesTextureCoords.p(),
mapper, scalarColorMapper,
1.0, 1.0,
caf::FC_NONE, caf::FC_NONE,
eclipseView->isLightingDisabled()); eclipseView->isLightingDisabled());
@@ -169,8 +172,6 @@ void RivIntersectionPartMgr::updateCellResultColor(size_t timeStepIndex)
RigFemResultAddress resVarAddress = cellResultColors->resultAddress(); RigFemResultAddress resVarAddress = cellResultColors->resultAddress();
const cvf::ScalarMapper* mapper = cellResultColors->legendConfig()->scalarMapper();
if (resVarAddress.resultPosType == RIG_ELEMENT) if (resVarAddress.resultPosType == RIG_ELEMENT)
{ {
const std::vector<float>& resultValues = caseData->femPartResults()->resultValues(resVarAddress, 0, (int)timeStepIndex); const std::vector<float>& resultValues = caseData->femPartResults()->resultValues(resVarAddress, 0, (int)timeStepIndex);
@@ -179,7 +180,7 @@ void RivIntersectionPartMgr::updateCellResultColor(size_t timeStepIndex)
RivIntersectionPartMgr::calculateElementBasedGeoMechTextureCoords(m_crossSectionFacesTextureCoords.p(), RivIntersectionPartMgr::calculateElementBasedGeoMechTextureCoords(m_crossSectionFacesTextureCoords.p(),
resultValues, resultValues,
triangleToCellIdx, triangleToCellIdx,
mapper); scalarColorMapper);
} }
else if(resVarAddress.resultPosType == RIG_ELEMENT_NODAL_FACE) else if(resVarAddress.resultPosType == RIG_ELEMENT_NODAL_FACE)
@@ -192,7 +193,7 @@ void RivIntersectionPartMgr::updateCellResultColor(size_t timeStepIndex)
RivIntersectionPartMgr::calculatePlaneAngleTextureCoords(m_crossSectionFacesTextureCoords.p(), RivIntersectionPartMgr::calculatePlaneAngleTextureCoords(m_crossSectionFacesTextureCoords.p(),
triangelVxes, triangelVxes,
resVarAddress, resVarAddress,
mapper); scalarColorMapper);
} }
else else
{ {
@@ -204,7 +205,7 @@ void RivIntersectionPartMgr::updateCellResultColor(size_t timeStepIndex)
caseData, caseData,
resVarAddress, resVarAddress,
(int)timeStepIndex, (int)timeStepIndex,
mapper); scalarColorMapper);
} }
} }
else else
@@ -222,12 +223,12 @@ void RivIntersectionPartMgr::updateCellResultColor(size_t timeStepIndex)
resultValues, resultValues,
isElementNodalResult, isElementNodalResult,
femPart, femPart,
mapper); scalarColorMapper);
} }
RivScalarMapperUtils::applyTextureResultsToPart(m_crossSectionFaces.p(), RivScalarMapperUtils::applyTextureResultsToPart(m_crossSectionFaces.p(),
m_crossSectionFacesTextureCoords.p(), m_crossSectionFacesTextureCoords.p(),
mapper, scalarColorMapper,
1.0, 1.0,
caf::FC_NONE, caf::FC_NONE,
geoView->isLightingDisabled()); geoView->isLightingDisabled());

View File

@@ -43,6 +43,7 @@ class RigResultAccessor;
class RimCellEdgeColors; class RimCellEdgeColors;
class RimEclipseCellColors; class RimEclipseCellColors;
class RimIntersection; class RimIntersection;
class RivTernaryScalarMapper;
class RivIntersectionGeometryGenerator; class RivIntersectionGeometryGenerator;
class RivIntersectionHexGridInterface; class RivIntersectionHexGridInterface;
class RivIntersectionVertexWeights; class RivIntersectionVertexWeights;
@@ -59,7 +60,9 @@ public:
explicit RivIntersectionPartMgr(RimIntersection* rimCrossSection, bool isFlattened = false); explicit RivIntersectionPartMgr(RimIntersection* rimCrossSection, bool isFlattened = false);
void applySingleColorEffect(); void applySingleColorEffect();
void updateCellResultColor(size_t timeStepIndex); void updateCellResultColor(size_t timeStepIndex,
const cvf::ScalarMapper* scalarColorMapper,
const RivTernaryScalarMapper* ternaryColorMapper);
void appendNativeCrossSectionFacesToModel(cvf::ModelBasicList* model, cvf::Transform* scaleTransform); void appendNativeCrossSectionFacesToModel(cvf::ModelBasicList* model, cvf::Transform* scaleTransform);

View File

@@ -87,7 +87,7 @@ cvf::ref<cvf::Effect> RivScalarMapperUtils::createCellEdgeEffect(cvf::DrawableGe
RivCellEdgeGeometryUtils::addTernaryCellEdgeResultsToDrawableGeo(timeStepIndex, cellResultColors, cellEdgeResultColors, RivCellEdgeGeometryUtils::addTernaryCellEdgeResultsToDrawableGeo(timeStepIndex, cellResultColors, cellEdgeResultColors,
quadToCellFaceMapper, dg, gridIndex, opacityLevel); quadToCellFaceMapper, dg, gridIndex, opacityLevel);
RivTernaryScalarMapper* ternaryCellScalarMapper = cellResultColors->ternaryLegendConfig()->scalarMapper(); const RivTernaryScalarMapper* ternaryCellScalarMapper = cellResultColors->ternaryLegendConfig()->scalarMapper();
cellFaceEffectGen.setTernaryScalarMapper(ternaryCellScalarMapper); cellFaceEffectGen.setTernaryScalarMapper(ternaryCellScalarMapper);
} }
else else

View File

@@ -79,7 +79,7 @@ RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator(
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator( RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator(
RimEclipseCellColors* cellResultColors, RimEclipseCellColors* cellResultColors,
RimTernaryLegendConfig* ternaryLegendConfig, const RivTernaryScalarMapper* ternaryColorMapper,
size_t timeStepIndex) size_t timeStepIndex)
: m_quadMapper(NULL) : m_quadMapper(NULL)
{ {
@@ -99,10 +99,8 @@ RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator(
m_resultAccessor = new RigTernaryResultAccessor(); m_resultAccessor = new RigTernaryResultAccessor();
m_resultAccessor->setTernaryResultAccessors(soil.p(), sgas.p(), swat.p()); m_resultAccessor->setTernaryResultAccessors(soil.p(), sgas.p(), swat.p());
const RivTernaryScalarMapper* mapper = ternaryLegendConfig->scalarMapper();
// Create a texture mapper without detecting transparency using RigPipeInCellEvaluator // Create a texture mapper without detecting transparency using RigPipeInCellEvaluator
m_texMapper = new RivTernaryResultToTextureMapper(mapper, NULL); m_texMapper = new RivTernaryResultToTextureMapper(ternaryColorMapper, NULL);
CVF_ASSERT(m_texMapper.notNull()); CVF_ASSERT(m_texMapper.notNull());
} }

View File

@@ -48,7 +48,7 @@ public:
const cvf::StructGridQuadToCellFaceMapper* quadMapper); const cvf::StructGridQuadToCellFaceMapper* quadMapper);
RivTernaryTextureCoordsCreator( RimEclipseCellColors* cellResultColors, RivTernaryTextureCoordsCreator( RimEclipseCellColors* cellResultColors,
RimTernaryLegendConfig* ternaryLegendConfig, const RivTernaryScalarMapper* ternaryColorMapper,
size_t timeStepIndex); size_t timeStepIndex);
void createTextureCoords(cvf::Vec2fArray* quadTextureCoords); void createTextureCoords(cvf::Vec2fArray* quadTextureCoords);

View File

@@ -23,6 +23,7 @@
#include "RiuViewer.h" #include "RiuViewer.h"
#include "RimGridView.h" #include "RimGridView.h"
#include "RivIntersectionPartMgr.h" #include "RivIntersectionPartMgr.h"
#include "RivTernarySaturationOverlayItem.h"
#include "cvfPart.h" #include "cvfPart.h"
#include "cvfModelBasicList.h" #include "cvfModelBasicList.h"
@@ -32,6 +33,8 @@
#include "RimEclipseCellColors.h" #include "RimEclipseCellColors.h"
#include "RimGeoMechView.h" #include "RimGeoMechView.h"
#include "RimGeoMechCellColors.h" #include "RimGeoMechCellColors.h"
#include "RimLegendConfig.h"
#include "RimTernaryLegendConfig.h"
#include <QDateTime> #include <QDateTime>
@@ -52,6 +55,18 @@ Rim2dIntersectionView::Rim2dIntersectionView(void)
CAF_PDM_InitFieldNoDefault(&m_intersection, "Intersection", "Intersection", ":/CrossSection16x16.png", "", ""); CAF_PDM_InitFieldNoDefault(&m_intersection, "Intersection", "Intersection", ":/CrossSection16x16.png", "", "");
m_intersection.uiCapability()->setUiHidden(true); m_intersection.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&m_legendConfig, "LegendDefinition", "Legend Definition", "", "", "");
m_legendConfig.uiCapability()->setUiHidden(true);
m_legendConfig.uiCapability()->setUiTreeChildrenHidden(true);
m_legendConfig.xmlCapability()->disableIO();
m_legendConfig = new RimLegendConfig();
CAF_PDM_InitFieldNoDefault(&m_ternaryLegendConfig, "TernaryLegendDefinition", "Ternary Legend Definition", "", "", "");
m_ternaryLegendConfig.uiCapability()->setUiTreeHidden(true);
m_ternaryLegendConfig.uiCapability()->setUiTreeChildrenHidden(true);
m_ternaryLegendConfig.xmlCapability()->disableIO();
m_ternaryLegendConfig = new RimTernaryLegendConfig();
m_showWindow = false; m_showWindow = false;
m_scaleTransform = new cvf::Transform(); m_scaleTransform = new cvf::Transform();
m_intersectionVizModel = new cvf::ModelBasicList; m_intersectionVizModel = new cvf::ModelBasicList;
@@ -274,6 +289,12 @@ void Rim2dIntersectionView::createDisplayModel()
void Rim2dIntersectionView::createPartCollectionFromSelection(cvf::Collection<cvf::Part>* parts) void Rim2dIntersectionView::createPartCollectionFromSelection(cvf::Collection<cvf::Part>* parts)
{ {
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim2dIntersectionView::onTimeStepChanged()
{
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
@@ -287,23 +308,88 @@ void Rim2dIntersectionView::clampCurrentTimestep()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void Rim2dIntersectionView::updateCurrentTimeStep() void Rim2dIntersectionView::updateCurrentTimeStep()
{ {
updateLegends();
if ((this->hasUserRequestedAnimation() && this->hasResults())) if ((this->hasUserRequestedAnimation() && this->hasResults()))
{ {
m_flatIntersectionPartMgr->updateCellResultColor(m_currentTimeStep); m_flatIntersectionPartMgr->updateCellResultColor(m_currentTimeStep,
m_legendConfig->scalarMapper(),
m_ternaryLegendConfig()->scalarMapper());
} }
else else
{ {
m_flatIntersectionPartMgr->applySingleColorEffect(); m_flatIntersectionPartMgr->applySingleColorEffect();
} }
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim2dIntersectionView::updateLegends()
{
if (m_viewer)
{
m_viewer->removeAllColorLegends();
}
if (!hasResults()) return ;
cvf::OverlayItem* legend = nullptr;
RimEclipseView * eclView = nullptr;
m_intersection->firstAncestorOrThisOfType(eclView);
if (eclView)
{
m_legendConfig()->setUiValuesFromLegendConfig(eclView->cellResult()->legendConfig());
m_ternaryLegendConfig()->setUiValuesFromLegendConfig(eclView->cellResult()->ternaryLegendConfig());
eclView->cellResult()->updateLegendData(m_currentTimeStep(), m_legendConfig(), m_ternaryLegendConfig());
if ( eclView->cellResult()->isTernarySaturationSelected() )
{
m_ternaryLegendConfig()->setTitle("Cell Result:");
legend = m_ternaryLegendConfig()->legend();
}
else
{
m_legendConfig()->setTitle("Cell Result:" + eclView->cellResult()->resultVariableUiShortName());
legend = m_legendConfig()->legend();
}
}
RimGeoMechView * geoView = nullptr;
m_intersection->firstAncestorOrThisOfType(geoView);
if (geoView)
{
m_legendConfig()->setUiValuesFromLegendConfig(geoView->cellResult()->legendConfig());
geoView->updateLegendTextAndRanges(m_legendConfig(), m_currentTimeStep());
legend = m_legendConfig()->legend();
}
if ( legend )
{
m_viewer->addColorLegendToBottomLeftCorner(legend);
}
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void Rim2dIntersectionView::onTimeStepChanged() void Rim2dIntersectionView::resetLegendsInViewer()
{ {
m_viewer->showAxisCross(false);
m_viewer->showAnimationProgress(true);
m_viewer->showHistogram(false);
m_viewer->showInfoText(false);
m_viewer->setMainScene(new cvf::Scene());
m_viewer->enableNavigationRotation(false);
m_ternaryLegendConfig()->recreateLegend();
m_legendConfig()->recreateLegend();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -332,20 +418,6 @@ cvf::Transform* Rim2dIntersectionView::scaleTransform()
return m_scaleTransform.p(); return m_scaleTransform.p();
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim2dIntersectionView::resetLegendsInViewer()
{
m_viewer->showAxisCross(false);
m_viewer->showAnimationProgress(true);
m_viewer->showHistogram(false);
m_viewer->showInfoText(false);
m_viewer->setMainScene(new cvf::Scene());
m_viewer->enableNavigationRotation(false);
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@@ -23,6 +23,8 @@
class RimIntersection; class RimIntersection;
class RivIntersectionPartMgr; class RivIntersectionPartMgr;
class RimLegendConfig;
class RimTernaryLegendConfig;
namespace cvf namespace cvf
{ {
@@ -50,7 +52,7 @@ public:
virtual void selectOverlayInfoConfig() override {} virtual void selectOverlayInfoConfig() override {}
virtual RimViewLinker* assosiatedViewLinker() const override { return nullptr; } virtual RimViewLinker* assosiatedViewLinker() const override { return nullptr; }
virtual RimViewController* viewController() const override { return nullptr; } virtual RimViewController* viewController() const override { return nullptr; }
virtual bool isTimeStepDependentDataVisible() const override; virtual bool isTimeStepDependentDataVisible() const override;
@@ -76,6 +78,11 @@ protected:
bool hasResults(); bool hasResults();
int timeStepCount(); int timeStepCount();
void updateLegends();
caf::PdmChildField<RimLegendConfig*> m_legendConfig;
caf::PdmChildField<RimTernaryLegendConfig*> m_ternaryLegendConfig;
caf::PdmPtrField<RimIntersection*> m_intersection; caf::PdmPtrField<RimIntersection*> m_intersection;
cvf::ref<RivIntersectionPartMgr> m_flatIntersectionPartMgr; cvf::ref<RivIntersectionPartMgr> m_flatIntersectionPartMgr;

View File

@@ -41,6 +41,7 @@
#include "RimFlowCharacteristicsPlot.h" #include "RimFlowCharacteristicsPlot.h"
#include "RimFlowPlotCollection.h" #include "RimFlowPlotCollection.h"
#include "RimFormationNames.h" #include "RimFormationNames.h"
#include "RimIntersectionCollection.h"
#include "RimMainPlotCollection.h" #include "RimMainPlotCollection.h"
#include "RimOilField.h" #include "RimOilField.h"
#include "RimProject.h" #include "RimProject.h"
@@ -398,6 +399,7 @@ void RimEclipseCase::updateFormationNamesData()
view->scheduleGeometryRegen(PROPERTY_FILTERED); view->scheduleGeometryRegen(PROPERTY_FILTERED);
view->scheduleCreateDisplayModelAndRedraw(); view->scheduleCreateDisplayModelAndRedraw();
eclView->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
} }
} }
} }

View File

@@ -273,135 +273,212 @@ public :
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseCellColors::updateLegendData(size_t currentTimeStep) void RimEclipseCellColors::updateLegendData(size_t currentTimeStep,
RimLegendConfig* legendConfig,
RimTernaryLegendConfig* ternaryLegendConfig)
{ {
if (this->isFlowDiagOrInjectionFlooding()) if (!legendConfig) legendConfig = this->legendConfig();
if (!ternaryLegendConfig) ternaryLegendConfig = this->ternaryLegendConfig();
if ( this->hasResult() )
{ {
double globalMin, globalMax; if ( this->isFlowDiagOrInjectionFlooding() )
double globalPosClosestToZero, globalNegClosestToZero;
RigFlowDiagResults* flowResultsData = this->flowDiagSolution()->flowDiagResults();
RigFlowDiagResultAddress resAddr = this->flowDiagResAddress();
int integerTimeStep = static_cast<int>(currentTimeStep);
flowResultsData->minMaxScalarValues(resAddr, integerTimeStep, &globalMin, &globalMax);
flowResultsData->posNegClosestToZero(resAddr, integerTimeStep, &globalPosClosestToZero, &globalNegClosestToZero);
double localMin, localMax;
double localPosClosestToZero, localNegClosestToZero;
if (this->hasDynamicResult())
{ {
flowResultsData->minMaxScalarValues(resAddr, integerTimeStep, &localMin, &localMax); double globalMin, globalMax;
flowResultsData->posNegClosestToZero(resAddr, integerTimeStep, &localPosClosestToZero, &localNegClosestToZero); double globalPosClosestToZero, globalNegClosestToZero;
RigFlowDiagResults* flowResultsData = this->flowDiagSolution()->flowDiagResults();
RigFlowDiagResultAddress resAddr = this->flowDiagResAddress();
int integerTimeStep = static_cast<int>(currentTimeStep);
flowResultsData->minMaxScalarValues(resAddr, integerTimeStep, &globalMin, &globalMax);
flowResultsData->posNegClosestToZero(resAddr, integerTimeStep, &globalPosClosestToZero, &globalNegClosestToZero);
double localMin, localMax;
double localPosClosestToZero, localNegClosestToZero;
if ( this->hasDynamicResult() )
{
flowResultsData->minMaxScalarValues(resAddr, integerTimeStep, &localMin, &localMax);
flowResultsData->posNegClosestToZero(resAddr, integerTimeStep, &localPosClosestToZero, &localNegClosestToZero);
}
else
{
localMin = globalMin;
localMax = globalMax;
localPosClosestToZero = globalPosClosestToZero;
localNegClosestToZero = globalNegClosestToZero;
}
CVF_ASSERT(legendConfig);
legendConfig->disableAllTimeStepsRange(true);
legendConfig->setClosestToZeroValues(globalPosClosestToZero, globalNegClosestToZero,
localPosClosestToZero, localNegClosestToZero);
legendConfig->setAutomaticRanges(globalMin, globalMax, localMin, localMax);
if ( this->hasCategoryResult() )
{
std::set<std::tuple<QString, int, cvf::Color3ub>, TupleCompare > categories;
//std::set<std::tuple<QString, int, cvf::Color3ub> > categories;
std::vector<QString> tracerNames = this->flowDiagSolution()->tracerNames();
int tracerIndex = 0;
for ( const auto& tracerName : tracerNames )
{
RimSimWellInView* well = m_reservoirView->wellCollection()->findWell(RimFlowDiagSolution::removeCrossFlowEnding(tracerName));
cvf::Color3ub color(cvf::Color3::GRAY);
if ( well ) color = cvf::Color3ub(well->wellPipeColor());
categories.insert(std::make_tuple(tracerName, tracerIndex, color));
++tracerIndex;
}
std::vector<std::tuple<QString, int, cvf::Color3ub>> reverseCategories;
for ( auto tupIt = categories.rbegin(); tupIt != categories.rend(); ++tupIt )
{
reverseCategories.push_back(*tupIt);
}
legendConfig->setCategoryItems(reverseCategories);
}
} }
else else
{ {
localMin = globalMin; RimEclipseCase* rimEclipseCase = nullptr;
localMax = globalMax; this->firstAncestorOrThisOfType(rimEclipseCase);
CVF_ASSERT(rimEclipseCase);
if ( !rimEclipseCase ) return;
localPosClosestToZero = globalPosClosestToZero; RigEclipseCaseData* eclipseCase = rimEclipseCase->eclipseCaseData();
localNegClosestToZero = globalNegClosestToZero; CVF_ASSERT(eclipseCase);
} if ( !eclipseCase ) return;
CVF_ASSERT(this->legendConfig()); RigCaseCellResultsData* cellResultsData = eclipseCase->results(this->porosityModel());
CVF_ASSERT(cellResultsData);
this->legendConfig()->disableAllTimeStepsRange(true); double globalMin, globalMax;
this->legendConfig()->setClosestToZeroValues(globalPosClosestToZero, globalNegClosestToZero, localPosClosestToZero, localNegClosestToZero); double globalPosClosestToZero, globalNegClosestToZero;
this->legendConfig()->setAutomaticRanges(globalMin, globalMax, localMin, localMax); cellResultsData->minMaxCellScalarValues(this->scalarResultIndex(), globalMin, globalMax);
cellResultsData->posNegClosestToZero(this->scalarResultIndex(), globalPosClosestToZero, globalNegClosestToZero);
if (this->hasCategoryResult()) double localMin, localMax;
{ double localPosClosestToZero, localNegClosestToZero;
std::set<std::tuple<QString, int, cvf::Color3ub>, TupleCompare > categories; if ( this->hasDynamicResult() )
//std::set<std::tuple<QString, int, cvf::Color3ub> > categories;
std::vector<QString> tracerNames = this->flowDiagSolution()->tracerNames();
int tracerIndex = 0;
for (const auto& tracerName : tracerNames)
{ {
RimSimWellInView* well = m_reservoirView->wellCollection()->findWell(RimFlowDiagSolution::removeCrossFlowEnding(tracerName)); cellResultsData->minMaxCellScalarValues(this->scalarResultIndex(), currentTimeStep, localMin, localMax);
cvf::Color3ub color(cvf::Color3::GRAY); cellResultsData->posNegClosestToZero(this->scalarResultIndex(), currentTimeStep, localPosClosestToZero, localNegClosestToZero);
if (well) color = cvf::Color3ub(well->wellPipeColor()); }
else
{
localMin = globalMin;
localMax = globalMax;
categories.insert(std::make_tuple(tracerName, tracerIndex, color)); localPosClosestToZero = globalPosClosestToZero;
++tracerIndex; localNegClosestToZero = globalNegClosestToZero;
} }
std::vector<std::tuple<QString, int, cvf::Color3ub>> reverseCategories; CVF_ASSERT(legendConfig);
for (auto tupIt = categories.rbegin(); tupIt != categories.rend(); ++tupIt)
legendConfig->disableAllTimeStepsRange(false);
legendConfig->setClosestToZeroValues(globalPosClosestToZero, globalNegClosestToZero, localPosClosestToZero, localNegClosestToZero);
legendConfig->setAutomaticRanges(globalMin, globalMax, localMin, localMax);
if ( this->hasCategoryResult() )
{ {
reverseCategories.push_back(*tupIt); if ( this->resultType() == RiaDefines::FORMATION_NAMES )
{
const std::vector<QString>& fnVector = eclipseCase->activeFormationNames()->formationNames();
legendConfig->setNamedCategoriesInverse(fnVector);
}
else if ( this->resultType() == RiaDefines::DYNAMIC_NATIVE && this->resultVariable() == RiaDefines::completionTypeResultName() )
{
std::vector< std::tuple<QString, int, cvf::Color3ub> > categories;
caf::AppEnum<RiaDefines::CompletionType> wellPath(RiaDefines::WELL_PATH);
caf::AppEnum<RiaDefines::CompletionType> fishbone(RiaDefines::FISHBONES);
caf::AppEnum<RiaDefines::CompletionType> perforationInterval(RiaDefines::PERFORATION_INTERVAL);
caf::AppEnum<RiaDefines::CompletionType> fracture(RiaDefines::FRACTURE);
categories.push_back(std::make_tuple(wellPath.uiText(), static_cast<int>(wellPath.index()), cvf::Color3::RED));
categories.push_back(std::make_tuple(fishbone.uiText(), static_cast<int>(fishbone.index()), cvf::Color3::DARK_GREEN));
categories.push_back(std::make_tuple(perforationInterval.uiText(), static_cast<int>(perforationInterval.index()), cvf::Color3::GREEN));
categories.push_back(std::make_tuple(fracture.uiText(), static_cast<int>(fracture.index()), cvf::Color3::YELLOW_GREEN));
legendConfig->setCategoryItems(categories);
}
else
{
legendConfig->setIntegerCategories(cellResultsData->uniqueCellScalarValues(this->scalarResultIndex()));
}
} }
this->legendConfig()->setCategoryItems(reverseCategories);
} }
} }
else
// Ternary legend update
{ {
RimEclipseCase* rimEclipseCase = nullptr; RimEclipseCase* rimEclipseCase = nullptr;
this->firstAncestorOrThisOfType(rimEclipseCase); this->firstAncestorOrThisOfType(rimEclipseCase);
CVF_ASSERT(rimEclipseCase); CVF_ASSERT(rimEclipseCase);
if (!rimEclipseCase) return; if ( !rimEclipseCase ) return;
RigEclipseCaseData* eclipseCase = rimEclipseCase->eclipseCaseData(); RigEclipseCaseData* eclipseCase = rimEclipseCase->eclipseCaseData();
CVF_ASSERT(eclipseCase); CVF_ASSERT(eclipseCase);
if (!eclipseCase) return; if ( !eclipseCase ) return;
RigCaseCellResultsData* cellResultsData = eclipseCase->results(this->porosityModel()); RigCaseCellResultsData* cellResultsData = eclipseCase->results(this->porosityModel());
CVF_ASSERT(cellResultsData);
double globalMin, globalMax; size_t maxTimeStepCount = cellResultsData->maxTimeStepCount();
double globalPosClosestToZero, globalNegClosestToZero; if ( this->isTernarySaturationSelected() && maxTimeStepCount > 1 )
cellResultsData->minMaxCellScalarValues(this->scalarResultIndex(), globalMin, globalMax);
cellResultsData->posNegClosestToZero(this->scalarResultIndex(), globalPosClosestToZero, globalNegClosestToZero);
double localMin, localMax;
double localPosClosestToZero, localNegClosestToZero;
if (this->hasDynamicResult())
{ {
cellResultsData->minMaxCellScalarValues(this->scalarResultIndex(), currentTimeStep, localMin, localMax); RigCaseCellResultsData* gridCellResults = this->currentGridCellResults();
cellResultsData->posNegClosestToZero(this->scalarResultIndex(), currentTimeStep, localPosClosestToZero, localNegClosestToZero);
}
else
{
localMin = globalMin;
localMax = globalMax;
localPosClosestToZero = globalPosClosestToZero;
localNegClosestToZero = globalNegClosestToZero;
}
CVF_ASSERT(this->legendConfig());
this->legendConfig()->disableAllTimeStepsRange(false);
this->legendConfig()->setClosestToZeroValues(globalPosClosestToZero, globalNegClosestToZero, localPosClosestToZero, localNegClosestToZero);
this->legendConfig()->setAutomaticRanges(globalMin, globalMax, localMin, localMax);
if (this->hasCategoryResult())
{
if (this->resultType() == RiaDefines::FORMATION_NAMES)
{ {
const std::vector<QString>& fnVector = eclipseCase->activeFormationNames()->formationNames(); size_t scalarSetIndex = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SOIL");
this->legendConfig()->setNamedCategoriesInverse(fnVector); if ( scalarSetIndex != cvf::UNDEFINED_SIZE_T )
{
double globalMin = 0.0;
double globalMax = 1.0;
double localMin = 0.0;
double localMax = 1.0;
cellResultsData->minMaxCellScalarValues(scalarSetIndex, globalMin, globalMax);
cellResultsData->minMaxCellScalarValues(scalarSetIndex, currentTimeStep, localMin, localMax);
ternaryLegendConfig->setAutomaticRanges(RimTernaryLegendConfig::TERNARY_SOIL_IDX, globalMin, globalMax, localMin, localMax);
}
} }
else if (this->resultType() == RiaDefines::DYNAMIC_NATIVE && this->resultVariable() == RiaDefines::completionTypeResultName())
{ {
std::vector< std::tuple<QString, int, cvf::Color3ub> > categories; size_t scalarSetIndex = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SGAS");
if ( scalarSetIndex != cvf::UNDEFINED_SIZE_T )
{
double globalMin = 0.0;
double globalMax = 1.0;
double localMin = 0.0;
double localMax = 1.0;
caf::AppEnum<RiaDefines::CompletionType> wellPath(RiaDefines::WELL_PATH); cellResultsData->minMaxCellScalarValues(scalarSetIndex, globalMin, globalMax);
caf::AppEnum<RiaDefines::CompletionType> fishbone(RiaDefines::FISHBONES); cellResultsData->minMaxCellScalarValues(scalarSetIndex, currentTimeStep, localMin, localMax);
caf::AppEnum<RiaDefines::CompletionType> perforationInterval(RiaDefines::PERFORATION_INTERVAL);
caf::AppEnum<RiaDefines::CompletionType> fracture(RiaDefines::FRACTURE);
categories.push_back(std::make_tuple(wellPath.uiText(), static_cast<int>(wellPath.index()), cvf::Color3::RED)); ternaryLegendConfig->setAutomaticRanges(RimTernaryLegendConfig::TERNARY_SGAS_IDX, globalMin, globalMax, localMin, localMax);
categories.push_back(std::make_tuple(fishbone.uiText(), static_cast<int>(fishbone.index()), cvf::Color3::DARK_GREEN)); }
categories.push_back(std::make_tuple(perforationInterval.uiText(), static_cast<int>(perforationInterval.index()), cvf::Color3::GREEN));
categories.push_back(std::make_tuple(fracture.uiText(), static_cast<int>(fracture.index()), cvf::Color3::YELLOW_GREEN));
legendConfig()->setCategoryItems(categories);
} }
else
{ {
this->legendConfig()->setIntegerCategories(cellResultsData->uniqueCellScalarValues(this->scalarResultIndex())); size_t scalarSetIndex = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SWAT");
if ( scalarSetIndex != cvf::UNDEFINED_SIZE_T )
{
double globalMin = 0.0;
double globalMax = 1.0;
double localMin = 0.0;
double localMax = 1.0;
cellResultsData->minMaxCellScalarValues(scalarSetIndex, globalMin, globalMax);
cellResultsData->minMaxCellScalarValues(scalarSetIndex, currentTimeStep, localMin, localMax);
ternaryLegendConfig->setAutomaticRanges(RimTernaryLegendConfig::TERNARY_SWAT_IDX, globalMin, globalMax, localMin, localMax);
}
} }
} }
} }

View File

@@ -43,7 +43,9 @@ public:
void setReservoirView(RimEclipseView* ownerReservoirView); void setReservoirView(RimEclipseView* ownerReservoirView);
RimEclipseView* reservoirView(); RimEclipseView* reservoirView();
void updateLegendData(size_t timestep); void updateLegendData(size_t timestep,
RimLegendConfig* legendConfig = nullptr,
RimTernaryLegendConfig* ternaryLegendConfig = nullptr);
RimLegendConfig* legendConfig(); RimLegendConfig* legendConfig();
caf::PdmChildField<RimTernaryLegendConfig*> ternaryLegendConfig; caf::PdmChildField<RimTernaryLegendConfig*> ternaryLegendConfig;

View File

@@ -33,6 +33,7 @@
#include "RimEclipseResultCase.h" #include "RimEclipseResultCase.h"
#include "RimEclipseView.h" #include "RimEclipseView.h"
#include "RimFlowDiagSolution.h" #include "RimFlowDiagSolution.h"
#include "RimIntersectionCollection.h"
#include "RimPlotCurve.h" #include "RimPlotCurve.h"
#include "RimReservoirCellResultsStorage.h" #include "RimReservoirCellResultsStorage.h"
#include "Rim3dView.h" #include "Rim3dView.h"
@@ -409,6 +410,8 @@ void RimEclipseResultDefinition::loadDataAndUpdate()
{ {
viewLinker->updateCellResult(); viewLinker->updateCellResult();
} }
RimGridView* eclView = dynamic_cast<RimGridView*>(view);
if (eclView) eclView->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
} }
} }

View File

@@ -39,6 +39,7 @@
#include "cafPdmUiPushButtonEditor.h" #include "cafPdmUiPushButtonEditor.h"
#include "cafPdmUiTextEditor.h" #include "cafPdmUiTextEditor.h"
#include "cafProgressInfo.h" #include "cafProgressInfo.h"
#include "RimIntersectionCollection.h"
namespace caf { namespace caf {
template<> template<>
@@ -691,6 +692,7 @@ void RimEclipseStatisticsCase::updateConnectedEditorsAndReservoirViews()
// a full display model rebuild is required // a full display model rebuild is required
reservoirViews[i]->hasUserRequestedAnimation = true; reservoirViews[i]->hasUserRequestedAnimation = true;
reservoirViews[i]->scheduleCreateDisplayModelAndRedraw(); reservoirViews[i]->scheduleCreateDisplayModelAndRedraw();
reservoirViews[i]->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
} }
} }

View File

@@ -656,7 +656,9 @@ void RimEclipseView::updateCurrentTimeStep()
if ((this->hasUserRequestedAnimation() && this->cellResult()->hasResult()) || this->cellResult()->isTernarySaturationSelected()) if ((this->hasUserRequestedAnimation() && this->cellResult()->hasResult()) || this->cellResult()->isTernarySaturationSelected())
{ {
m_crossSectionCollection->updateCellResultColor(m_currentTimeStep); m_crossSectionCollection->updateCellResultColor(m_currentTimeStep,
this->cellResult()->legendConfig()->scalarMapper(),
this->cellResult()->ternaryLegendConfig()->scalarMapper());
} }
else else
{ {
@@ -1035,7 +1037,7 @@ void RimEclipseView::updateLegends()
} }
m_viewer->addColorLegendToBottomLeftCorner(this->cellEdgeResult()->legendConfig()->legend()); m_viewer->addColorLegendToBottomLeftCorner(this->cellEdgeResult()->legendConfig()->legend());
this->cellEdgeResult()->legendConfig()->setTitle(cvfqt::Utils::toString(QString("Edge Results: \n") + this->cellEdgeResult()->resultVariableUiShortName())); this->cellEdgeResult()->legendConfig()->setTitle(QString("Edge Results: \n") + this->cellEdgeResult()->resultVariableUiShortName());
} }
else else
{ {
@@ -1060,71 +1062,24 @@ void RimEclipseView::updateLegends()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel, RimEclipseCellColors* resultColors, RigCaseCellResultsData* cellResultsData) void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel,
RimEclipseCellColors* resultColors,
RigCaseCellResultsData* cellResultsData)
{ {
resultColors->updateLegendData(m_currentTimeStep);
if (resultColors->hasResult()) if (resultColors->hasResult())
{ {
resultColors->updateLegendData(m_currentTimeStep);
m_viewer->addColorLegendToBottomLeftCorner(resultColors->legendConfig()->legend()); m_viewer->addColorLegendToBottomLeftCorner(resultColors->legendConfig()->legend());
resultColors->legendConfig()->setTitle(cvfqt::Utils::toString(legendLabel + resultColors->resultVariableUiShortName())); resultColors->legendConfig()->setTitle(legendLabel + resultColors->resultVariableUiShortName());
} }
size_t maxTimeStepCount = cellResultsData->maxTimeStepCount(); size_t maxTimeStepCount = cellResultsData->maxTimeStepCount();
if (resultColors->isTernarySaturationSelected() && maxTimeStepCount > 1) if (resultColors->isTernarySaturationSelected() && maxTimeStepCount > 1)
{ {
RigCaseCellResultsData* gridCellResults = resultColors->currentGridCellResults();
{
size_t scalarSetIndex = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SOIL");
if (scalarSetIndex != cvf::UNDEFINED_SIZE_T)
{
double globalMin = 0.0;
double globalMax = 1.0;
double localMin = 0.0;
double localMax = 1.0;
cellResultsData->minMaxCellScalarValues(scalarSetIndex, globalMin, globalMax);
cellResultsData->minMaxCellScalarValues(scalarSetIndex, m_currentTimeStep, localMin, localMax);
resultColors->ternaryLegendConfig()->setAutomaticRanges(RimTernaryLegendConfig::TERNARY_SOIL_IDX, globalMin, globalMax, localMin, localMax);
}
}
{
size_t scalarSetIndex = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SGAS");
if (scalarSetIndex != cvf::UNDEFINED_SIZE_T)
{
double globalMin = 0.0;
double globalMax = 1.0;
double localMin = 0.0;
double localMax = 1.0;
cellResultsData->minMaxCellScalarValues(scalarSetIndex, globalMin, globalMax);
cellResultsData->minMaxCellScalarValues(scalarSetIndex, m_currentTimeStep, localMin, localMax);
resultColors->ternaryLegendConfig()->setAutomaticRanges(RimTernaryLegendConfig::TERNARY_SGAS_IDX, globalMin, globalMax, localMin, localMax);
}
}
{
size_t scalarSetIndex = gridCellResults->findOrLoadScalarResult(RiaDefines::DYNAMIC_NATIVE, "SWAT");
if (scalarSetIndex != cvf::UNDEFINED_SIZE_T)
{
double globalMin = 0.0;
double globalMax = 1.0;
double localMin = 0.0;
double localMax = 1.0;
cellResultsData->minMaxCellScalarValues(scalarSetIndex, globalMin, globalMax);
cellResultsData->minMaxCellScalarValues(scalarSetIndex, m_currentTimeStep, localMin, localMax);
resultColors->ternaryLegendConfig()->setAutomaticRanges(RimTernaryLegendConfig::TERNARY_SWAT_IDX, globalMin, globalMax, localMin, localMax);
}
}
if (resultColors->ternaryLegendConfig->legend()) if (resultColors->ternaryLegendConfig->legend())
{ {
resultColors->ternaryLegendConfig->legend()->setTitle(cvfqt::Utils::toString(legendLabel)); resultColors->ternaryLegendConfig->setTitle(legendLabel);
m_viewer->addColorLegendToBottomLeftCorner(resultColors->ternaryLegendConfig->legend()); m_viewer->addColorLegendToBottomLeftCorner(resultColors->ternaryLegendConfig->legend());
} }
} }

View File

@@ -30,6 +30,7 @@
#include "RigFormationNames.h" #include "RigFormationNames.h"
#include "RimGeoMechView.h" #include "RimGeoMechView.h"
#include "RimIntersectionCollection.h"
#include "RimMainPlotCollection.h" #include "RimMainPlotCollection.h"
#include "RimProject.h" #include "RimProject.h"
#include "RimTools.h" #include "RimTools.h"
@@ -499,6 +500,7 @@ void RimGeoMechCase::updateFormationNamesData()
view->scheduleGeometryRegen(PROPERTY_FILTERED); view->scheduleGeometryRegen(PROPERTY_FILTERED);
view->scheduleCreateDisplayModelAndRedraw(); view->scheduleCreateDisplayModelAndRedraw();
geomView->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
} }
} }
} }

View File

@@ -30,6 +30,7 @@
#include "RimGeoMechCellColors.h" #include "RimGeoMechCellColors.h"
#include "RimGeoMechPropertyFilter.h" #include "RimGeoMechPropertyFilter.h"
#include "RimGeoMechView.h" #include "RimGeoMechView.h"
#include "RimIntersectionCollection.h"
#include "RimPlotCurve.h" #include "RimPlotCurve.h"
#include "RimViewLinker.h" #include "RimViewLinker.h"
@@ -214,7 +215,7 @@ void RimGeoMechResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* cha
// Get the possible property filter owner // Get the possible property filter owner
RimGeoMechPropertyFilter* propFilter = dynamic_cast<RimGeoMechPropertyFilter*>(this->parentField()->ownerObject()); RimGeoMechPropertyFilter* propFilter = dynamic_cast<RimGeoMechPropertyFilter*>(this->parentField()->ownerObject());
Rim3dView* view = nullptr; RimGridView* view = nullptr;
this->firstAncestorOrThisOfType(view); this->firstAncestorOrThisOfType(view);
RimPlotCurve* curve = nullptr; RimPlotCurve* curve = nullptr;
this->firstAncestorOrThisOfType(curve); this->firstAncestorOrThisOfType(curve);
@@ -261,7 +262,11 @@ void RimGeoMechResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* cha
if (view) view->scheduleGeometryRegen(PROPERTY_FILTERED); if (view) view->scheduleGeometryRegen(PROPERTY_FILTERED);
} }
if (view) view->scheduleCreateDisplayModelAndRedraw(); if ( view )
{
view->scheduleCreateDisplayModelAndRedraw();
view->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
}
if (dynamic_cast<RimGeoMechCellColors*>(this)) if (dynamic_cast<RimGeoMechCellColors*>(this))
{ {

View File

@@ -290,7 +290,9 @@ void RimGeoMechView::updateCurrentTimeStep()
if (this->cellResult()->hasResult()) if (this->cellResult()->hasResult())
{ {
m_crossSectionCollection->updateCellResultColor(m_currentTimeStep); m_crossSectionCollection->updateCellResultColor(m_currentTimeStep,
this->cellResult()->legendConfig()->scalarMapper(),
nullptr);
} }
else else
{ {
@@ -344,12 +346,22 @@ void RimGeoMechView::resetLegendsInViewer()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimGeoMechView::updateLegends() void RimGeoMechView::updateLegends()
{ {
if (m_viewer) if ( m_viewer )
{ {
m_viewer->removeAllColorLegends(); m_viewer->removeAllColorLegends();
}
if (!m_geomechCase || !m_viewer || !m_geomechCase->geoMechData() this->updateLegendTextAndRanges(cellResult()->legendConfig(), m_currentTimeStep());
m_viewer->addColorLegendToBottomLeftCorner(cellResult()->legendConfig->legend());
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGeoMechView::updateLegendTextAndRanges(RimLegendConfig* legendConfig, int timeStepIndex)
{
if (!m_geomechCase || !m_geomechCase->geoMechData()
|| !this->isTimeStepDependentDataVisible() || !this->isTimeStepDependentDataVisible()
|| !(cellResult()->resultAddress().isValid()) ) || !(cellResult()->resultAddress().isValid()) )
{ {
@@ -366,16 +378,16 @@ void RimGeoMechView::updateLegends()
RigFemResultAddress resVarAddress = cellResult()->resultAddress(); RigFemResultAddress resVarAddress = cellResult()->resultAddress();
gmCase->femPartResults()->minMaxScalarValues(resVarAddress, m_currentTimeStep, &localMin, &localMax); gmCase->femPartResults()->minMaxScalarValues(resVarAddress, timeStepIndex, &localMin, &localMax);
gmCase->femPartResults()->posNegClosestToZero(resVarAddress, m_currentTimeStep, &localPosClosestToZero, &localNegClosestToZero); gmCase->femPartResults()->posNegClosestToZero(resVarAddress, timeStepIndex, &localPosClosestToZero, &localNegClosestToZero);
gmCase->femPartResults()->minMaxScalarValues(resVarAddress, &globalMin, &globalMax); gmCase->femPartResults()->minMaxScalarValues(resVarAddress, &globalMin, &globalMax);
gmCase->femPartResults()->posNegClosestToZero(resVarAddress, &globalPosClosestToZero, &globalNegClosestToZero); gmCase->femPartResults()->posNegClosestToZero(resVarAddress, &globalPosClosestToZero, &globalNegClosestToZero);
cellResult()->legendConfig->setClosestToZeroValues(globalPosClosestToZero, globalNegClosestToZero, localPosClosestToZero, localNegClosestToZero); legendConfig->setClosestToZeroValues(globalPosClosestToZero, globalNegClosestToZero, localPosClosestToZero, localNegClosestToZero);
cellResult()->legendConfig->setAutomaticRanges(globalMin, globalMax, localMin, localMax); legendConfig->setAutomaticRanges(globalMin, globalMax, localMin, localMax);
if (cellResult()->hasCategoryResult()) if (cellResult()->hasCategoryResult())
{ {
std::vector<QString> fnVector; std::vector<QString> fnVector;
@@ -383,18 +395,16 @@ void RimGeoMechView::updateLegends()
{ {
fnVector = gmCase->femPartResults()->activeFormationNames()->formationNames(); fnVector = gmCase->femPartResults()->activeFormationNames()->formationNames();
} }
cellResult()->legendConfig->setNamedCategoriesInverse(fnVector); legendConfig->setNamedCategoriesInverse(fnVector);
} }
m_viewer->addColorLegendToBottomLeftCorner(cellResult()->legendConfig->legend());
cvf::String legendTitle = cvfqt::Utils::toString( QString legendTitle =
caf::AppEnum<RigFemResultPosEnum>(cellResult->resultPositionType()).uiText() + "\n" caf::AppEnum<RigFemResultPosEnum>(cellResult->resultPositionType()).uiText() + "\n"
+ cellResult->resultFieldUiName()); + cellResult->resultFieldUiName();
if (!cellResult->resultComponentUiName().isEmpty()) if (!cellResult->resultComponentUiName().isEmpty())
{ {
legendTitle += ", " + cvfqt::Utils::toString(cellResult->resultComponentUiName()); legendTitle += ", " + cellResult->resultComponentUiName();
} }
if ( cellResult->resultFieldName() == "SE" || cellResult->resultFieldName() == "ST" || cellResult->resultFieldName() == "POR-Bar" if ( cellResult->resultFieldName() == "SE" || cellResult->resultFieldName() == "ST" || cellResult->resultFieldName() == "POR-Bar"
@@ -408,7 +418,7 @@ void RimGeoMechView::updateLegends()
legendTitle += " [GPa]"; legendTitle += " [GPa]";
} }
cellResult()->legendConfig->setTitle(legendTitle); legendConfig->setTitle(legendTitle);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@@ -41,6 +41,7 @@ class RimGeoMechPropertyFilterCollection;
class RiuViewer; class RiuViewer;
class RivGeoMechPartMgr; class RivGeoMechPartMgr;
class RivGeoMechVizLogic; class RivGeoMechVizLogic;
class RimLegendConfig;
namespace cvf { namespace cvf {
class CellRangeFilter; class CellRangeFilter;
@@ -84,6 +85,8 @@ public:
virtual void calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility, int timeStep) override; virtual void calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility, int timeStep) override;
void updateLegendTextAndRanges(RimLegendConfig* legendConfig, int timeStepIndex);
protected: protected:
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override; virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
virtual void onLoadDataAndUpdate() override; virtual void onLoadDataAndUpdate() override;

View File

@@ -20,6 +20,7 @@
#include "RimIntersectionCollection.h" #include "RimIntersectionCollection.h"
#include "Rim2dIntersectionViewCollection.h" #include "Rim2dIntersectionViewCollection.h"
#include "Rim2dIntersectionView.h"
#include "Rim3dView.h" #include "Rim3dView.h"
#include "RimCase.h" #include "RimCase.h"
#include "RimIntersection.h" #include "RimIntersection.h"
@@ -95,7 +96,9 @@ void RimIntersectionCollection::applySingleColorEffect()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimIntersectionCollection::updateCellResultColor(size_t timeStepIndex) void RimIntersectionCollection::updateCellResultColor(size_t timeStepIndex,
const cvf::ScalarMapper* scalarColorMapper,
const RivTernaryScalarMapper* ternaryColorMapper)
{ {
if(!this->isActive()) return; if(!this->isActive()) return;
@@ -103,7 +106,7 @@ void RimIntersectionCollection::updateCellResultColor(size_t timeStepIndex)
{ {
if(cs->isActive) if(cs->isActive)
{ {
cs->intersectionPartMgr()->updateCellResultColor(timeStepIndex); cs->intersectionPartMgr()->updateCellResultColor(timeStepIndex, scalarColorMapper, ternaryColorMapper);
} }
} }
@@ -186,6 +189,17 @@ void RimIntersectionCollection::syncronize2dIntersectionViews()
ownerCase->intersectionViewCollection()->syncFromExistingIntersections(true); ownerCase->intersectionViewCollection()->syncFromExistingIntersections(true);
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionCollection::scheduleCreateDisplayModelAndRedraw2dIntersectionViews()
{
for (RimIntersection* isection: m_intersections)
{
isection->correspondingIntersectionView()->scheduleCreateDisplayModelAndRedraw();
}
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@@ -27,10 +27,12 @@ class RimIntersection;
class RimIntersectionBox; class RimIntersectionBox;
class RimEclipseCellColors; class RimEclipseCellColors;
class RimSimWellInView; class RimSimWellInView;
class RivTernaryScalarMapper;
namespace cvf { namespace cvf {
class ModelBasicList; class ModelBasicList;
class Transform; class Transform;
class ScalarMapper;
} }
//================================================================================================== //==================================================================================================
@@ -59,11 +61,14 @@ public:
void updateIntersectionBoxGeometry(); void updateIntersectionBoxGeometry();
void syncronize2dIntersectionViews(); void syncronize2dIntersectionViews();
void scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
// Visualization interface // Visualization interface
void applySingleColorEffect(); void applySingleColorEffect();
void updateCellResultColor(size_t timeStepIndex); void updateCellResultColor(size_t timeStepIndex,
const cvf::ScalarMapper* scalarColorMapper,
const RivTernaryScalarMapper* ternaryColorMapper);
void appendPartsToModel(cvf::ModelBasicList* model, cvf::Transform* scaleTransform); void appendPartsToModel(cvf::ModelBasicList* model, cvf::Transform* scaleTransform);
protected: protected:

View File

@@ -51,6 +51,7 @@
#include "cvfqtUtils.h" #include "cvfqtUtils.h"
#include <cmath> #include <cmath>
#include "RimIntersectionCollection.h"
CAF_PDM_SOURCE_INIT(RimLegendConfig, "Legend"); CAF_PDM_SOURCE_INIT(RimLegendConfig, "Legend");
@@ -191,7 +192,7 @@ void RimLegendConfig::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
updateLegend(); updateLegend();
Rim3dView* view = nullptr; RimGridView* view = nullptr;
this->firstAncestorOrThisOfType(view); this->firstAncestorOrThisOfType(view);
if (view) if (view)
@@ -203,6 +204,8 @@ void RimLegendConfig::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
} }
view->updateCurrentTimeStepAndRedraw(); view->updateCurrentTimeStepAndRedraw();
view->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
} }
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES #ifdef USE_PROTOTYPE_FEATURE_FRACTURES
@@ -664,10 +667,11 @@ QString RimLegendConfig::categoryNameFromCategoryValue(double categoryResultValu
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimLegendConfig::setTitle(const cvf::String& title) void RimLegendConfig::setTitle(const QString& title)
{ {
m_scalarMapperLegend->setTitle(title); auto cvfTitle = cvfqt::Utils::toString(title);
m_categoryLegend->setTitle(title); m_scalarMapperLegend->setTitle(cvfTitle);
m_categoryLegend->setTitle(cvfTitle);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -692,6 +696,7 @@ void RimLegendConfig::setUiValuesFromLegendConfig(const RimLegendConfig* otherLe
{ {
QString serializedObjectString = otherLegendConfig->writeObjectToXmlString(); QString serializedObjectString = otherLegendConfig->writeObjectToXmlString();
this->readObjectFromXmlString(serializedObjectString, caf::PdmDefaultObjectFactory::instance()); this->readObjectFromXmlString(serializedObjectString, caf::PdmDefaultObjectFactory::instance());
this->updateLegend();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@@ -114,7 +114,9 @@ public:
void setCategoryItems(const std::vector<std::tuple<QString, int, cvf::Color3ub>>& categories); void setCategoryItems(const std::vector<std::tuple<QString, int, cvf::Color3ub>>& categories);
QString categoryNameFromCategoryValue(double categoryResultValue) const; QString categoryNameFromCategoryValue(double categoryResultValue) const;
void setTitle(const cvf::String& title); void setTitle(const QString& title);
void setUiValuesFromLegendConfig(const RimLegendConfig* otherLegendConfig);
cvf::ScalarMapper* scalarMapper() { return m_currentScalarMapper.p(); } cvf::ScalarMapper* scalarMapper() { return m_currentScalarMapper.p(); }
cvf::OverlayItem* legend(); cvf::OverlayItem* legend();
@@ -134,7 +136,6 @@ private:
double roundToNumSignificantDigits(double value, double precision); double roundToNumSignificantDigits(double value, double precision);
friend class RimViewLinker; friend class RimViewLinker;
void setUiValuesFromLegendConfig(const RimLegendConfig* otherLegendConfig);
static cvf::Color3ubArray colorArrayFromColorType(ColorRangesType colorType); static cvf::Color3ubArray colorArrayFromColorType(ColorRangesType colorType);

View File

@@ -289,7 +289,7 @@ void RimStimPlanColors::updateLegendData()
legendConfig->setClosestToZeroValues(posClosestToZero, negClosestToZero, posClosestToZero, negClosestToZero); legendConfig->setClosestToZeroValues(posClosestToZero, negClosestToZero, posClosestToZero, negClosestToZero);
} }
legendConfig->setTitle(cvfqt::Utils::toString(m_resultNameAndUnit())); legendConfig->setTitle(m_resultNameAndUnit());
} }
} }

View File

@@ -23,6 +23,7 @@
#include "RiaColorTables.h" #include "RiaColorTables.h"
#include "RimEclipseView.h" #include "RimEclipseView.h"
#include "RimIntersectionCollection.h"
#include "RimViewLinker.h" #include "RimViewLinker.h"
#include "RivTernarySaturationOverlayItem.h" #include "RivTernarySaturationOverlayItem.h"
@@ -146,7 +147,7 @@ void RimTernaryLegendConfig::fieldChangedByUi(const caf::PdmFieldHandle* changed
updateLabelText(); updateLabelText();
updateLegend(); updateLegend();
Rim3dView* view = nullptr; RimGridView* view = nullptr;
this->firstAncestorOrThisOfType(view); this->firstAncestorOrThisOfType(view);
if (view) if (view)
@@ -158,6 +159,7 @@ void RimTernaryLegendConfig::fieldChangedByUi(const caf::PdmFieldHandle* changed
} }
view->updateCurrentTimeStepAndRedraw(); view->updateCurrentTimeStepAndRedraw();
view->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
} }
} }
@@ -244,6 +246,7 @@ void RimTernaryLegendConfig::setUiValuesFromLegendConfig(const RimTernaryLegendC
{ {
QString serializedObjectString = otherLegendConfig->writeObjectToXmlString(); QString serializedObjectString = otherLegendConfig->writeObjectToXmlString();
this->readObjectFromXmlString(serializedObjectString, caf::PdmDefaultObjectFactory::instance()); this->readObjectFromXmlString(serializedObjectString, caf::PdmDefaultObjectFactory::instance());
this->updateLegend();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -316,6 +319,14 @@ void RimTernaryLegendConfig::defineUiOrdering(QString uiConfigName, caf::PdmUiOr
uiOrdering.skipRemainingFields(true); uiOrdering.skipRemainingFields(true);
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const RivTernarySaturationOverlayItem* RimTernaryLegendConfig::legend() const
{
return m_legend.p();
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -324,6 +335,14 @@ RivTernarySaturationOverlayItem* RimTernaryLegendConfig::legend()
return m_legend.p(); return m_legend.p();
} }
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimTernaryLegendConfig::setTitle(const QString& title)
{
m_legend->setTitle(cvfqt::Utils::toString(title));
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -462,7 +481,7 @@ void RimTernaryLegendConfig::updateLabelText()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RivTernaryScalarMapper* RimTernaryLegendConfig::scalarMapper() const RivTernaryScalarMapper* RimTernaryLegendConfig::scalarMapper() const
{ {
return m_scalarMapper.p(); return m_scalarMapper.p();
} }

View File

@@ -65,13 +65,17 @@ public:
RimTernaryLegendConfig(); RimTernaryLegendConfig();
virtual ~RimTernaryLegendConfig(); virtual ~RimTernaryLegendConfig();
void setUiValuesFromLegendConfig(const RimTernaryLegendConfig* otherLegendConfig);
void setAutomaticRanges(TernaryArrayIndex ternaryIndex, double globalMin, double globalMax, double localMin, double localMax); void setAutomaticRanges(TernaryArrayIndex ternaryIndex, double globalMin, double globalMax, double localMin, double localMax);
void ternaryRanges(double& soilLower, double& soilUpper, double& sgasLower, double& sgasUpper, double& swatLower, double& swatUpper) const; void ternaryRanges(double& soilLower, double& soilUpper, double& sgasLower, double& sgasUpper, double& swatLower, double& swatUpper) const;
void recreateLegend(); void recreateLegend();
RivTernarySaturationOverlayItem* legend(); const RivTernarySaturationOverlayItem* legend() const;
RivTernaryScalarMapper* scalarMapper(); RivTernarySaturationOverlayItem* legend();
void setTitle(const QString& title);
const RivTernaryScalarMapper* scalarMapper() const;
protected: protected:
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue); virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
@@ -83,9 +87,6 @@ private:
void updateLabelText(); void updateLabelText();
double roundToNumSignificantDigits(double value, double precision); double roundToNumSignificantDigits(double value, double precision);
friend class RimViewLinker;
void setUiValuesFromLegendConfig(const RimTernaryLegendConfig* otherLegendConfig);
private: private:
caf::PdmField<int> precision; caf::PdmField<int> precision;
caf::PdmField<RangeModeEnum> rangeMode; caf::PdmField<RangeModeEnum> rangeMode;

View File

@@ -48,6 +48,7 @@
#include "cafPdmUiTreeOrdering.h" #include "cafPdmUiTreeOrdering.h"
#include <QMessageBox> #include <QMessageBox>
#include "RimIntersectionCollection.h"
CAF_PDM_SOURCE_INIT(RimViewController, "ViewController"); CAF_PDM_SOURCE_INIT(RimViewController, "ViewController");
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -688,6 +689,11 @@ void RimViewController::scheduleCreateDisplayModelAndRedrawForDependentView() co
this->managedView()->scheduleCreateDisplayModelAndRedraw(); this->managedView()->scheduleCreateDisplayModelAndRedraw();
} }
} }
if (this->isResultColorControlled() && this->managedView() )
{
this->managedView()->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
}
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@@ -33,6 +33,7 @@
#include "RimGeoMechCellColors.h" #include "RimGeoMechCellColors.h"
#include "RimGeoMechResultDefinition.h" #include "RimGeoMechResultDefinition.h"
#include "RimGeoMechView.h" #include "RimGeoMechView.h"
#include "RimIntersectionCollection.h"
#include "RimLegendConfig.h" #include "RimLegendConfig.h"
#include "RimProject.h" #include "RimProject.h"
#include "RimTernaryLegendConfig.h" #include "RimTernaryLegendConfig.h"
@@ -152,10 +153,10 @@ void RimViewLinker::updateCellResult()
eclipseView->cellResult()->legendConfig()->updateLegend(); eclipseView->cellResult()->legendConfig()->updateLegend();
eclipseView->cellResult()->ternaryLegendConfig()->setUiValuesFromLegendConfig(masterEclipseView->cellResult()->ternaryLegendConfig()); eclipseView->cellResult()->ternaryLegendConfig()->setUiValuesFromLegendConfig(masterEclipseView->cellResult()->ternaryLegendConfig());
eclipseView->cellResult()->ternaryLegendConfig()->updateLegend();
} }
eclipseView->scheduleCreateDisplayModelAndRedraw(); eclipseView->scheduleCreateDisplayModelAndRedraw();
eclipseView->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
} }
eclipseView->cellResult()->updateIconState(); eclipseView->cellResult()->updateIconState();
@@ -190,6 +191,7 @@ void RimViewLinker::updateCellResult()
} }
geoView->scheduleCreateDisplayModelAndRedraw(); geoView->scheduleCreateDisplayModelAndRedraw();
geoView->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
} }
geoView->cellResult()->updateIconState(); geoView->cellResult()->updateIconState();

View File

@@ -39,6 +39,7 @@
#include "RimEclipseInputPropertyCollection.h" #include "RimEclipseInputPropertyCollection.h"
#include "RimEclipsePropertyFilterCollection.h" #include "RimEclipsePropertyFilterCollection.h"
#include "RimEclipseView.h" #include "RimEclipseView.h"
#include "RimIntersectionCollection.h"
#include "RimReservoirCellResultsStorage.h" #include "RimReservoirCellResultsStorage.h"
#include "RimSimWellInViewCollection.h" #include "RimSimWellInViewCollection.h"
@@ -550,6 +551,7 @@ public:
// It is usually not needed to create new display model, but if any derived geometry based on generated data (from Octave) // It is usually not needed to create new display model, but if any derived geometry based on generated data (from Octave)
// a full display model rebuild is required // a full display model rebuild is required
m_currentReservoir->reservoirViews[i]->scheduleCreateDisplayModelAndRedraw(); m_currentReservoir->reservoirViews[i]->scheduleCreateDisplayModelAndRedraw();
m_currentReservoir->reservoirViews[i]->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
} }
} }
} }

View File

@@ -38,6 +38,7 @@
#include "RimEclipseInputProperty.h" #include "RimEclipseInputProperty.h"
#include "RimEclipseInputPropertyCollection.h" #include "RimEclipseInputPropertyCollection.h"
#include "RimEclipseView.h" #include "RimEclipseView.h"
#include "RimIntersectionCollection.h"
#include "RimReservoirCellResultsStorage.h" #include "RimReservoirCellResultsStorage.h"
#include "RimGeoMechView.h" #include "RimGeoMechView.h"
#include "RimGeoMechCase.h" #include "RimGeoMechCase.h"
@@ -690,6 +691,7 @@ public:
// It is usually not needed to create new display model, but if any derived geometry based on generated data (from Octave) // It is usually not needed to create new display model, but if any derived geometry based on generated data (from Octave)
// a full display model rebuild is required // a full display model rebuild is required
m_currentReservoir->reservoirViews[i]->scheduleCreateDisplayModelAndRedraw(); m_currentReservoir->reservoirViews[i]->scheduleCreateDisplayModelAndRedraw();
m_currentReservoir->reservoirViews[i]->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
} }
} }
} }
@@ -1053,6 +1055,8 @@ public:
// It is usually not needed to create new display model, but if any derived geometry based on generated data (from Octave) // It is usually not needed to create new display model, but if any derived geometry based on generated data (from Octave)
// a full display model rebuild is required // a full display model rebuild is required
m_currentReservoir->reservoirViews[i]->scheduleCreateDisplayModelAndRedraw(); m_currentReservoir->reservoirViews[i]->scheduleCreateDisplayModelAndRedraw();
m_currentReservoir->reservoirViews[i]->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
} }
} }
} }