#2127 Sim Well Branches : Use geometry cache from Intersection

This commit is contained in:
Magne Sjaastad 2017-12-08 12:22:35 +01:00
parent d3d2ccea20
commit 186e050a41

View File

@ -21,10 +21,11 @@
#include "RiaApplication.h"
#include "RigSimulationWellCenterLineCalculator.h"
#include "RigEclipseCaseData.h"
#include "RigWellPath.h"
#include "RimCase.h"
#include "RimEclipseCase.h"
#include "RimEclipseView.h"
#include "RimOilField.h"
#include "RimProject.h"
@ -470,9 +471,21 @@ void RimIntersection::updateWellCenterline() const
{
if (m_wellBranchCenterlines.size() == 0)
{
std::vector< std::vector <RigWellResultPoint> > pipeBranchesCellIds;
RimEclipseCase* rimEclCase = nullptr;
simulationWell->firstAncestorOrThisOfType(rimEclCase);
if (rimEclCase)
{
bool includeCellCenters = false;
bool detectBrances = true;
simulationWell->calculateWellPipeStaticCenterLine(m_wellBranchCenterlines, pipeBranchesCellIds);
RigEclipseCaseData* caseData = rimEclCase->eclipseCaseData();
auto branches = caseData->simulationWellBranches(simulationWell->name, includeCellCenters, detectBrances);
for (auto b : branches)
{
m_wellBranchCenterlines.push_back(b->m_wellPathPoints);
}
}
}
}
else