mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
2d Maps: Fix bug when there's no range filters active
This commit is contained in:
@@ -79,17 +79,17 @@ void Riv2dGridProjectionPartMgr::removeTrianglesWithNoResult(cvf::UIntArray* ver
|
||||
|
||||
for (size_t n = 0; n < vertices->size(); n += 3)
|
||||
{
|
||||
bool anyInvalid = false;
|
||||
for (size_t t = 0; !anyInvalid && t < 3; ++t)
|
||||
bool anyValid = false;
|
||||
for (size_t t = 0; !anyValid && t < 3; ++t)
|
||||
{
|
||||
cvf::uint vertexNumber = (*vertices)[n + t];
|
||||
cvf::Vec2ui ij = m_2dGridProjection->ijFromGridIndex(vertexNumber);
|
||||
if (!m_2dGridProjection->hasResultAt(ij.x(), ij.y()))
|
||||
if (m_2dGridProjection->hasResultAt(ij.x(), ij.y()))
|
||||
{
|
||||
anyInvalid = true;
|
||||
anyValid = true;
|
||||
}
|
||||
}
|
||||
for (size_t t = 0; !anyInvalid && t < 3; ++t)
|
||||
for (size_t t = 0; anyValid && t < 3; ++t)
|
||||
{
|
||||
cvf::uint vertexNumber = (*vertices)[n + t];
|
||||
trianglesWithResult.push_back(vertexNumber);
|
||||
|
||||
@@ -312,8 +312,13 @@ std::vector<std::pair<size_t, float>> Rim2dGridProjection::visibleCellsAndWeight
|
||||
|
||||
std::vector<RimCellRangeFilterCollection*> rangeFilterCollections;
|
||||
view->descendantsIncludingThisOfType(rangeFilterCollections);
|
||||
|
||||
bool hasActiveFilters = rangeFilterCollections.front()->hasActiveFilters();
|
||||
cvf::CellRangeFilter cellRangeFilter;
|
||||
rangeFilterCollections.front()->compoundCellRangeFilter(&cellRangeFilter, mainGrid()->gridIndex());
|
||||
if (hasActiveFilters)
|
||||
{
|
||||
rangeFilterCollections.front()->compoundCellRangeFilter(&cellRangeFilter, mainGrid()->gridIndex());
|
||||
}
|
||||
|
||||
const RigActiveCellInfo* activeCellInfo = eclipseCase()->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL);
|
||||
|
||||
@@ -338,7 +343,7 @@ std::vector<std::pair<size_t, float>> Rim2dGridProjection::visibleCellsAndWeight
|
||||
RigGridBase* localGrid = mainGrid()->gridAndGridLocalIdxFromGlobalCellIdx(globalCellIdx, &localCellIdx);
|
||||
size_t i, j, k;
|
||||
localGrid->ijkFromCellIndex(localCellIdx, &i, &j, &k);
|
||||
if (cellRangeFilter.isCellVisible(i, j, k, !localGrid->isMainGrid()))
|
||||
if (!hasActiveFilters || cellRangeFilter.isCellVisible(i, j, k, !localGrid->isMainGrid()))
|
||||
{
|
||||
localGrid->cellCornerVertices(localCellIdx, hexCorners);
|
||||
std::vector<HexIntersectionInfo> intersections;
|
||||
|
||||
Reference in New Issue
Block a user