mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2431 : Use well path part manager in Rim3dView
This commit is contained in:
@@ -105,8 +105,6 @@ void RivWellPathSourceInfo::normalizedIntersection(size_t triangleIndex, const c
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RivWellPathSourceInfo::segmentIndex(size_t triangleIndex) const
|
||||
{
|
||||
return -1;
|
||||
|
||||
//return m_view->wellPathSegmentIndexFromTriangleIndex(triangleIndex, m_wellPath);
|
||||
return m_view->wellPathSegmentIndexFromTriangleIndex(triangleIndex, m_wellPath);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,6 @@ void RivWellPathsPartMgr::appendStaticGeometryPartsToModel(cvf::ModelBasicList*
|
||||
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
void RivWellPathsPartMgr::appendStaticFracturePartsToModel(cvf::ModelBasicList* model, const Rim3dView* rimView)
|
||||
{
|
||||
/*
|
||||
// Display of fractures is not supported in geomech view
|
||||
const RimEclipseView* eclView = dynamic_cast<const RimEclipseView*>(rimView);
|
||||
if (!eclView) return;
|
||||
@@ -79,7 +78,6 @@ void RivWellPathsPartMgr::appendStaticFracturePartsToModel(cvf::ModelBasicList*
|
||||
{
|
||||
partMgr->appendStaticFracturePartsToModel(model, eclView);
|
||||
}
|
||||
*/
|
||||
}
|
||||
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
|
||||
@@ -135,7 +133,6 @@ void RivWellPathsPartMgr::scheduleGeometryRegen() {}
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivWellPathsPartMgr::buildPartManagers()
|
||||
{
|
||||
/*
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
auto wellPaths = proj->allWellPaths();
|
||||
|
||||
@@ -150,7 +147,6 @@ void RivWellPathsPartMgr::buildPartManagers()
|
||||
m_mapFromViewToIndex[wellPath] = wppm;
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
#include "RimViewLinker.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "RivWellPathsPartMgr.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "RiuViewer.h"
|
||||
#include "RiuTimeStepChangedHandler.h"
|
||||
@@ -126,6 +128,8 @@ Rim3dView::Rim3dView(void)
|
||||
m_wellPathPipeVizModel = new cvf::ModelBasicList;
|
||||
m_wellPathPipeVizModel->setName("WellPathPipeModel");
|
||||
|
||||
m_wellPathsPartManager = new RivWellPathsPartMgr(this);
|
||||
|
||||
this->setAs3DViewMdiWindow();
|
||||
}
|
||||
|
||||
@@ -639,9 +643,9 @@ void Rim3dView::addWellPathsToModel(cvf::ModelBasicList* wellPathModelBasicList,
|
||||
|
||||
cvf::ref<caf::DisplayCoordTransform> transForm = displayCoordTransform();
|
||||
|
||||
wellPathCollection()->appendStaticGeometryPartsToModel(wellPathModelBasicList,
|
||||
this->ownerCase()->characteristicCellSize(),
|
||||
wellPathClipBoundingBox,
|
||||
m_wellPathsPartManager->appendStaticGeometryPartsToModel(wellPathModelBasicList,
|
||||
this->ownerCase()->characteristicCellSize(),
|
||||
wellPathClipBoundingBox,
|
||||
transForm.p());
|
||||
|
||||
wellPathModelBasicList->updateBoundingBoxesRecursive();
|
||||
@@ -663,7 +667,7 @@ void Rim3dView::addDynamicWellPathsToModel(cvf::ModelBasicList* wellPathModelBas
|
||||
currentTimeStamp = timeStamps[currentTimeStep()];
|
||||
}
|
||||
|
||||
wellPathCollection()->appendDynamicGeometryPartsToModel(wellPathModelBasicList,
|
||||
m_wellPathsPartManager->appendDynamicGeometryPartsToModel(wellPathModelBasicList,
|
||||
currentTimeStamp,
|
||||
this->ownerCase()->characteristicCellSize(),
|
||||
wellPathClipBoundingBox,
|
||||
@@ -843,6 +847,14 @@ cvf::ref<caf::DisplayCoordTransform> Rim3dView::displayCoordTransform() const
|
||||
return coordTrans;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t Rim3dView::wellPathSegmentIndexFromTriangleIndex(size_t triangleIndex, RimWellPath* wellPath) const
|
||||
{
|
||||
return m_wellPathsPartManager->segmentIndexFromTriangleIndex(triangleIndex, wellPath);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -51,6 +51,8 @@ class RimViewController;
|
||||
class RimViewLinker;
|
||||
class RiuViewer;
|
||||
class RimWellPathCollection;
|
||||
class RivWellPathsPartMgr;
|
||||
class RimWellPath;
|
||||
|
||||
namespace cvf
|
||||
{
|
||||
@@ -144,6 +146,8 @@ public:
|
||||
|
||||
cvf::ref<caf::DisplayCoordTransform> displayCoordTransform() const override;
|
||||
|
||||
size_t wellPathSegmentIndexFromTriangleIndex(size_t triangleIndex, RimWellPath* wellPath) const;
|
||||
|
||||
virtual RimCase* ownerCase() const = 0;
|
||||
|
||||
protected:
|
||||
@@ -189,6 +193,8 @@ protected:
|
||||
cvf::ref<cvf::ModelBasicList> m_crossSectionVizModel;
|
||||
cvf::ref<cvf::ModelBasicList> m_highlightVizModel;
|
||||
|
||||
cvf::ref<RivWellPathsPartMgr> m_wellPathsPartManager;
|
||||
|
||||
private:
|
||||
// Overridden PdmObject methods:
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
#include "RivReservoirViewPartMgr.h"
|
||||
#include "RivSingleCellPartGenerator.h"
|
||||
#include "RivTernarySaturationOverlayItem.h"
|
||||
#include "RivWellPathsPartMgr.h"
|
||||
|
||||
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
#include "RimFracture.h"
|
||||
@@ -468,7 +469,7 @@ void RimEclipseView::createDisplayModel()
|
||||
addWellPathsToModel(m_wellPathPipeVizModel.p(), currentActiveCellInfo()->geometryBoundingBox());
|
||||
|
||||
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
wellPathCollection()->appendStaticFracturePartsToModel(m_wellPathPipeVizModel.p(), *this);
|
||||
m_wellPathsPartManager->appendStaticFracturePartsToModel(m_wellPathPipeVizModel.p(), this);
|
||||
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
m_wellPathPipeVizModel->updateBoundingBoxesRecursive();
|
||||
m_viewer->addStaticModelOnce(m_wellPathPipeVizModel.p());
|
||||
|
||||
@@ -44,8 +44,6 @@
|
||||
#include "RifWellPathFormationsImporter.h"
|
||||
#include "RifWellPathImporter.h"
|
||||
|
||||
#include "RivWellPathPartMgr.h"
|
||||
|
||||
#include "cafPdmUiEditorHandle.h"
|
||||
#include "cafProgressInfo.h"
|
||||
|
||||
@@ -412,64 +410,6 @@ void RimWellPathCollection::scheduleRedrawAffectedViews()
|
||||
if (proj) proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCollection::appendStaticGeometryPartsToModel(cvf::ModelBasicList* model,
|
||||
double characteristicCellSize,
|
||||
const cvf::BoundingBox& wellPathClipBoundingBox,
|
||||
const caf::DisplayCoordTransform* displayCoordTransform)
|
||||
{
|
||||
if (!this->isActive()) return;
|
||||
if (this->wellPathVisibility() == RimWellPathCollection::FORCE_ALL_OFF) return;
|
||||
|
||||
for (size_t wIdx = 0; wIdx < this->wellPaths.size(); wIdx++)
|
||||
{
|
||||
RivWellPathPartMgr* partMgr = this->wellPaths[wIdx]->partMgr();
|
||||
partMgr->appendStaticGeometryPartsToModel(model, characteristicCellSize, wellPathClipBoundingBox, displayCoordTransform);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
void RimWellPathCollection::appendStaticFracturePartsToModel(cvf::ModelBasicList* model,
|
||||
const RimEclipseView& eclView)
|
||||
{
|
||||
/*
|
||||
if (!this->isActive()) return;
|
||||
if (this->wellPathVisibility() == RimWellPathCollection::FORCE_ALL_OFF) return;
|
||||
|
||||
for (size_t wIdx = 0; wIdx < this->wellPaths.size(); wIdx++)
|
||||
{
|
||||
RivWellPathPartMgr* partMgr = this->wellPaths[wIdx]->partMgr();
|
||||
partMgr->appendStaticFracturePartsToModel(model, eclView);
|
||||
}
|
||||
*/
|
||||
}
|
||||
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCollection::appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model,
|
||||
const QDateTime& timeStamp,
|
||||
double characteristicCellSize,
|
||||
const cvf::BoundingBox& wellPathClipBoundingBox,
|
||||
const caf::DisplayCoordTransform* displayCoordTransform)
|
||||
|
||||
{
|
||||
if (!this->isActive()) return;
|
||||
if (this->wellPathVisibility() == RimWellPathCollection::FORCE_ALL_OFF) return;
|
||||
|
||||
for (size_t wIdx = 0; wIdx < this->wellPaths.size(); wIdx++)
|
||||
{
|
||||
RivWellPathPartMgr* partMgr = this->wellPaths[wIdx]->partMgr();
|
||||
partMgr->appendDynamicGeometryPartsToModel(model, timeStamp, characteristicCellSize, wellPathClipBoundingBox, displayCoordTransform);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -106,21 +106,6 @@ public:
|
||||
|
||||
void scheduleRedrawAffectedViews();
|
||||
|
||||
void appendStaticGeometryPartsToModel(cvf::ModelBasicList* model,
|
||||
double characteristicCellSize,
|
||||
const cvf::BoundingBox& wellPathClipBoundingBox,
|
||||
const caf::DisplayCoordTransform* displayCoordTransform);
|
||||
|
||||
#ifdef USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
void appendStaticFracturePartsToModel(cvf::ModelBasicList* model,
|
||||
const RimEclipseView& eclView);
|
||||
#endif // USE_PROTOTYPE_FEATURE_FRACTURES
|
||||
|
||||
void appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model,
|
||||
const QDateTime& timeStamp,
|
||||
double characteristicCellSize,
|
||||
const cvf::BoundingBox& wellPathClipBoundingBox,
|
||||
const caf::DisplayCoordTransform* displayCoordTransform);
|
||||
void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath);
|
||||
bool anyWellsContainingPerforationIntervals() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user