mirror of
https://github.com/OPM/ResInsight.git
synced 2026-08-26 21:27:15 -05:00
#14596 Skip computing corner coordinates for cells excluded by the K filter
Move the call to cellCornerVertices below the K filter early out, so the corner coordinates are only computed for the cells that are actually tested against the polygon.
This commit is contained in:
@@ -486,14 +486,14 @@ void RimPolygonFilter::updateCellsDepthEclipse( const std::vector<cvf::Vec3d>& p
|
||||
RigCell cell = grid->cell( n );
|
||||
if ( cell.isInvalid() ) continue;
|
||||
|
||||
// get corner coordinates
|
||||
std::array<cvf::Vec3d, 8> hexCorners = grid->cellCornerVertices( n );
|
||||
|
||||
// get cell ijk for k filter
|
||||
size_t i, j, k;
|
||||
grid->ijkFromCellIndex( n, &i, &j, &k );
|
||||
if ( !m_intervalTool.isNumberIncluded( k ) ) continue;
|
||||
|
||||
// get corner coordinates
|
||||
std::array<cvf::Vec3d, 8> hexCorners = grid->cellCornerVertices( n );
|
||||
|
||||
// check if the polygon includes the cell
|
||||
if ( cellInsidePolygon2D( cell.center(), hexCorners, points ) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user