mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Avoid modifying x and y when computing z-value for well head pipe
p4#: 22153
This commit is contained in:
parent
5c5d53bcee
commit
7d3ca2fb25
@ -109,7 +109,7 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex)
|
|||||||
whStartPos.transformPoint(m_scaleTransform->worldTransform());
|
whStartPos.transformPoint(m_scaleTransform->worldTransform());
|
||||||
|
|
||||||
// Compute well head based on the z position of the top of the K column the well head is part of
|
// Compute well head based on the z position of the top of the K column the well head is part of
|
||||||
cvf::Vec3d whEndPos;
|
cvf::Vec3d whEndPos = whStartPos;
|
||||||
{
|
{
|
||||||
size_t i, j, k;
|
size_t i, j, k;
|
||||||
rigReservoir->mainGrid()->ijkFromCellIndex(whCell.mainGridCellIndex(), &i, &j, &k);
|
rigReservoir->mainGrid()->ijkFromCellIndex(whCell.mainGridCellIndex(), &i, &j, &k);
|
||||||
@ -117,9 +117,11 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex)
|
|||||||
|
|
||||||
const RigCell& topCell = rigReservoir->mainGrid()->cell(topCellIndex);
|
const RigCell& topCell = rigReservoir->mainGrid()->cell(topCellIndex);
|
||||||
|
|
||||||
whEndPos = topCell.faceCenter(cvf::StructGridInterface::NEG_K);
|
cvf::Vec3d topCellPos = topCell.faceCenter(cvf::StructGridInterface::NEG_K);
|
||||||
whEndPos -= rigReservoir->mainGrid()->displayModelOffset();
|
topCellPos -= rigReservoir->mainGrid()->displayModelOffset();
|
||||||
whEndPos.transformPoint(m_scaleTransform->worldTransform());
|
topCellPos.transformPoint(m_scaleTransform->worldTransform());
|
||||||
|
|
||||||
|
whEndPos.z() = topCellPos.z();
|
||||||
}
|
}
|
||||||
|
|
||||||
cvf::Vec3d arrowPosition = whEndPos;
|
cvf::Vec3d arrowPosition = whEndPos;
|
||||||
|
Loading…
Reference in New Issue
Block a user