#254 Avoid creation of cell face geometry if a fault is present at the face

This commit is contained in:
Magne Sjaastad 2016-08-01 21:51:05 +02:00
parent 5090eddf44
commit c3328003d0

View File

@ -484,6 +484,15 @@ bool RigGridCellFaceVisibilityFilter::isFaceVisible(size_t i, size_t j, size_t k
return true;
}
// 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;
}
// If the neighbour cell is invisible, we need to draw the face
if ((cellVisibility != NULL) && !(*cellVisibility)[neighborCellIndex])
{