mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2436 Separated Hide grid cells mode as a separate value. Make sure that all the possible drawstyles works as expected, both for 2D intersection view and 3D views.
This commit is contained in:
@@ -147,19 +147,21 @@ std::vector<RivGeoMechPartMgrCache::Key> RivGeoMechVizLogic::keysToVisiblePartMg
|
||||
{
|
||||
visiblePartMgrs.push_back(RivGeoMechPartMgrCache::Key(OVERRIDDEN_CELL_VISIBILITY, -1));
|
||||
}
|
||||
else if (timeStepIndex >= 0 && m_geomechView->geoMechPropertyFilterCollection()->hasActiveFilters())
|
||||
else if ( m_geomechView->isGridVisualizationMode() )
|
||||
{
|
||||
visiblePartMgrs.push_back(RivGeoMechPartMgrCache::Key(PROPERTY_FILTERED, timeStepIndex));
|
||||
if ( timeStepIndex >= 0 && m_geomechView->geoMechPropertyFilterCollection()->hasActiveFilters() )
|
||||
{
|
||||
visiblePartMgrs.push_back(RivGeoMechPartMgrCache::Key(PROPERTY_FILTERED, timeStepIndex));
|
||||
}
|
||||
else if ( m_geomechView->rangeFilterCollection()->hasActiveFilters() )
|
||||
{
|
||||
visiblePartMgrs.push_back(RivGeoMechPartMgrCache::Key(RANGE_FILTERED, -1));
|
||||
}
|
||||
else
|
||||
{
|
||||
visiblePartMgrs.push_back(RivGeoMechPartMgrCache::Key(ALL_CELLS, -1));
|
||||
}
|
||||
}
|
||||
else if (m_geomechView->rangeFilterCollection()->hasActiveFilters())
|
||||
{
|
||||
visiblePartMgrs.push_back(RivGeoMechPartMgrCache::Key(RANGE_FILTERED, -1));
|
||||
}
|
||||
else
|
||||
{
|
||||
visiblePartMgrs.push_back(RivGeoMechPartMgrCache::Key(ALL_CELLS, -1));
|
||||
}
|
||||
|
||||
return visiblePartMgrs;
|
||||
}
|
||||
|
||||
|
||||
@@ -528,14 +528,14 @@ void RivIntersectionPartMgr::generatePartGeometry()
|
||||
part->setSourceInfo(si.p());
|
||||
|
||||
part->updateBoundingBox();
|
||||
part->setEnableMask(faultBit);
|
||||
part->setEnableMask(intersectionCellFaceBit);
|
||||
part->setPriority(RivPartPriority::PartType::Intersection);
|
||||
|
||||
m_crossSectionFaces = part;
|
||||
}
|
||||
}
|
||||
|
||||
// Mesh geometry
|
||||
// Cell Mesh geometry
|
||||
{
|
||||
cvf::ref<cvf::DrawableGeo> geoMesh = m_crossSectionGenerator->createMeshDrawable();
|
||||
if (geoMesh.notNull())
|
||||
@@ -550,14 +550,14 @@ void RivIntersectionPartMgr::generatePartGeometry()
|
||||
part->setDrawable(geoMesh.p());
|
||||
|
||||
part->updateBoundingBox();
|
||||
part->setEnableMask(meshFaultBit);
|
||||
part->setEnableMask(intersectionCellMeshBit);
|
||||
part->setPriority(RivPartPriority::PartType::MeshLines);
|
||||
|
||||
m_crossSectionGridLines = part;
|
||||
}
|
||||
}
|
||||
|
||||
// Mesh geometry
|
||||
// Fault Mesh geometry
|
||||
{
|
||||
cvf::ref<cvf::DrawableGeo> geoMesh = m_crossSectionGenerator->createFaultMeshDrawable();
|
||||
if (geoMesh.notNull())
|
||||
@@ -572,7 +572,7 @@ void RivIntersectionPartMgr::generatePartGeometry()
|
||||
part->setDrawable(geoMesh.p());
|
||||
|
||||
part->updateBoundingBox();
|
||||
part->setEnableMask(meshFaultBit);
|
||||
part->setEnableMask(intersectionFaultMeshBit);
|
||||
part->setPriority(RivPartPriority::PartType::FaultMeshLines);
|
||||
|
||||
m_crossSectionFaultGridLines = part;
|
||||
|
||||
@@ -109,7 +109,7 @@ void RivReservoirFaultsPartMgr::appendPartsToModel(cvf::ModelBasicList* model)
|
||||
|
||||
// Parts that is overridden by the grid settings
|
||||
bool forceDisplayOfFault = false;
|
||||
if (!faultCollection->showFaultsOutsideFilters())
|
||||
if (!faultCollection->isShowingFaultsAndFaultsOutsideFilters())
|
||||
{
|
||||
forceDisplayOfFault = isShowingGrid;
|
||||
}
|
||||
|
||||
@@ -214,11 +214,20 @@ void RivReservoirViewPartMgr::clearGeometryCache()
|
||||
void RivReservoirViewPartMgr::appendStaticGeometryPartsToModel(cvf::ModelBasicList* model, RivCellSetEnum geometryType,
|
||||
const std::vector<size_t>& gridIndices)
|
||||
{
|
||||
if (m_geometriesNeedsRegen[geometryType])
|
||||
ensureStaticGeometryPartsCreated(geometryType);
|
||||
|
||||
m_geometries[geometryType].appendGridPartsToModel(model, gridIndices);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirViewPartMgr::ensureStaticGeometryPartsCreated(RivCellSetEnum geometryType)
|
||||
{
|
||||
if (geometryType < PROPERTY_FILTERED && m_geometriesNeedsRegen[geometryType])
|
||||
{
|
||||
createGeometry( geometryType);
|
||||
}
|
||||
m_geometries[geometryType].appendGridPartsToModel(model, gridIndices);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -226,6 +235,23 @@ void RivReservoirViewPartMgr::appendStaticGeometryPartsToModel(cvf::ModelBasicLi
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirViewPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, RivCellSetEnum geometryType,
|
||||
size_t frameIndex, const std::vector<size_t>& gridIndices)
|
||||
{
|
||||
ensureDynamicGeometryPartsCreated(geometryType, frameIndex);
|
||||
|
||||
if (geometryType == PROPERTY_FILTERED)
|
||||
{
|
||||
m_propFilteredGeometryFrames[frameIndex]->appendGridPartsToModel(model, gridIndices);
|
||||
}
|
||||
else if (geometryType == PROPERTY_FILTERED_WELL_CELLS)
|
||||
{
|
||||
m_propFilteredWellGeometryFrames[frameIndex]->appendGridPartsToModel(model, gridIndices);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirViewPartMgr::ensureDynamicGeometryPartsCreated(RivCellSetEnum geometryType, size_t frameIndex)
|
||||
{
|
||||
if (geometryType == PROPERTY_FILTERED)
|
||||
{
|
||||
@@ -233,7 +259,6 @@ void RivReservoirViewPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicL
|
||||
{
|
||||
createPropertyFilteredNoneWellCellGeometry(frameIndex);
|
||||
}
|
||||
m_propFilteredGeometryFrames[frameIndex]->appendGridPartsToModel(model, gridIndices);
|
||||
}
|
||||
else if (geometryType == PROPERTY_FILTERED_WELL_CELLS)
|
||||
{
|
||||
@@ -241,7 +266,6 @@ void RivReservoirViewPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicL
|
||||
{
|
||||
createPropertyFilteredWellGeometry(frameIndex);
|
||||
}
|
||||
m_propFilteredWellGeometryFrames[frameIndex]->appendGridPartsToModel(model, gridIndices);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,7 +314,7 @@ void RivReservoirViewPartMgr::computeVisibility(cvf::UByteArray* cellVisibility,
|
||||
case VISIBLE_WELL_CELLS:
|
||||
{
|
||||
cvf::ref<cvf::UByteArray> allWellCellsVisibility;
|
||||
if (m_geometriesNeedsRegen[ALL_WELL_CELLS]) createGeometry(ALL_WELL_CELLS);
|
||||
ensureStaticGeometryPartsCreated(ALL_WELL_CELLS);
|
||||
|
||||
allWellCellsVisibility = m_geometries[ALL_WELL_CELLS].cellVisibility(gridIdx);
|
||||
|
||||
@@ -306,7 +330,7 @@ void RivReservoirViewPartMgr::computeVisibility(cvf::UByteArray* cellVisibility,
|
||||
case VISIBLE_WELL_FENCE_CELLS:
|
||||
{
|
||||
cvf::ref<cvf::UByteArray> allWellCellsVisibility;
|
||||
if (m_geometriesNeedsRegen[ALL_WELL_CELLS]) createGeometry(ALL_WELL_CELLS);
|
||||
ensureStaticGeometryPartsCreated(ALL_WELL_CELLS);
|
||||
|
||||
allWellCellsVisibility = m_geometries[ALL_WELL_CELLS].cellVisibility(gridIdx);
|
||||
|
||||
@@ -325,7 +349,7 @@ void RivReservoirViewPartMgr::computeVisibility(cvf::UByteArray* cellVisibility,
|
||||
case RANGE_FILTERED:
|
||||
{
|
||||
cvf::ref<cvf::UByteArray> nativeVisibility;
|
||||
if (m_geometriesNeedsRegen[ACTIVE]) createGeometry(ACTIVE);
|
||||
ensureStaticGeometryPartsCreated(ACTIVE);
|
||||
|
||||
nativeVisibility = m_geometries[ACTIVE].cellVisibility(gridIdx);
|
||||
computeRangeVisibility(geometryType, cellVisibility, grid, nativeVisibility.p(), m_reservoirView->rangeFilterCollection());
|
||||
@@ -334,7 +358,7 @@ void RivReservoirViewPartMgr::computeVisibility(cvf::UByteArray* cellVisibility,
|
||||
case RANGE_FILTERED_INACTIVE:
|
||||
{
|
||||
cvf::ref<cvf::UByteArray> nativeVisibility;
|
||||
if (m_geometriesNeedsRegen[INACTIVE]) createGeometry(INACTIVE);
|
||||
ensureStaticGeometryPartsCreated(INACTIVE);
|
||||
|
||||
nativeVisibility = m_geometries[INACTIVE].cellVisibility(gridIdx);
|
||||
computeRangeVisibility(geometryType, cellVisibility, grid, nativeVisibility.p(), m_reservoirView->rangeFilterCollection());
|
||||
@@ -343,7 +367,7 @@ void RivReservoirViewPartMgr::computeVisibility(cvf::UByteArray* cellVisibility,
|
||||
case RANGE_FILTERED_WELL_CELLS:
|
||||
{
|
||||
cvf::ref<cvf::UByteArray> nativeVisibility;
|
||||
if (m_geometriesNeedsRegen[ALL_WELL_CELLS]) createGeometry(ALL_WELL_CELLS);
|
||||
ensureStaticGeometryPartsCreated(ALL_WELL_CELLS);
|
||||
|
||||
nativeVisibility = m_geometries[ALL_WELL_CELLS].cellVisibility(gridIdx);
|
||||
computeRangeVisibility(geometryType, cellVisibility, grid, nativeVisibility.p(), m_reservoirView->rangeFilterCollection());
|
||||
@@ -354,8 +378,8 @@ void RivReservoirViewPartMgr::computeVisibility(cvf::UByteArray* cellVisibility,
|
||||
cvf::ref<cvf::UByteArray> visibleWellCells;
|
||||
cvf::ref<cvf::UByteArray> rangeFilteredWellCells;
|
||||
|
||||
if (m_geometriesNeedsRegen[VISIBLE_WELL_CELLS]) createGeometry(VISIBLE_WELL_CELLS);
|
||||
if (m_geometriesNeedsRegen[RANGE_FILTERED_WELL_CELLS]) createGeometry(RANGE_FILTERED_WELL_CELLS);
|
||||
ensureStaticGeometryPartsCreated(VISIBLE_WELL_CELLS);
|
||||
ensureStaticGeometryPartsCreated(RANGE_FILTERED_WELL_CELLS);
|
||||
|
||||
visibleWellCells = m_geometries[VISIBLE_WELL_CELLS].cellVisibility(gridIdx);
|
||||
rangeFilteredWellCells = m_geometries[RANGE_FILTERED_WELL_CELLS].cellVisibility(gridIdx);
|
||||
@@ -374,8 +398,8 @@ void RivReservoirViewPartMgr::computeVisibility(cvf::UByteArray* cellVisibility,
|
||||
cvf::ref<cvf::UByteArray> visibleWellCells;
|
||||
cvf::ref<cvf::UByteArray> rangeFilteredWellCells;
|
||||
|
||||
if (m_geometriesNeedsRegen[VISIBLE_WELL_FENCE_CELLS]) createGeometry(VISIBLE_WELL_FENCE_CELLS);
|
||||
if (m_geometriesNeedsRegen[RANGE_FILTERED]) createGeometry(RANGE_FILTERED);
|
||||
ensureStaticGeometryPartsCreated(VISIBLE_WELL_FENCE_CELLS);
|
||||
ensureStaticGeometryPartsCreated(RANGE_FILTERED);
|
||||
|
||||
visibleWellCells = m_geometries[VISIBLE_WELL_FENCE_CELLS].cellVisibility(gridIdx);
|
||||
rangeFilteredWellCells = m_geometries[RANGE_FILTERED].cellVisibility(gridIdx);
|
||||
@@ -427,29 +451,29 @@ void RivReservoirViewPartMgr::createPropertyFilteredNoneWellCellGeometry(size_t
|
||||
|
||||
if (hasActiveRangeFilters && hasVisibleWellCells)
|
||||
{
|
||||
if (m_geometriesNeedsRegen[RANGE_FILTERED]) createGeometry(RANGE_FILTERED);
|
||||
if (m_geometriesNeedsRegen[VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER]) createGeometry(VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER);
|
||||
ensureStaticGeometryPartsCreated(RANGE_FILTERED);
|
||||
ensureStaticGeometryPartsCreated(VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER);
|
||||
|
||||
rangeVisibility = m_geometries[RANGE_FILTERED].cellVisibility(gIdx);
|
||||
fenceVisibility = m_geometries[VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER].cellVisibility(gIdx);
|
||||
}
|
||||
else if (hasActiveRangeFilters && !hasVisibleWellCells)
|
||||
{
|
||||
if (m_geometriesNeedsRegen[RANGE_FILTERED]) createGeometry(RANGE_FILTERED);
|
||||
ensureStaticGeometryPartsCreated(RANGE_FILTERED);
|
||||
|
||||
rangeVisibility = m_geometries[RANGE_FILTERED].cellVisibility(gIdx);
|
||||
fenceVisibility = m_geometries[RANGE_FILTERED].cellVisibility(gIdx);
|
||||
}
|
||||
else if (!hasActiveRangeFilters && hasVisibleWellCells)
|
||||
{
|
||||
if (m_geometriesNeedsRegen[VISIBLE_WELL_FENCE_CELLS]) createGeometry(VISIBLE_WELL_FENCE_CELLS);
|
||||
ensureStaticGeometryPartsCreated(VISIBLE_WELL_FENCE_CELLS);
|
||||
|
||||
rangeVisibility = m_geometries[VISIBLE_WELL_FENCE_CELLS].cellVisibility(gIdx);
|
||||
fenceVisibility = m_geometries[VISIBLE_WELL_FENCE_CELLS].cellVisibility(gIdx);
|
||||
}
|
||||
else if (!hasActiveRangeFilters && !hasVisibleWellCells)
|
||||
{
|
||||
if (m_geometriesNeedsRegen[ACTIVE]) createGeometry(ACTIVE);
|
||||
ensureStaticGeometryPartsCreated(ACTIVE);
|
||||
|
||||
rangeVisibility = m_geometries[ACTIVE].cellVisibility(gIdx);
|
||||
fenceVisibility = m_geometries[ACTIVE].cellVisibility(gIdx);
|
||||
@@ -504,36 +528,36 @@ void RivReservoirViewPartMgr::createPropertyFilteredWellGeometry(size_t frameInd
|
||||
|
||||
if (hasActiveRangeFilters && hasVisibleWellCells)
|
||||
{
|
||||
if (m_geometriesNeedsRegen[RANGE_FILTERED_WELL_CELLS]) createGeometry(RANGE_FILTERED_WELL_CELLS);
|
||||
ensureStaticGeometryPartsCreated(RANGE_FILTERED_WELL_CELLS);
|
||||
rangeVisibility = m_geometries[RANGE_FILTERED_WELL_CELLS].cellVisibility(gIdx);
|
||||
|
||||
if (m_geometriesNeedsRegen[VISIBLE_WELL_CELLS_OUTSIDE_RANGE_FILTER]) createGeometry(VISIBLE_WELL_CELLS_OUTSIDE_RANGE_FILTER);
|
||||
ensureStaticGeometryPartsCreated(VISIBLE_WELL_CELLS_OUTSIDE_RANGE_FILTER);
|
||||
wellCellsOutsideRange = m_geometries[VISIBLE_WELL_CELLS_OUTSIDE_RANGE_FILTER].cellVisibility(gIdx);
|
||||
|
||||
if (m_geometriesNeedsRegen[VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER]) createGeometry(VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER);
|
||||
ensureStaticGeometryPartsCreated(VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER);
|
||||
wellFenceCells = m_geometries[VISIBLE_WELL_FENCE_CELLS_OUTSIDE_RANGE_FILTER].cellVisibility(gIdx);
|
||||
|
||||
}
|
||||
else if (hasActiveRangeFilters && !hasVisibleWellCells)
|
||||
{
|
||||
if (m_geometriesNeedsRegen[RANGE_FILTERED_WELL_CELLS]) createGeometry(RANGE_FILTERED_WELL_CELLS);
|
||||
ensureStaticGeometryPartsCreated(RANGE_FILTERED_WELL_CELLS);
|
||||
rangeVisibility = m_geometries[RANGE_FILTERED_WELL_CELLS].cellVisibility(gIdx);
|
||||
wellCellsOutsideRange = rangeVisibility;
|
||||
wellFenceCells = rangeVisibility;
|
||||
}
|
||||
else if (!hasActiveRangeFilters && hasVisibleWellCells)
|
||||
{
|
||||
if (m_geometriesNeedsRegen[VISIBLE_WELL_CELLS]) createGeometry(VISIBLE_WELL_CELLS);
|
||||
ensureStaticGeometryPartsCreated(VISIBLE_WELL_CELLS);
|
||||
wellCellsOutsideRange = m_geometries[VISIBLE_WELL_CELLS].cellVisibility(gIdx);
|
||||
|
||||
if (m_geometriesNeedsRegen[VISIBLE_WELL_FENCE_CELLS]) createGeometry(VISIBLE_WELL_FENCE_CELLS);
|
||||
ensureStaticGeometryPartsCreated(VISIBLE_WELL_FENCE_CELLS);
|
||||
wellFenceCells = m_geometries[VISIBLE_WELL_FENCE_CELLS].cellVisibility(gIdx);
|
||||
|
||||
rangeVisibility = wellCellsOutsideRange;
|
||||
}
|
||||
else if (!hasActiveRangeFilters && !hasVisibleWellCells)
|
||||
{
|
||||
if (m_geometriesNeedsRegen[ALL_WELL_CELLS]) createGeometry(ALL_WELL_CELLS);
|
||||
ensureStaticGeometryPartsCreated(ALL_WELL_CELLS);
|
||||
wellFenceCells = m_geometries[ALL_WELL_CELLS].cellVisibility(gIdx);
|
||||
wellCellsOutsideRange = wellFenceCells;
|
||||
rangeVisibility = wellFenceCells;
|
||||
@@ -904,28 +928,11 @@ void RivReservoirViewPartMgr::updateFaultCellEdgeResultColor(RivCellSetEnum geom
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const cvf::UByteArray* RivReservoirViewPartMgr::cellVisibility(RivCellSetEnum geometryType, size_t gridIndex, size_t timeStepIndex)
|
||||
{
|
||||
if (geometryType == PROPERTY_FILTERED)
|
||||
{
|
||||
if (timeStepIndex >= m_propFilteredGeometryFramesNeedsRegen.size() || m_propFilteredGeometryFramesNeedsRegen[timeStepIndex])
|
||||
{
|
||||
createPropertyFilteredNoneWellCellGeometry(timeStepIndex);
|
||||
}
|
||||
}
|
||||
else if (geometryType == PROPERTY_FILTERED_WELL_CELLS)
|
||||
{
|
||||
if (timeStepIndex >= m_propFilteredWellGeometryFramesNeedsRegen.size() || m_propFilteredWellGeometryFramesNeedsRegen[timeStepIndex])
|
||||
{
|
||||
createPropertyFilteredWellGeometry(timeStepIndex);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_geometriesNeedsRegen[geometryType])
|
||||
{
|
||||
createGeometry(geometryType);
|
||||
}
|
||||
}
|
||||
ensureDynamicGeometryPartsCreated(geometryType, timeStepIndex);
|
||||
ensureStaticGeometryPartsCreated(geometryType);
|
||||
|
||||
RivReservoirPartMgr * pmgr = (const_cast<RivReservoirViewPartMgr*>(this))->reservoirPartManager( geometryType, timeStepIndex );
|
||||
|
||||
return pmgr->cellVisibility(gridIndex).p();
|
||||
}
|
||||
|
||||
@@ -972,13 +979,9 @@ 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);
|
||||
}
|
||||
ensureStaticGeometryPartsCreated(geometryType);
|
||||
|
||||
/*
|
||||
QString text;
|
||||
@@ -1084,10 +1087,7 @@ RivCellSetEnum RivReservoirViewPartMgr::geometryTypeForFaultLabels(const std::se
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirViewPartMgr::appendFaultLabelsStaticGeometryPartsToModel(cvf::ModelBasicList* model, RivCellSetEnum geometryType)
|
||||
{
|
||||
if (m_geometriesNeedsRegen[geometryType])
|
||||
{
|
||||
createGeometry(geometryType);
|
||||
}
|
||||
ensureStaticGeometryPartsCreated(geometryType);
|
||||
m_geometries[geometryType].appendFaultLabelPartsToModel(model);
|
||||
}
|
||||
|
||||
@@ -1120,10 +1120,7 @@ void RivReservoirViewPartMgr::forceWatertightGeometryOnForType(RivCellSetEnum ge
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_geometriesNeedsRegen[geometryType])
|
||||
{
|
||||
createGeometry(geometryType);
|
||||
}
|
||||
ensureStaticGeometryPartsCreated(geometryType);
|
||||
m_geometries[geometryType].forceWatertightGeometryOn();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,36 +54,60 @@ public:
|
||||
void scheduleGeometryRegen(RivCellSetEnum geometryType);
|
||||
const cvf::UByteArray* cellVisibility(RivCellSetEnum geometryType, size_t gridIndex, size_t frameIndex);
|
||||
|
||||
void appendStaticGeometryPartsToModel (cvf::ModelBasicList* model, RivCellSetEnum geometryType, const std::vector<size_t>& gridIndices);
|
||||
void appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model, RivCellSetEnum geometryType, size_t frameIndex, const std::vector<size_t>& gridIndices);
|
||||
void appendStaticGeometryPartsToModel (cvf::ModelBasicList* model,
|
||||
RivCellSetEnum geometryType,
|
||||
const std::vector<size_t>& gridIndices);
|
||||
void ensureStaticGeometryPartsCreated ( RivCellSetEnum geometryType );
|
||||
|
||||
void updateCellColor (RivCellSetEnum geometryType, size_t timeStepIndex,
|
||||
void appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model,
|
||||
RivCellSetEnum geometryType,
|
||||
size_t frameIndex,
|
||||
const std::vector<size_t>& gridIndices);
|
||||
void ensureDynamicGeometryPartsCreated(RivCellSetEnum geometryType,
|
||||
size_t frameIndex);
|
||||
|
||||
void updateCellColor (RivCellSetEnum geometryType,
|
||||
size_t timeStepIndex,
|
||||
cvf::Color4f color);
|
||||
void updateCellResultColor (RivCellSetEnum geometryType, size_t timeStepIndex,
|
||||
void updateCellResultColor (RivCellSetEnum geometryType,
|
||||
size_t timeStepIndex,
|
||||
RimEclipseCellColors* cellResultColors);
|
||||
void updateCellEdgeResultColor(RivCellSetEnum geometryType, size_t timeStepIndex,
|
||||
void updateCellEdgeResultColor(RivCellSetEnum geometryType,
|
||||
size_t timeStepIndex,
|
||||
RimEclipseCellColors* cellResultColors,
|
||||
RimCellEdgeColors* cellEdgeResultColors);
|
||||
|
||||
// Faults
|
||||
void appendFaultsStaticGeometryPartsToModel(cvf::ModelBasicList* model, RivCellSetEnum geometryType);
|
||||
void appendFaultsDynamicGeometryPartsToModel(cvf::ModelBasicList* model, RivCellSetEnum geometryType, size_t frameIndex);
|
||||
void updateFaultColors(RivCellSetEnum geometryType, size_t timeStepIndex, RimEclipseCellColors* cellResultColors);
|
||||
void updateFaultCellEdgeResultColor( RivCellSetEnum geometryType, size_t timeStepIndex,
|
||||
RimEclipseCellColors* cellResultColors,
|
||||
RimCellEdgeColors* cellEdgeResultColors);
|
||||
void appendFaultsStaticGeometryPartsToModel(cvf::ModelBasicList* model,
|
||||
RivCellSetEnum geometryType);
|
||||
void appendFaultsDynamicGeometryPartsToModel(cvf::ModelBasicList* model,
|
||||
RivCellSetEnum geometryType,
|
||||
size_t frameIndex);
|
||||
void updateFaultColors(RivCellSetEnum geometryType,
|
||||
size_t timeStepIndex,
|
||||
RimEclipseCellColors* cellResultColors);
|
||||
void updateFaultCellEdgeResultColor(RivCellSetEnum geometryType,
|
||||
size_t timeStepIndex,
|
||||
RimEclipseCellColors* cellResultColors,
|
||||
RimCellEdgeColors* cellEdgeResultColors);
|
||||
|
||||
// Fault labels
|
||||
RivCellSetEnum geometryTypeForFaultLabels(const std::set<RivCellSetEnum>& geometryTypes, bool showFaultsOutsideFilters) const;
|
||||
void appendFaultLabelsStaticGeometryPartsToModel(cvf::ModelBasicList* model, RivCellSetEnum geometryType);
|
||||
void appendFaultLabelsDynamicGeometryPartsToModel(cvf::ModelBasicList* model, RivCellSetEnum geometryType, size_t frameIndex);
|
||||
RivCellSetEnum geometryTypeForFaultLabels(const std::set<RivCellSetEnum>& geometryTypes,
|
||||
bool showFaultsOutsideFilters) const;
|
||||
void appendFaultLabelsStaticGeometryPartsToModel(cvf::ModelBasicList* model,
|
||||
RivCellSetEnum geometryType);
|
||||
void appendFaultLabelsDynamicGeometryPartsToModel(cvf::ModelBasicList* model,
|
||||
RivCellSetEnum geometryType, size_t frameIndex);
|
||||
|
||||
void forceWatertightGeometryOnForType(RivCellSetEnum geometryType);
|
||||
void clearWatertightGeometryFlags();
|
||||
|
||||
private:
|
||||
void createGeometry(RivCellSetEnum geometryType);
|
||||
void computeVisibility(cvf::UByteArray* cellVisibility, RivCellSetEnum geometryType, RigGridBase* grid, size_t gridIdx);
|
||||
void computeVisibility(cvf::UByteArray* cellVisibility,
|
||||
RivCellSetEnum geometryType,
|
||||
RigGridBase* grid,
|
||||
size_t gridIdx);
|
||||
|
||||
void createPropertyFilteredNoneWellCellGeometry(size_t frameIndex);
|
||||
void createPropertyFilteredWellGeometry(size_t frameIndex);
|
||||
@@ -91,10 +115,26 @@ private:
|
||||
void clearGeometryCache(RivCellSetEnum geomType);
|
||||
|
||||
|
||||
static void computeNativeVisibility (cvf::UByteArray* cellVisibilities, const RigGridBase* grid, const RigActiveCellInfo* activeCellInfo, const cvf::UByteArray* cellIsInWellStatuses, bool invalidCellsIsVisible, bool inactiveCellsIsVisible, bool activeCellsIsVisible, bool mainGridIsVisible);
|
||||
void computeRangeVisibility (RivCellSetEnum geometryType, cvf::UByteArray* cellVisibilities, const RigGridBase* grid, const cvf::UByteArray* nativeVisibility, const RimCellRangeFilterCollection* rangeFilterColl);
|
||||
static void computePropertyVisibility(cvf::UByteArray* cellVisibilities, const RigGridBase* grid, size_t timeStepIndex, const cvf::UByteArray* rangeFilterVisibility, RimEclipsePropertyFilterCollection* propFilterColl);
|
||||
void computeOverriddenCellVisibility(cvf::UByteArray* cellVisibility, const RigGridBase* grid);
|
||||
static void computeNativeVisibility (cvf::UByteArray* cellVisibilities,
|
||||
const RigGridBase* grid,
|
||||
const RigActiveCellInfo* activeCellInfo,
|
||||
const cvf::UByteArray* cellIsInWellStatuses,
|
||||
bool invalidCellsIsVisible,
|
||||
bool inactiveCellsIsVisible,
|
||||
bool activeCellsIsVisible,
|
||||
bool mainGridIsVisible);
|
||||
void computeRangeVisibility (RivCellSetEnum geometryType,
|
||||
cvf::UByteArray* cellVisibilities,
|
||||
const RigGridBase* grid,
|
||||
const cvf::UByteArray* nativeVisibility,
|
||||
const RimCellRangeFilterCollection* rangeFilterColl);
|
||||
static void computePropertyVisibility(cvf::UByteArray* cellVisibilities,
|
||||
const RigGridBase* grid,
|
||||
size_t timeStepIndex,
|
||||
const cvf::UByteArray* rangeFilterVisibility,
|
||||
RimEclipsePropertyFilterCollection* propFilterColl);
|
||||
void computeOverriddenCellVisibility(cvf::UByteArray* cellVisibility,
|
||||
const RigGridBase* grid);
|
||||
|
||||
|
||||
static void copyByteArray(cvf::UByteArray* dest, const cvf::UByteArray* source );
|
||||
|
||||
@@ -302,6 +302,14 @@ cvf::ref<RivIntersectionPartMgr> Rim2dIntersectionView::flatIntersectionPartMgr(
|
||||
return m_flatIntersectionPartMgr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool Rim2dIntersectionView::isGridVisualizationMode() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -71,6 +71,7 @@ public:
|
||||
protected:
|
||||
void updateLegends();
|
||||
|
||||
virtual bool isGridVisualizationMode() const override;
|
||||
virtual void axisLabels(cvf::String* xLabel, cvf::String* yLabel, cvf::String* zLabel) override;
|
||||
virtual void createDisplayModel() override;
|
||||
virtual void createPartCollectionFromSelection(cvf::Collection<cvf::Part>* parts) override;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaViewRedrawScheduler.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimCase.h"
|
||||
#include "RimGridView.h"
|
||||
#include "RimMainPlotCollection.h"
|
||||
#include "RimOilField.h"
|
||||
@@ -47,7 +47,6 @@
|
||||
#include "cvfTransform.h"
|
||||
#include "cvfViewport.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <climits>
|
||||
#include "cvfScene.h"
|
||||
|
||||
@@ -428,35 +427,12 @@ void Rim3dView::setupBeforeSave()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
// Surf: No Fault Surf
|
||||
// Mesh -------------
|
||||
// No F F G
|
||||
// Fault F F G
|
||||
// Mesh G G G
|
||||
//
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool Rim3dView::isGridVisualizationMode() const
|
||||
{
|
||||
return ( this->surfaceMode() == SURFACE
|
||||
|| this->meshMode() == FULL_MESH);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dView::setMeshOnlyDrawstyle()
|
||||
{
|
||||
if (isGridVisualizationMode())
|
||||
{
|
||||
meshMode.setValueWithFieldChanged(FULL_MESH);
|
||||
}
|
||||
else
|
||||
{
|
||||
meshMode.setValueWithFieldChanged(FAULTS_MESH);
|
||||
}
|
||||
|
||||
meshMode.setValueWithFieldChanged(FULL_MESH);
|
||||
surfaceMode.setValueWithFieldChanged(NO_SURFACE);
|
||||
}
|
||||
|
||||
@@ -465,16 +441,8 @@ void Rim3dView::setMeshOnlyDrawstyle()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dView::setMeshSurfDrawstyle()
|
||||
{
|
||||
if (isGridVisualizationMode())
|
||||
{
|
||||
surfaceMode.setValueWithFieldChanged(SURFACE);
|
||||
meshMode.setValueWithFieldChanged(FULL_MESH);
|
||||
}
|
||||
else
|
||||
{
|
||||
surfaceMode.setValueWithFieldChanged(FAULTS);
|
||||
meshMode.setValueWithFieldChanged(FAULTS_MESH);
|
||||
}
|
||||
surfaceMode.setValueWithFieldChanged(SURFACE);
|
||||
meshMode.setValueWithFieldChanged(FULL_MESH);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -482,20 +450,7 @@ void Rim3dView::setMeshSurfDrawstyle()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dView::setFaultMeshSurfDrawstyle()
|
||||
{
|
||||
// Surf: No Fault Surf
|
||||
// Mesh -------------
|
||||
// No FF FF SF
|
||||
// Fault FF FF SF
|
||||
// Mesh SF SF SF
|
||||
if (this->isGridVisualizationMode())
|
||||
{
|
||||
surfaceMode.setValueWithFieldChanged(SURFACE);
|
||||
}
|
||||
else
|
||||
{
|
||||
surfaceMode.setValueWithFieldChanged(FAULTS);
|
||||
}
|
||||
|
||||
surfaceMode.setValueWithFieldChanged(SURFACE);
|
||||
meshMode.setValueWithFieldChanged(FAULTS_MESH);
|
||||
}
|
||||
|
||||
@@ -504,15 +459,7 @@ void Rim3dView::setFaultMeshSurfDrawstyle()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dView::setSurfOnlyDrawstyle()
|
||||
{
|
||||
if (isGridVisualizationMode())
|
||||
{
|
||||
surfaceMode.setValueWithFieldChanged(SURFACE);
|
||||
}
|
||||
else
|
||||
{
|
||||
surfaceMode.setValueWithFieldChanged(FAULTS);
|
||||
}
|
||||
|
||||
surfaceMode.setValueWithFieldChanged(SURFACE);
|
||||
meshMode.setValueWithFieldChanged(NO_MESH);
|
||||
}
|
||||
|
||||
@@ -794,9 +741,20 @@ void Rim3dView::updateDisplayModelVisibility()
|
||||
const cvf::uint uintMeshSurfaceBit = meshSurfaceBit;
|
||||
const cvf::uint uintFaultBit = faultBit;
|
||||
const cvf::uint uintMeshFaultBit = meshFaultBit;
|
||||
const cvf::uint uintIntersectionCellFaceBit = intersectionCellFaceBit;
|
||||
const cvf::uint uintIntersectionCellMeshBit = intersectionCellMeshBit;
|
||||
const cvf::uint uintIntersectionFaultMeshBit = intersectionFaultMeshBit;
|
||||
|
||||
// Initialize the mask to show everything except the the bits controlled here
|
||||
unsigned int mask = 0xffffffff & ~uintSurfaceBit & ~uintFaultBit & ~uintMeshSurfaceBit & ~uintMeshFaultBit ;
|
||||
unsigned int mask =
|
||||
0xffffffff
|
||||
& ~uintSurfaceBit
|
||||
& ~uintFaultBit
|
||||
& ~uintMeshSurfaceBit
|
||||
& ~uintMeshFaultBit
|
||||
& ~intersectionCellFaceBit
|
||||
& ~intersectionCellMeshBit
|
||||
& ~intersectionFaultMeshBit;
|
||||
|
||||
// Then turn the appropriate bits on according to the user settings
|
||||
|
||||
@@ -804,20 +762,25 @@ void Rim3dView::updateDisplayModelVisibility()
|
||||
{
|
||||
mask |= uintSurfaceBit;
|
||||
mask |= uintFaultBit;
|
||||
mask |= intersectionCellFaceBit;
|
||||
}
|
||||
else if (surfaceMode == FAULTS)
|
||||
{
|
||||
mask |= uintFaultBit;
|
||||
mask |= intersectionCellFaceBit;
|
||||
}
|
||||
|
||||
if (meshMode == FULL_MESH)
|
||||
{
|
||||
mask |= uintMeshSurfaceBit;
|
||||
mask |= uintMeshFaultBit;
|
||||
mask |= intersectionCellMeshBit;
|
||||
mask |= intersectionFaultMeshBit;
|
||||
}
|
||||
else if (meshMode == FAULTS_MESH)
|
||||
{
|
||||
mask |= uintMeshFaultBit;
|
||||
mask |= intersectionFaultMeshBit;
|
||||
}
|
||||
|
||||
m_viewer->setEnableMask(mask);
|
||||
|
||||
@@ -16,43 +16,31 @@
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiuViewerToViewInterface.h"
|
||||
#include "RimViewWindow.h"
|
||||
|
||||
#include "RivCellSetEnum.h"
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmChildField.h"
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
#include "cafPdmFieldCvfColor.h"
|
||||
#include "cafPdmFieldCvfMat4d.h"
|
||||
#include "cafPdmFieldCvfVec3d.h"
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
#include "RivCellSetEnum.h"
|
||||
|
||||
#include "cvfArray.h"
|
||||
#include "cvfBase.h"
|
||||
#include "cvfCollection.h"
|
||||
#include "cvfObject.h"
|
||||
|
||||
#include <QPointer>
|
||||
|
||||
|
||||
class Rim3dOverlayInfoConfig;
|
||||
class RimCase;
|
||||
class RimCellRangeFilter;
|
||||
class RimCellRangeFilterCollection;
|
||||
class RimIntersectionCollection;
|
||||
class RimGridCollection;
|
||||
class RimPropertyFilterCollection;
|
||||
class RimViewController;
|
||||
class RimViewLinker;
|
||||
class RiuViewer;
|
||||
class RimWellPathCollection;
|
||||
class RivWellPathsPartMgr;
|
||||
class RimWellPath;
|
||||
|
||||
namespace cvf
|
||||
{
|
||||
@@ -72,10 +60,13 @@ namespace caf
|
||||
|
||||
enum PartRenderMaskEnum
|
||||
{
|
||||
surfaceBit = 0x00000001,
|
||||
meshSurfaceBit = 0x00000002,
|
||||
faultBit = 0x00000004,
|
||||
meshFaultBit = 0x00000008,
|
||||
surfaceBit = 1,
|
||||
meshSurfaceBit = 2,
|
||||
faultBit = 4,
|
||||
meshFaultBit = 8,
|
||||
intersectionCellFaceBit = 16,
|
||||
intersectionCellMeshBit = 32,
|
||||
intersectionFaultMeshBit = 64
|
||||
};
|
||||
|
||||
|
||||
@@ -117,7 +108,7 @@ public:
|
||||
void disableLighting(bool disable);
|
||||
bool isLightingDisabled() const;
|
||||
|
||||
bool isGridVisualizationMode() const;
|
||||
virtual bool isGridVisualizationMode() const = 0;
|
||||
|
||||
void setScaleZAndUpdate(double scaleZ);
|
||||
virtual bool showActiveCellsOnly();
|
||||
|
||||
@@ -399,7 +399,8 @@ void RimEclipseView::createDisplayModel()
|
||||
|
||||
|
||||
if (!this->eclipsePropertyFilterCollection()->hasActiveFilters()
|
||||
|| this->viewController() && this->viewController()->isVisibleCellsOveridden())
|
||||
|| ( this->viewController()
|
||||
&& this->viewController()->isVisibleCellsOveridden()) )
|
||||
{
|
||||
std::vector<RivCellSetEnum> geometryTypesToAdd;
|
||||
|
||||
@@ -452,28 +453,41 @@ void RimEclipseView::createDisplayModel()
|
||||
{
|
||||
for (size_t gtIdx = 0; gtIdx < geometryTypesToAdd.size(); ++gtIdx)
|
||||
{
|
||||
m_reservoirGridPartManager->appendStaticGeometryPartsToModel(frameModels[frameIdx].p(), geometryTypesToAdd[gtIdx], gridIndices);
|
||||
if ( isGridVisualizationMode() )
|
||||
{
|
||||
m_reservoirGridPartManager->appendStaticGeometryPartsToModel(frameModels[frameIdx].p(), geometryTypesToAdd[gtIdx], gridIndices);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_reservoirGridPartManager->ensureStaticGeometryPartsCreated( geometryTypesToAdd[gtIdx]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set static colors
|
||||
this->updateStaticCellColors();
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<RivCellSetEnum> empty;
|
||||
setVisibleGridParts(empty);
|
||||
}
|
||||
|
||||
m_reservoirGridPartManager->clearWatertightGeometryFlags();
|
||||
|
||||
if (faultCollection()->showFaultsOutsideFilters() || !this->eclipsePropertyFilterCollection()->hasActiveFilters() )
|
||||
if ( faultCollection()->showFaultCollection()
|
||||
|| !this->eclipsePropertyFilterCollection()->hasActiveFilters() )
|
||||
{
|
||||
setVisibleGridPartsWatertight();
|
||||
|
||||
std::set<RivCellSetEnum> faultGeometryTypesToAppend = allVisibleFaultGeometryTypes();
|
||||
RivCellSetEnum faultLabelType = m_reservoirGridPartManager->geometryTypeForFaultLabels(faultGeometryTypesToAppend, faultCollection()->showFaultsOutsideFilters());
|
||||
RivCellSetEnum faultLabelType = m_reservoirGridPartManager->geometryTypeForFaultLabels(faultGeometryTypesToAppend, faultCollection()->isShowingFaultsAndFaultsOutsideFilters());
|
||||
|
||||
for (size_t frameIdx = 0; frameIdx < frameModels.size(); ++frameIdx)
|
||||
{
|
||||
for (RivCellSetEnum geometryType : faultGeometryTypesToAppend)
|
||||
{
|
||||
if (geometryType == PROPERTY_FILTERED || geometryType == PROPERTY_FILTERED_WELL_CELLS) continue;
|
||||
|
||||
m_reservoirGridPartManager->appendFaultsStaticGeometryPartsToModel(frameModels[frameIdx].p(), geometryType);
|
||||
}
|
||||
|
||||
@@ -569,10 +583,18 @@ void RimEclipseView::updateCurrentTimeStep()
|
||||
this->indicesToVisibleGrids(&gridIndices);
|
||||
|
||||
geometriesToRecolor.push_back( PROPERTY_FILTERED);
|
||||
m_reservoirGridPartManager->appendDynamicGeometryPartsToModel(frameParts.p(), PROPERTY_FILTERED, m_currentTimeStep, gridIndices);
|
||||
|
||||
geometriesToRecolor.push_back( PROPERTY_FILTERED_WELL_CELLS);
|
||||
m_reservoirGridPartManager->appendDynamicGeometryPartsToModel(frameParts.p(), PROPERTY_FILTERED_WELL_CELLS, m_currentTimeStep, gridIndices);
|
||||
|
||||
if ( isGridVisualizationMode() )
|
||||
{
|
||||
m_reservoirGridPartManager->appendDynamicGeometryPartsToModel(frameParts.p(), PROPERTY_FILTERED, m_currentTimeStep, gridIndices);
|
||||
m_reservoirGridPartManager->appendDynamicGeometryPartsToModel(frameParts.p(), PROPERTY_FILTERED_WELL_CELLS, m_currentTimeStep, gridIndices);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_reservoirGridPartManager->ensureDynamicGeometryPartsCreated(PROPERTY_FILTERED, m_currentTimeStep);
|
||||
m_reservoirGridPartManager->ensureDynamicGeometryPartsCreated(PROPERTY_FILTERED_WELL_CELLS, m_currentTimeStep);
|
||||
}
|
||||
|
||||
setVisibleGridParts(geometriesToRecolor);
|
||||
setVisibleGridPartsWatertight();
|
||||
@@ -590,7 +612,7 @@ void RimEclipseView::updateCurrentTimeStep()
|
||||
}
|
||||
}
|
||||
|
||||
RivCellSetEnum faultLabelType = m_reservoirGridPartManager->geometryTypeForFaultLabels(faultGeometryTypesToAppend, faultCollection()->showFaultsOutsideFilters());
|
||||
RivCellSetEnum faultLabelType = m_reservoirGridPartManager->geometryTypeForFaultLabels(faultGeometryTypesToAppend, faultCollection()->isShowingFaultsAndFaultsOutsideFilters());
|
||||
if (faultLabelType == PROPERTY_FILTERED)
|
||||
{
|
||||
m_reservoirGridPartManager->appendFaultLabelsDynamicGeometryPartsToModel(frameParts.p(), faultLabelType, m_currentTimeStep);
|
||||
@@ -614,7 +636,7 @@ void RimEclipseView::updateCurrentTimeStep()
|
||||
{
|
||||
m_reservoirGridPartManager->appendStaticGeometryPartsToModel(frameParts.p(), RANGE_FILTERED_INACTIVE, gridIndices);
|
||||
|
||||
if (!faultCollection()->showFaultsOutsideFilters())
|
||||
if (!faultCollection()->isShowingFaultsAndFaultsOutsideFilters())
|
||||
{
|
||||
m_reservoirGridPartManager->appendFaultsStaticGeometryPartsToModel(frameParts.p(), RANGE_FILTERED_INACTIVE);
|
||||
}
|
||||
@@ -623,7 +645,7 @@ void RimEclipseView::updateCurrentTimeStep()
|
||||
{
|
||||
m_reservoirGridPartManager->appendStaticGeometryPartsToModel(frameParts.p(), INACTIVE, gridIndices);
|
||||
|
||||
if (!faultCollection()->showFaultsOutsideFilters())
|
||||
if (!faultCollection()->isShowingFaultsAndFaultsOutsideFilters())
|
||||
{
|
||||
m_reservoirGridPartManager->appendFaultsStaticGeometryPartsToModel(frameParts.p(), INACTIVE);
|
||||
}
|
||||
@@ -1475,7 +1497,7 @@ std::set<RivCellSetEnum> RimEclipseView::allVisibleFaultGeometryTypes() const
|
||||
std::set<RivCellSetEnum> faultGeoTypes;
|
||||
faultGeoTypes.insert(m_visibleGridParts.begin(), m_visibleGridParts.end());
|
||||
|
||||
if (faultCollection()->showFaultsOutsideFilters())
|
||||
if (faultCollection()->isShowingFaultsAndFaultsOutsideFilters())
|
||||
{
|
||||
faultGeoTypes.insert(ACTIVE);
|
||||
faultGeoTypes.insert(ALL_WELL_CELLS);
|
||||
|
||||
@@ -377,7 +377,7 @@ void RimFaultInViewCollection::defineUiOrdering(QString uiConfigName, caf::PdmUi
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimFaultInViewCollection::showFaultsOutsideFilters() const
|
||||
bool RimFaultInViewCollection::isShowingFaultsAndFaultsOutsideFilters() const
|
||||
{
|
||||
if (!showFaultCollection) return false;
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
|
||||
bool isGridVisualizationMode() const;
|
||||
|
||||
bool showFaultsOutsideFilters() const;
|
||||
bool isShowingFaultsAndFaultsOutsideFilters() const;
|
||||
|
||||
caf::PdmField<bool> showFaultFaces;
|
||||
caf::PdmField<bool> showOppositeFaultFaces;
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
#include "cvfModel.h"
|
||||
#include "cvfScene.h"
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
|
||||
CAF_PDM_XML_ABSTRACT_SOURCE_INIT(RimGridView, "GenericGridView"); // Do not use. Abstract class
|
||||
@@ -107,19 +108,14 @@ RimGridView::~RimGridView(void)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGridView::showGridCells(bool enableGridCells)
|
||||
{
|
||||
if (!enableGridCells)
|
||||
{
|
||||
m_previousGridModeMeshLinesWasFaults = meshMode() == FAULTS_MESH;
|
||||
if (surfaceMode() != NO_SURFACE) surfaceMode.setValueWithFieldChanged(FAULTS);
|
||||
if (meshMode() != NO_MESH) meshMode.setValueWithFieldChanged(FAULTS_MESH);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (surfaceMode() != NO_SURFACE) surfaceMode.setValueWithFieldChanged(SURFACE);
|
||||
if (meshMode() != NO_MESH) meshMode.setValueWithFieldChanged(m_previousGridModeMeshLinesWasFaults ? FAULTS_MESH : FULL_MESH);
|
||||
}
|
||||
|
||||
m_gridCollection->isActive = enableGridCells;
|
||||
|
||||
createDisplayModel();
|
||||
updateDisplayModelVisibility();
|
||||
RiuMainWindow::instance()->refreshDrawStyleActions();
|
||||
RiuMainWindow::instance()->refreshAnimationActions();
|
||||
|
||||
m_gridCollection->updateConnectedEditors();
|
||||
m_gridCollection->updateUiIconFromState(enableGridCells);
|
||||
}
|
||||
@@ -256,6 +252,14 @@ RimViewLinker* RimGridView::assosiatedViewLinker() const
|
||||
return viewLinker;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimGridView::isGridVisualizationMode() const
|
||||
{
|
||||
return this->m_gridCollection->isActive();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -20,6 +20,15 @@
|
||||
|
||||
#include "Rim3dView.h"
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfArray.h"
|
||||
|
||||
class Rim3dOverlayInfoConfig;
|
||||
class RimIntersectionCollection;
|
||||
class RimPropertyFilterCollection;
|
||||
class RimGridCollection;
|
||||
class RimCellRangeFilterCollection;
|
||||
|
||||
class RimGridView : public Rim3dView
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
@@ -46,6 +55,9 @@ public:
|
||||
RimViewController* viewController() const override;
|
||||
RimViewLinker* assosiatedViewLinker() const override;
|
||||
|
||||
|
||||
virtual bool isGridVisualizationMode() const override;
|
||||
|
||||
protected:
|
||||
|
||||
virtual void onTimeStepChanged() override;
|
||||
|
||||
Reference in New Issue
Block a user