mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4033 Fix glitch with large padding for GeoMech
* Off by one error in distance transform * Need a larger bounding box to allow for full padding.
This commit is contained in:
@@ -49,7 +49,7 @@ void RiaImageTools::distanceTransform2d(std::vector<std::vector<unsigned int>>&
|
|||||||
g[x][y] = 1 + g[x][y - 1];
|
g[x][y] = 1 + g[x][y - 1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int64_t y = N - 2; y > 0; --y)
|
for (int64_t y = N - 2; y >= 0; --y)
|
||||||
{
|
{
|
||||||
if (g[x][y + 1] < g[x][y])
|
if (g[x][y + 1] < g[x][y])
|
||||||
{
|
{
|
||||||
@@ -100,7 +100,7 @@ void RiaImageTools::distanceTransform2d(std::vector<std::vector<unsigned int>>&
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int64_t u = M - 1; u > 0; --u)
|
for (int64_t u = M - 1; u >= 0; --u)
|
||||||
{
|
{
|
||||||
int64_t fVal = f(u, s[q], g, y);
|
int64_t fVal = f(u, s[q], g, y);
|
||||||
CVF_ASSERT(fVal <= std::numeric_limits<double>::max());
|
CVF_ASSERT(fVal <= std::numeric_limits<double>::max());
|
||||||
|
|||||||
@@ -162,11 +162,11 @@ cvf::BoundingBox RimGeoMechContourMapProjection::calculateExpandedPorBarBBox(int
|
|||||||
cvf::Vec3d boxMin = boundingBox.min();
|
cvf::Vec3d boxMin = boundingBox.min();
|
||||||
cvf::Vec3d boxMax = boundingBox.max();
|
cvf::Vec3d boxMax = boundingBox.max();
|
||||||
cvf::Vec3d boxExtent = boundingBox.extent();
|
cvf::Vec3d boxExtent = boundingBox.extent();
|
||||||
boxMin.x() -= boxExtent.x() * 0.5;
|
boxMin.x() -= boxExtent.x() * 0.5 * m_paddingAroundPorePressureRegion();
|
||||||
boxMin.y() -= boxExtent.y() * 0.5;
|
boxMin.y() -= boxExtent.y() * 0.5 * m_paddingAroundPorePressureRegion();
|
||||||
boxMin.z() -= geoMechCase()->characteristicCellSize();
|
boxMin.z() -= geoMechCase()->characteristicCellSize();
|
||||||
boxMax.x() += boxExtent.x() * 0.5;
|
boxMax.x() += boxExtent.x() * 0.5 * m_paddingAroundPorePressureRegion();
|
||||||
boxMax.y() += boxExtent.y() * 0.5;
|
boxMax.y() += boxExtent.y() * 0.5 * m_paddingAroundPorePressureRegion();
|
||||||
boxMax.z() += geoMechCase()->characteristicCellSize();
|
boxMax.z() += geoMechCase()->characteristicCellSize();
|
||||||
return cvf::BoundingBox(boxMin, boxMax);
|
return cvf::BoundingBox(boxMin, boxMax);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user