mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#945 Improved handling of visible fault geometry when showing faults outside filters
This commit is contained in:
parent
8deeba66d5
commit
8344617ba9
@ -915,7 +915,10 @@ cvf::cref<cvf::UByteArray> RivReservoirViewPartMgr::cellVisibility(RivCellSetEnu
|
||||
return pmgr->cellVisibility(gridIndex).p();
|
||||
}
|
||||
|
||||
RivReservoirPartMgr * RivReservoirViewPartMgr::reservoirPartManager(RivCellSetEnum geometryType, size_t timeStepIndex )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivReservoirPartMgr* RivReservoirViewPartMgr::reservoirPartManager(RivCellSetEnum geometryType, size_t timeStepIndex)
|
||||
{
|
||||
if (geometryType == PROPERTY_FILTERED)
|
||||
{
|
||||
@ -955,10 +958,67 @@ void RivReservoirViewPartMgr::updateFaultColors(RivCellSetEnum geometryType, siz
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirViewPartMgr::appendFaultsStaticGeometryPartsToModel(cvf::ModelBasicList* model, RivCellSetEnum geometryType)
|
||||
{
|
||||
//CVF_ASSERT(geometryType < PROPERTY_FILTERED);
|
||||
if (geometryType >= PROPERTY_FILTERED) return;
|
||||
|
||||
if (m_geometriesNeedsRegen[geometryType])
|
||||
{
|
||||
createGeometry(geometryType);
|
||||
}
|
||||
|
||||
/*
|
||||
QString text;
|
||||
switch (geometryType)
|
||||
{
|
||||
case OVERRIDDEN_CELL_VISIBILITY:
|
||||
text = "OVERRIDDEN_CELL_VISIBILITY";
|
||||
break;
|
||||
case ALL_CELLS:
|
||||
text = "ALL_CELLS";
|
||||
break;
|
||||
case ACTIVE:
|
||||
text = "ACTIVE";
|
||||
break;
|
||||
case ALL_WELL_CELLS:
|
||||
text = "ALL_WELL_CELLS";
|
||||
break;
|
||||
case VISIBLE_WELL_CELLS:
|
||||
text = "VISIBLE_WELL_CELLS";
|
||||
break;
|
||||
case VISIBLE_WELL_FENCE_CELLS:
|
||||
text = "VISIBLE_WELL_FENCE_CELLS";
|
||||
break;
|
||||
case INACTIVE:
|
||||
text = "INACTIVE";
|
||||
break;
|
||||
case RANGE_FILTERED:
|
||||
text = "RANGE_FILTERED";
|
||||
break;
|
||||
case RANGE_FILTERED_INACTIVE:
|
||||
text = "RANGE_FILTERED_INACTIVE";
|
||||
break;
|
||||
case RANGE_FILTERED_WELL_CELLS:
|
||||
text = "RANGE_FILTERED_WELL_CELLS";
|
||||
break;
|
||||
case VISIBLE_WELL_CELLS_OUTSIDE_RANGE_FILTER:
|
||||
text = "VISIBLE_WELL_CELLS_OUTSIDE_RANGE_FILTER";
|
||||
break;
|
||||
case VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER:
|
||||
text = "VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER";
|
||||
break;
|
||||
case PROPERTY_FILTERED:
|
||||
text = "PROPERTY_FILTERED";
|
||||
break;
|
||||
case PROPERTY_FILTERED_WELL_CELLS:
|
||||
text = "PROPERTY_FILTERED_WELL_CELLS";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
qDebug() << text;
|
||||
*/
|
||||
|
||||
m_geometries[geometryType].appendFaultPartsToModel(model);
|
||||
}
|
||||
|
||||
@ -969,10 +1029,14 @@ void RivReservoirViewPartMgr::appendFaultsDynamicGeometryPartsToModel(cvf::Model
|
||||
{
|
||||
if (geometryType == PROPERTY_FILTERED)
|
||||
{
|
||||
//qDebug() << "PROPERTY_FILTERED";
|
||||
|
||||
m_propFilteredGeometryFrames[frameIndex]->appendFaultPartsToModel(model);
|
||||
}
|
||||
else if (geometryType == PROPERTY_FILTERED_WELL_CELLS)
|
||||
{
|
||||
//qDebug() << "PROPERTY_FILTERED_WELL_CELLS";
|
||||
|
||||
m_propFilteredWellGeometryFrames[frameIndex]->appendFaultPartsToModel(model);
|
||||
}
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ public:
|
||||
void appendFaultLabelsStaticGeometryPartsToModel(cvf::ModelBasicList* model, RivCellSetEnum geometryType);
|
||||
void appendFaultLabelsDynamicGeometryPartsToModel(cvf::ModelBasicList* model, RivCellSetEnum geometryType, size_t frameIndex);
|
||||
|
||||
void forceWatertightGeometryOnForType(RivCellSetEnum geometryType, bool forceVisibility);
|
||||
void forceWatertightGeometryForType(RivCellSetEnum geometryType, bool forceVisibility);
|
||||
|
||||
private:
|
||||
void createGeometry(RivCellSetEnum geometryType);
|
||||
|
@ -413,14 +413,14 @@ void RimEclipseView::createDisplayModel()
|
||||
|
||||
for (size_t frameIdx = 0; frameIdx < frameModels.size(); ++frameIdx)
|
||||
{
|
||||
for (size_t gtIdx = 0; gtIdx < faultGeometryTypesToAppend.size(); ++gtIdx)
|
||||
for (RivCellSetEnum geometryType : faultGeometryTypesToAppend)
|
||||
{
|
||||
m_reservoirGridPartManager->appendFaultsStaticGeometryPartsToModel(frameModels[frameIdx].p(), faultGeometryTypesToAppend[gtIdx]);
|
||||
if (geometryType == PROPERTY_FILTERED || geometryType == PROPERTY_FILTERED_WELL_CELLS) continue;
|
||||
m_reservoirGridPartManager->appendFaultsStaticGeometryPartsToModel(frameModels[frameIdx].p(), geometryType);
|
||||
}
|
||||
|
||||
m_reservoirGridPartManager->appendFaultLabelsStaticGeometryPartsToModel(frameModels[frameIdx].p(), faultLabelType);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -528,13 +528,23 @@ void RimEclipseView::updateCurrentTimeStep()
|
||||
geometriesToRecolor.push_back( PROPERTY_FILTERED_WELL_CELLS);
|
||||
m_reservoirGridPartManager->appendDynamicGeometryPartsToModel(frameParts.p(), PROPERTY_FILTERED_WELL_CELLS, m_currentTimeStep, gridIndices);
|
||||
|
||||
forceWatertightGeometryOn();
|
||||
|
||||
if (faultCollection()->showFaultsOutsideFilters())
|
||||
{
|
||||
std::vector<RivCellSetEnum> faultGeometryTypesToAppend = visibleFaultGeometryTypes();
|
||||
|
||||
for (size_t i = 0; i < faultGeometryTypesToAppend.size(); i++)
|
||||
for (RivCellSetEnum geometryType : faultGeometryTypesToAppend)
|
||||
{
|
||||
m_reservoirGridPartManager->appendFaultsStaticGeometryPartsToModel(frameParts.p(), faultGeometryTypesToAppend[i]);
|
||||
if (geometryType == PROPERTY_FILTERED || geometryType == PROPERTY_FILTERED_WELL_CELLS)
|
||||
{
|
||||
m_reservoirGridPartManager->appendFaultsDynamicGeometryPartsToModel(frameParts.p(), geometryType, m_currentTimeStep);
|
||||
m_reservoirGridPartManager->appendFaultLabelsDynamicGeometryPartsToModel(frameParts.p(), geometryType, m_currentTimeStep);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_reservoirGridPartManager->appendFaultsStaticGeometryPartsToModel(frameParts.p(), geometryType);
|
||||
}
|
||||
}
|
||||
|
||||
RivCellSetEnum faultLabelType = m_reservoirGridPartManager->geometryTypeForFaultLabels(faultGeometryTypesToAppend, faultCollection()->showFaultsOutsideFilters());
|
||||
@ -1362,7 +1372,7 @@ void RimEclipseView::forceWatertightGeometryOn()
|
||||
{
|
||||
if (this->viewController() && this->viewController()->isVisibleCellsOveridden())
|
||||
{
|
||||
m_reservoirGridPartManager->forceWatertightGeometryOnForType(OVERRIDDEN_CELL_VISIBILITY, true);
|
||||
m_reservoirGridPartManager->forceWatertightGeometryForType(OVERRIDDEN_CELL_VISIBILITY, true);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1372,12 +1382,19 @@ void RimEclipseView::forceWatertightGeometryOn()
|
||||
|
||||
if (!faultCollection->showFaultCollection)
|
||||
{
|
||||
m_reservoirGridPartManager->forceWatertightGeometryOnForType(ALL_WELL_CELLS, true);
|
||||
m_reservoirGridPartManager->forceWatertightGeometryForType(ALL_WELL_CELLS, true);
|
||||
}
|
||||
|
||||
m_reservoirGridPartManager->forceWatertightGeometryOnForType(RANGE_FILTERED, true);
|
||||
m_reservoirGridPartManager->forceWatertightGeometryOnForType(VISIBLE_WELL_FENCE_CELLS, true);
|
||||
m_reservoirGridPartManager->forceWatertightGeometryOnForType(VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER, true);
|
||||
m_reservoirGridPartManager->forceWatertightGeometryForType(RANGE_FILTERED, true);
|
||||
m_reservoirGridPartManager->forceWatertightGeometryForType(VISIBLE_WELL_CELLS, true);
|
||||
m_reservoirGridPartManager->forceWatertightGeometryForType(VISIBLE_WELL_FENCE_CELLS, true);
|
||||
m_reservoirGridPartManager->forceWatertightGeometryForType(VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER, true);
|
||||
|
||||
if (this->eclipsePropertyFilterCollection()->hasActiveFilters())
|
||||
{
|
||||
m_reservoirGridPartManager->forceWatertightGeometryForType(PROPERTY_FILTERED, true);
|
||||
m_reservoirGridPartManager->forceWatertightGeometryForType(PROPERTY_FILTERED_WELL_CELLS, true);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -1416,14 +1433,49 @@ std::vector<RivCellSetEnum> RimEclipseView::visibleFaultGeometryTypes() const
|
||||
}
|
||||
else if (this->faultCollection()->showFaultsOutsideFilters())
|
||||
{
|
||||
faultParts.push_back(ACTIVE);
|
||||
faultParts.push_back(ALL_WELL_CELLS);
|
||||
/// Why are these added ? JJS -->
|
||||
faultParts.push_back(RANGE_FILTERED);
|
||||
faultParts.push_back(RANGE_FILTERED_WELL_CELLS);
|
||||
faultParts.push_back(VISIBLE_WELL_CELLS_OUTSIDE_RANGE_FILTER);
|
||||
faultParts.push_back(VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER);
|
||||
/// <-- JJS
|
||||
if (this->eclipsePropertyFilterCollection()->hasActiveFilters())
|
||||
{
|
||||
faultParts.push_back(PROPERTY_FILTERED);
|
||||
faultParts.push_back(PROPERTY_FILTERED_WELL_CELLS);
|
||||
faultParts.push_back(ACTIVE);
|
||||
faultParts.push_back(ALL_WELL_CELLS);
|
||||
}
|
||||
else
|
||||
{
|
||||
faultParts.push_back(ACTIVE);
|
||||
faultParts.push_back(ALL_WELL_CELLS);
|
||||
|
||||
faultParts.push_back(VISIBLE_WELL_CELLS);
|
||||
faultParts.push_back(VISIBLE_WELL_FENCE_CELLS);
|
||||
|
||||
if (this->rangeFilterCollection()->hasActiveFilters() && this->wellCollection()->hasVisibleWellCells())
|
||||
{
|
||||
faultParts.push_back(RANGE_FILTERED);
|
||||
faultParts.push_back(RANGE_FILTERED_WELL_CELLS);
|
||||
faultParts.push_back(VISIBLE_WELL_CELLS_OUTSIDE_RANGE_FILTER);
|
||||
faultParts.push_back(VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER);
|
||||
|
||||
if (this->showInactiveCells())
|
||||
{
|
||||
faultParts.push_back(RANGE_FILTERED_INACTIVE);
|
||||
}
|
||||
}
|
||||
else if (!this->rangeFilterCollection()->hasActiveFilters() && this->wellCollection()->hasVisibleWellCells())
|
||||
{
|
||||
faultParts.push_back(VISIBLE_WELL_CELLS);
|
||||
faultParts.push_back(VISIBLE_WELL_FENCE_CELLS);
|
||||
}
|
||||
else if (this->rangeFilterCollection()->hasActiveFilters() && !this->wellCollection()->hasVisibleWellCells())
|
||||
{
|
||||
faultParts.push_back(RANGE_FILTERED);
|
||||
faultParts.push_back(RANGE_FILTERED_WELL_CELLS);
|
||||
|
||||
if (this->showInactiveCells())
|
||||
{
|
||||
faultParts.push_back(RANGE_FILTERED_INACTIVE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this->showInactiveCells())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user