mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#266) Expand bounding box to get some space between model and grid box
This commit is contained in:
parent
401cfe81a1
commit
d9044e2e7b
@ -65,7 +65,25 @@ void RivGridBoxGenerator::setDisplayModelOffset(cvf::Vec3d offset)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivGridBoxGenerator::setGridBoxDomainCoordBoundingBox(const cvf::BoundingBox& bb)
|
||||
{
|
||||
m_domainCoordsBoundingBox = bb;
|
||||
cvf::BoundingBox expandedBB;
|
||||
{
|
||||
double expandFactor = 0.05;
|
||||
|
||||
cvf::Vec3d expandedMin;
|
||||
expandedMin.x() = bb.min().x() - bb.extent().x() * expandFactor;
|
||||
expandedMin.y() = bb.min().y() - bb.extent().y() * expandFactor;
|
||||
expandedMin.z() = bb.min().z() - bb.extent().z() * expandFactor;
|
||||
|
||||
cvf::Vec3d expandedMax;
|
||||
expandedMax.x() = bb.max().x() + bb.extent().x() * expandFactor;
|
||||
expandedMax.y() = bb.max().y() + bb.extent().y() * expandFactor;
|
||||
expandedMax.z() = bb.max().z() + bb.extent().z() * expandFactor;
|
||||
|
||||
expandedBB.add(expandedMin);
|
||||
expandedBB.add(expandedMax);
|
||||
}
|
||||
|
||||
m_domainCoordsBoundingBox = expandedBB;
|
||||
|
||||
m_domainCoordsXValues.clear();
|
||||
m_domainCoordsYValues.clear();
|
||||
|
Loading…
Reference in New Issue
Block a user