From 914f946110844339280a013487b74f843382b8b8 Mon Sep 17 00:00:00 2001 From: Gaute Lindkvist Date: Fri, 24 Aug 2018 10:56:23 +0200 Subject: [PATCH] #3265 Use the first active cell as entry point reference. --- .../RicWellPathExportCompletionDataFeatureImpl.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ApplicationCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeatureImpl.cpp b/ApplicationCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeatureImpl.cpp index 6a5e4f00d7..13549750fd 100644 --- a/ApplicationCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeatureImpl.cpp +++ b/ApplicationCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeatureImpl.cpp @@ -1428,7 +1428,7 @@ RicMswExportInfo const std::vector& fractures) { const RigMainGrid* grid = caseToApply->eclipseCaseData()->mainGrid(); - + const RigActiveCellInfo* activeCellInfo = caseToApply->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL); RiaEclipseUnitTools::UnitSystem unitSystem = caseToApply->eclipseCaseData()->unitsType(); const RigWellPath* wellPathGeometry = wellPath->wellPathGeometry(); @@ -1444,9 +1444,16 @@ RicMswExportInfo { initialMD = wellPath->fractureCollection()->manualReferenceMD(); } - else if (!intersections.empty()) + else { - initialMD = intersections.front().startMD; + for (WellPathCellIntersectionInfo intersection : intersections) + { + if (activeCellInfo->isActive(intersection.globCellIndex)) + { + initialMD = intersection.startMD; + break; + } + } } RicMswExportInfo exportInfo(wellPath,