mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3685 Well Path Creation: Set MDRKB at first target when starting from an existing wellpath
This commit is contained in:
@@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "RiuViewerCommands.h"
|
#include "RiuViewerCommands.h"
|
||||||
|
#include "RimModeledWellPath.h"
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -83,8 +84,10 @@ bool RicCreateWellTargetsPickEventHandler::handlePickEvent(const Ric3DPickEvent&
|
|||||||
auto wellPathSourceInfo = dynamic_cast<const RivWellPathSourceInfo*>(firstPickItem.sourceInfo());
|
auto wellPathSourceInfo = dynamic_cast<const RivWellPathSourceInfo*>(firstPickItem.sourceInfo());
|
||||||
|
|
||||||
auto intersectionPointInDomain = rimView->displayCoordTransform()->transformToDomainCoord(firstPickItem.globalPickedPoint());
|
auto intersectionPointInDomain = rimView->displayCoordTransform()->transformToDomainCoord(firstPickItem.globalPickedPoint());
|
||||||
bool doSetAzimuthAndInclination;
|
bool doSetAzimuthAndInclination = false;
|
||||||
double azimuth = 0.0, inclination = 0.0;
|
double azimuth = 0.0;
|
||||||
|
double inclination = 0.0;
|
||||||
|
|
||||||
if (wellPathSourceInfo)
|
if (wellPathSourceInfo)
|
||||||
{
|
{
|
||||||
targetPointInDomain = wellPathSourceInfo->closestPointOnCenterLine(firstPickItem.faceIdx(), intersectionPointInDomain);
|
targetPointInDomain = wellPathSourceInfo->closestPointOnCenterLine(firstPickItem.faceIdx(), intersectionPointInDomain);
|
||||||
@@ -101,7 +104,21 @@ bool RicCreateWellTargetsPickEventHandler::handlePickEvent(const Ric3DPickEvent&
|
|||||||
if (!m_geometryToAddTargetsTo->firstActiveTarget())
|
if (!m_geometryToAddTargetsTo->firstActiveTarget())
|
||||||
{
|
{
|
||||||
m_geometryToAddTargetsTo->setReferencePointXyz(targetPointInDomain);
|
m_geometryToAddTargetsTo->setReferencePointXyz(targetPointInDomain);
|
||||||
|
|
||||||
|
if (wellPathSourceInfo)
|
||||||
|
{
|
||||||
|
double mdrkbAtFirstTarget = wellPathSourceInfo->measuredDepth(firstPickItem.faceIdx(), intersectionPointInDomain);
|
||||||
|
|
||||||
|
RimModeledWellPath* modeledWellPath = dynamic_cast<RimModeledWellPath*>(wellPathSourceInfo->wellPath());
|
||||||
|
if (modeledWellPath)
|
||||||
|
{
|
||||||
|
mdrkbAtFirstTarget += modeledWellPath->geometryDefinition()->mdrkbAtFirstTarget();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_geometryToAddTargetsTo->setMdrkbAtFirstTarget(mdrkbAtFirstTarget);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cvf::Vec3d referencePoint = m_geometryToAddTargetsTo->referencePointXyz();
|
cvf::Vec3d referencePoint = m_geometryToAddTargetsTo->referencePointXyz();
|
||||||
cvf::Vec3d relativeTagetPoint = targetPointInDomain - referencePoint;
|
cvf::Vec3d relativeTagetPoint = targetPointInDomain - referencePoint;
|
||||||
|
|
||||||
|
|||||||
@@ -133,6 +133,14 @@ double RimWellPathGeometryDef::mdrkbAtFirstTarget() const
|
|||||||
return m_mdrkbAtFirstTarget;
|
return m_mdrkbAtFirstTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimWellPathGeometryDef::setMdrkbAtFirstTarget(double mdrkb)
|
||||||
|
{
|
||||||
|
m_mdrkbAtFirstTarget = mdrkb;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ public:
|
|||||||
void setReferencePointXyz(const cvf::Vec3d& refPointXyz );
|
void setReferencePointXyz(const cvf::Vec3d& refPointXyz );
|
||||||
|
|
||||||
double mdrkbAtFirstTarget() const;
|
double mdrkbAtFirstTarget() const;
|
||||||
|
void setMdrkbAtFirstTarget(double mdrkb);
|
||||||
|
|
||||||
cvf::ref<RigWellPath> createWellPathGeometry();
|
cvf::ref<RigWellPath> createWellPathGeometry();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user