mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Make sure fault geometry always is visible
The check for fault was removed in 4cf6a26083
This causes wrong visualization when a range filter is active and a fault is present along the filter.
There is some performance issues seen when profiling this code, needs more investigation.
This commit is contained in:
parent
e54c4f3c1e
commit
26a30ffa50
@ -550,15 +550,23 @@ bool RigGridCellFaceVisibilityFilter::isFaceVisible( size_t
|
||||
return true;
|
||||
}
|
||||
|
||||
size_t neighborCellIndex = m_grid->cellIndexFromIJK( ni, nj, nk );
|
||||
// Do not show cell geometry if a fault is present to avoid z fighting between surfaces
|
||||
// It will always be a better solution to avoid geometry creation instead of part priority and polygon offset
|
||||
size_t nativeResvCellIndex = m_grid->reservoirCellIndex( cellIndex );
|
||||
const RigFault* fault = m_grid->mainGrid()->findFaultFromCellIndexAndCellFace( nativeResvCellIndex, face );
|
||||
if ( fault )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t neighborCellIndex = m_grid->cellIndexFromIJK( ni, nj, nk );
|
||||
// If the neighbour cell is invisible, we need to draw the face
|
||||
if ( ( cellVisibility != nullptr ) && !( *cellVisibility )[neighborCellIndex] )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Do show the faces in the boarder between this grid and a possible LGR. Some of the LGR cells
|
||||
// Do show the faces in the border between this grid and a possible LGR. Some of the LGR cells
|
||||
// might not be visible.
|
||||
if ( m_grid->mainGrid()->gridCount() > 1 && m_grid->cell( neighborCellIndex ).subGrid() )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user