#2552 Simulation well heads for branches in 2d intersection view

This commit is contained in:
Jacob Støren
2018-03-14 17:21:09 +01:00
parent a41ca4688e
commit 4ac0a6354c
5 changed files with 34 additions and 12 deletions

View File

@@ -75,7 +75,8 @@ RivWellHeadPartMgr::~RivWellHeadPartMgr()
//--------------------------------------------------------------------------------------------------
void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex,
const caf::DisplayCoordTransform * displayXf,
bool doFlatten)
bool doFlatten,
double xOffset)
{
clearAllGeometry();
@@ -92,9 +93,9 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex,
if (doFlatten)
{
whEndPos.x() = 0.0;
whEndPos.x() = xOffset;
whEndPos.y() = 0.0;
whStartPos.x() = 0.0;
whStartPos.x() = xOffset;
whStartPos.y() = 0.0;
whEndPos = displayXf->scaleToDisplaySize(whEndPos);
whStartPos = displayXf->scaleToDisplaySize(whStartPos);
@@ -347,7 +348,7 @@ void RivWellHeadPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicList*
if (!m_rimWell->isWellPipeVisible(frameIndex)) return;
buildWellHeadParts(frameIndex, displayXf, false);
buildWellHeadParts(frameIndex, displayXf, false, 0.0);
// Always add pipe part of well head
if (m_wellHeadPipeCenterPart.notNull()) model->addPart(m_wellHeadPipeCenterPart.p());
@@ -371,14 +372,15 @@ void RivWellHeadPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicList*
//--------------------------------------------------------------------------------------------------
void RivWellHeadPartMgr::appendFlattenedDynamicGeometryPartsToModel(cvf::ModelBasicList* model,
size_t frameIndex,
const caf::DisplayCoordTransform * displayXf)
const caf::DisplayCoordTransform * displayXf,
double xOffset)
{
if (m_rimWell.isNull()) return;
if (!viewWithSettings()) return;
if (!m_rimWell->isWellPipeVisible(frameIndex)) return;
buildWellHeadParts(frameIndex, displayXf, true);
buildWellHeadParts(frameIndex, displayXf, true, xOffset);
// Always add pipe part of well head
if (m_wellHeadPipeCenterPart.notNull()) model->addPart(m_wellHeadPipeCenterPart.p());