#2483 Refactoring : Simplify generation of well branch geometry (1)

This commit is contained in:
Magne Sjaastad
2018-03-02 14:07:23 +01:00
parent e39105503b
commit 7bd0bdc612
6 changed files with 32 additions and 53 deletions
@@ -490,25 +490,12 @@ void RimIntersection::updateSimulationWellCenterline() const
{
if (isActive() && type == CS_SIMULATION_WELL && simulationWell())
{
if (m_simulationWellBranchCenterlines.size() == 0)
if (m_simulationWellBranchCenterlines.empty())
{
RimEclipseCase* rimEclCase = nullptr;
simulationWell->firstAncestorOrThisOfType(rimEclCase);
if (rimEclCase)
auto branches = simulationWell->wellPipeBranches();
for (const auto& branch : branches)
{
RimSimWellInViewCollection* simWellCollection = nullptr;
simulationWell->firstAncestorOrThisOfTypeAsserted(simWellCollection);
bool includeCellCenters = simulationWell->isUsingCellCenterForPipe();
bool detectBrances = simWellCollection->isAutoDetectingBranches;
RigEclipseCaseData* caseData = rimEclCase->eclipseCaseData();
auto branches = caseData->simulationWellBranches(simulationWell->name, includeCellCenters, detectBrances);
for (auto b : branches)
{
m_simulationWellBranchCenterlines.push_back(b->m_wellPathPoints);
}
m_simulationWellBranchCenterlines.push_back(branch->m_wellPathPoints);
}
}
}