mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2634 Fix wrong MD when context menu creating completions in 2D intersectino View
This commit is contained in:
@@ -587,14 +587,6 @@ void RivWellPathPartMgr::clearAllBranchData()
|
||||
m_wellLabelPart = nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RivWellPathPartMgr::segmentIndexFromTriangleIndex(size_t triangleIndex)
|
||||
{
|
||||
return m_pipeGeomGenerator->segmentIndexFromTriangleIndex(triangleIndex);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -83,8 +83,6 @@ public:
|
||||
|
||||
void appendStaticFracturePartsToModel(cvf::ModelBasicList* model);
|
||||
|
||||
size_t segmentIndexFromTriangleIndex(size_t triangleIndex);
|
||||
|
||||
private:
|
||||
void appendFishboneSubsPartsToModel(cvf::ModelBasicList* model,
|
||||
const caf::DisplayCoordTransform* displayCoordTransform,
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#include "RimCase.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "Rim3dView.h"
|
||||
#include "RivPipeGeometryGenerator.h"
|
||||
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "RivWellPathPartMgr.h"
|
||||
@@ -33,10 +35,19 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivWellPathSourceInfo::RivWellPathSourceInfo(RimWellPath* wellPath, Rim3dView* view)
|
||||
RivWellPathSourceInfo::RivWellPathSourceInfo(RimWellPath* wellPath, RivPipeGeometryGenerator* pipeGeomGenerator)
|
||||
: m_wellPath(wellPath)
|
||||
, m_pipeGeomGenerator(pipeGeomGenerator)
|
||||
{
|
||||
m_wellPath = wellPath;
|
||||
m_view = view;
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivWellPathSourceInfo::~RivWellPathSourceInfo()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -66,7 +77,7 @@ double RivWellPathSourceInfo::measuredDepth(size_t triangleIndex, const cvf::Vec
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Vec3d RivWellPathSourceInfo::trueVerticalDepth(size_t triangleIndex, const cvf::Vec3d& globalIntersection) const
|
||||
cvf::Vec3d RivWellPathSourceInfo::closestPointOnCenterLine(size_t triangleIndex, const cvf::Vec3d& globalIntersection) const
|
||||
{
|
||||
size_t firstSegmentIndex = cvf::UNDEFINED_SIZE_T;
|
||||
double norm = 0.0;
|
||||
@@ -105,6 +116,6 @@ void RivWellPathSourceInfo::normalizedIntersection(size_t triangleIndex, const c
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RivWellPathSourceInfo::segmentIndex(size_t triangleIndex) const
|
||||
{
|
||||
return m_view->wellPathSegmentIndexFromTriangleIndex(triangleIndex, m_wellPath);
|
||||
return m_pipeGeomGenerator->segmentIndexFromTriangleIndex( triangleIndex);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "cvfVector3.h"
|
||||
|
||||
class RimWellPath;
|
||||
class Rim3dView;
|
||||
class RivPipeGeometryGenerator;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@@ -34,19 +34,22 @@ class Rim3dView;
|
||||
class RivWellPathSourceInfo : public cvf::Object
|
||||
{
|
||||
public:
|
||||
explicit RivWellPathSourceInfo(RimWellPath* wellPath, Rim3dView* view);
|
||||
explicit RivWellPathSourceInfo(RimWellPath* wellPath, RivPipeGeometryGenerator* pipeGeomGenerator);
|
||||
~RivWellPathSourceInfo();
|
||||
|
||||
RimWellPath* wellPath() const;
|
||||
|
||||
size_t segmentIndex(size_t triangleIndex) const;
|
||||
double measuredDepth(size_t triangleIndex, const cvf::Vec3d& globalIntersection) const;
|
||||
cvf::Vec3d trueVerticalDepth(size_t triangleIndex, const cvf::Vec3d& globalIntersection) const;
|
||||
cvf::Vec3d closestPointOnCenterLine(size_t triangleIndex, const cvf::Vec3d& globalIntersection) const;
|
||||
|
||||
private:
|
||||
void normalizedIntersection(size_t triangleIndex, const cvf::Vec3d& globalIntersection,
|
||||
size_t* firstSegmentIndex, double* normalizedSegmentIntersection) const;
|
||||
void normalizedIntersection(size_t triangleIndex,
|
||||
const cvf::Vec3d& globalIntersection,
|
||||
size_t* firstSegmentIndex,
|
||||
double* normalizedSegmentIntersection) const;
|
||||
|
||||
private:
|
||||
caf::PdmPointer<RimWellPath> m_wellPath;
|
||||
caf::PdmPointer<Rim3dView> m_view;
|
||||
cvf::ref<RivPipeGeometryGenerator> m_pipeGeomGenerator;
|
||||
};
|
||||
|
||||
@@ -93,17 +93,6 @@ void RivWellPathsPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicList*
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RivWellPathsPartMgr::segmentIndexFromTriangleIndex(size_t triangleIndex, RimWellPath* wellPath) const
|
||||
{
|
||||
auto it = m_mapFromViewToIndex.find(wellPath);
|
||||
if (it == m_mapFromViewToIndex.end()) return -1;
|
||||
|
||||
return it->second->segmentIndexFromTriangleIndex(triangleIndex);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -68,8 +68,6 @@ public:
|
||||
|
||||
void appendStaticFracturePartsToModel(cvf::ModelBasicList* model);
|
||||
|
||||
size_t segmentIndexFromTriangleIndex(size_t triangleIndex, RimWellPath* wellPath) const;
|
||||
|
||||
private:
|
||||
void clearGeometryCache();
|
||||
void scheduleGeometryRegen();
|
||||
|
||||
Reference in New Issue
Block a user