#1044 - pre-proto - Updating indexing for i j and k in SimWellFracture to follow Eclipse indexing (starting with 1) and updating depth of z position at wellpath for WellPathFractures to be displayed as positive

This commit is contained in:
astridkbjorke
2017-01-04 09:08:10 +01:00
parent a5e8001745
commit 6b58adb91b
9 changed files with 98 additions and 43 deletions

View File

@@ -23,6 +23,9 @@
#include "RimGeoMechView.h"
#include "RimWellPath.h"
#include "RivSimWellPipeSourceInfo.h"
#include "RivWellPathSourceInfo.h"
#include "RiuSelectionChangedHandler.h"
@@ -207,13 +210,12 @@ RiuGeoMechSelectionItem::RiuGeoMechSelectionItem(RimGeoMechView* view,
///
//--------------------------------------------------------------------------------------------------
RiuWellPathSelectionItem::RiuWellPathSelectionItem(const RivWellPathSourceInfo* wellPathSourceInfo,
const cvf::Vec3d& currentPickPositionInDomainCoords,
cvf::uint firstPartTriangleIndex)
: m_currentPickPositionInDomainCoords(currentPickPositionInDomainCoords),
m_wellpathSourceInfo(wellPathSourceInfo),
m_firstPartTriangleIndex(firstPartTriangleIndex)
const cvf::Vec3d& pipeCenterLineIntersectionInDomainCoords,
double measuredDepth)
: m_pipeCenterlineIntersectionInDomainCoords(pipeCenterLineIntersectionInDomainCoords),
m_measuredDepth(measuredDepth)
{
m_wellpath = wellPathSourceInfo->wellPath();
}
//--------------------------------------------------------------------------------------------------
@@ -223,10 +225,9 @@ RiuSimWellSelectionItem::RiuSimWellSelectionItem(const RivSimWellPipeSourceInfo*
size_t i,
size_t j,
size_t k)
: m_simwellSourceInfo(simwellSourceInfo),
i(i),
: i(i),
j(j),
k(k)
{
m_simWell = simwellSourceInfo->well();
}

View File

@@ -28,6 +28,7 @@
#include <vector>
#include <assert.h>
#include <array>
#include "RimEclipseWell.h"
// #include "RivWellPathSourceInfo.h"
// #include "RivWellPipeSourceInfo.h"
@@ -196,7 +197,7 @@ class RiuWellPathSelectionItem : public RiuSelectionItem
public:
explicit RiuWellPathSelectionItem(const RivWellPathSourceInfo* wellPathSourceInfo,
const cvf::Vec3d& currentPickPositionInDomainCoords,
cvf::uint firstPartTriangleIndex);
double measuredDepth);
virtual ~RiuWellPathSelectionItem() {};
@@ -206,9 +207,9 @@ public:
}
public:
const RivWellPathSourceInfo* m_wellpathSourceInfo;
cvf::Vec3d m_currentPickPositionInDomainCoords;
cvf::uint m_firstPartTriangleIndex;
RimWellPath* m_wellpath;
cvf::Vec3d m_pipeCenterlineIntersectionInDomainCoords;
double m_measuredDepth;
};
@@ -233,8 +234,8 @@ public:
}
public:
caf::PdmPointer<RimEclipseView> m_view;
const RivSimWellPipeSourceInfo* m_simwellSourceInfo;
// const RivSimWellPipeSourceInfo* m_simwellSourceInfo;
RimEclipseWell* m_simWell;
size_t i;
size_t j;
size_t k;

View File

@@ -294,8 +294,11 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event)
if (wellPath)
{
RiuSelectionItem* selItem = new RiuWellPathSelectionItem(wellPathSourceInfo, m_currentPickPositionInDomainCoords, firstPartTriangleIndex);
double measuredDepth = wellPathSourceInfo->measuredDepth(firstPartTriangleIndex, m_currentPickPositionInDomainCoords);
cvf::Vec3d trueVerticalDepth = wellPathSourceInfo->trueVerticalDepth(firstPartTriangleIndex, globalIntersectionPoint);
RiuSelectionItem* selItem = new RiuWellPathSelectionItem(wellPathSourceInfo, trueVerticalDepth, measuredDepth);
RiuSelectionManager::instance()->setSelectedItem(selItem, RiuSelectionManager::RUI_TEMPORARY);
commandIds << "RicNewWellPathFractureAtPosFeature";
@@ -316,14 +319,23 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event)
caf::SelectionManager::instance()->setSelectedItem(well);
commandIds << "RicNewSimWellIntersectionFeature";
size_t gridIndex = cvf::UNDEFINED_SIZE_T;
size_t gridCellIndex = cvf::UNDEFINED_SIZE_T;
eclipseWellSourceInfo->findGridIndexAndCellIndex(firstPartTriangleIndex, &gridIndex, &gridCellIndex);
if (gridIndex != cvf::UNDEFINED_SIZE_T && gridCellIndex != cvf::UNDEFINED_SIZE_T)
{
size_t i = 0;
size_t j = 0;
size_t k = 0;
ijkFromCellIndex(gridIndex, gridCellIndex, &i, &j, &k);
RiuSelectionItem* selItem = new RiuSimWellSelectionItem(eclipseWellSourceInfo, i, j, k);
RiuSelectionManager::instance()->setSelectedItem(selItem, RiuSelectionManager::RUI_TEMPORARY);
commandIds << "RicNewSimWellFractureAtPosFeature";
}
}
}