#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

@@ -132,7 +132,7 @@ void RivSimWellPipesPartMgr::buildWellPipeParts(const caf::DisplayCoordTransform
if (!this->viewWithSettings()) return;
m_wellBranches.clear();
m_flattenedBranchWellHeadOffsets.clear();
m_pipeBranchesCLCoords.clear();
std::vector< std::vector <RigWellResultPoint> > pipeBranchesCellIds;
@@ -177,6 +177,8 @@ void RivSimWellPipesPartMgr::buildWellPipeParts(const caf::DisplayCoordTransform
cvfCoords->assign(m_pipeBranchesCLCoords[brIdx]);
flattenedStartOffset.z() = m_pipeBranchesCLCoords[brIdx][0].z();
m_flattenedBranchWellHeadOffsets.push_back(flattenedStartOffset.x());
if (doFlatten)
{
@@ -398,3 +400,11 @@ void RivSimWellPipesPartMgr::updatePipeResultColor(size_t frameIndex)
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<double> RivSimWellPipesPartMgr::flattenedBranchWellHeadOffsets()
{
return m_flattenedBranchWellHeadOffsets;
}

View File

@@ -62,6 +62,8 @@ public:
void updatePipeResultColor(size_t frameIndex);
std::vector<double> flattenedBranchWellHeadOffsets();
private:
Rim3dView* viewWithSettings();
void buildWellPipeParts(const caf::DisplayCoordTransform* displayXf,
@@ -87,4 +89,5 @@ private:
std::list<RivPipeBranchData> m_wellBranches;
std::vector< std::vector <cvf::Vec3d> > m_pipeBranchesCLCoords;
std::vector<double> m_flattenedBranchWellHeadOffsets;
};

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());

View File

@@ -50,14 +50,16 @@ public:
const caf::DisplayCoordTransform * displayXf);
void appendFlattenedDynamicGeometryPartsToModel(cvf::ModelBasicList* model,
size_t frameIndex,
const caf::DisplayCoordTransform * displayXf);
const caf::DisplayCoordTransform * displayXf,
double xOffset);
private:
void buildWellHeadParts(size_t frameIndex,
const caf::DisplayCoordTransform * displayXf,
bool doFlatten);
bool doFlatten,
double xOffset);
void clearAllGeometry();
Rim3dView* viewWithSettings();
RimSimWellInViewCollection* simWellInViewCollection();