#3265 Use the first active cell as entry point reference.

This commit is contained in:
Gaute Lindkvist 2018-08-24 10:56:23 +02:00
parent 4dcbf6e918
commit 914f946110

View File

@ -1428,7 +1428,7 @@ RicMswExportInfo
const std::vector<RimWellPathFracture*>& fractures) const std::vector<RimWellPathFracture*>& fractures)
{ {
const RigMainGrid* grid = caseToApply->eclipseCaseData()->mainGrid(); const RigMainGrid* grid = caseToApply->eclipseCaseData()->mainGrid();
const RigActiveCellInfo* activeCellInfo = caseToApply->eclipseCaseData()->activeCellInfo(RiaDefines::MATRIX_MODEL);
RiaEclipseUnitTools::UnitSystem unitSystem = caseToApply->eclipseCaseData()->unitsType(); RiaEclipseUnitTools::UnitSystem unitSystem = caseToApply->eclipseCaseData()->unitsType();
const RigWellPath* wellPathGeometry = wellPath->wellPathGeometry(); const RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
@ -1444,9 +1444,16 @@ RicMswExportInfo
{ {
initialMD = wellPath->fractureCollection()->manualReferenceMD(); 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, RicMswExportInfo exportInfo(wellPath,