mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1648 Remove dependency on active view from color generation.
Separate the fracture geometry generation methods from the wellpath methods. Use eclipse View as argument. Fixed some constness stuff in View
This commit is contained in:
@@ -447,6 +447,8 @@ void RimEclipseView::createDisplayModel()
|
||||
|
||||
addWellPathsToModel(m_wellPathPipeVizModel.p(), currentActiveCellInfo()->geometryBoundingBox());
|
||||
|
||||
wellPathsPartManager()->appendStaticFracturePartsToModel(m_wellPathPipeVizModel.p(), this);
|
||||
|
||||
m_viewer->addStaticModelOnce(m_wellPathPipeVizModel.p());
|
||||
|
||||
// Create Scenes from the frameModels
|
||||
@@ -688,10 +690,11 @@ void RimEclipseView::updateCurrentTimeStep()
|
||||
}
|
||||
}
|
||||
|
||||
f->fracturePartManager()->appendGeometryPartsToModel(simWellFracturesModelBasicList.p(), transForm.p());
|
||||
f->fracturePartManager()->appendGeometryPartsToModel(simWellFracturesModelBasicList.p(), this);
|
||||
}
|
||||
|
||||
simWellFracturesModelBasicList->updateBoundingBoxesRecursive();
|
||||
frameScene->addModel(simWellFracturesModelBasicList.p());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1506,7 +1509,7 @@ cvf::Transform* RimEclipseView::scaleTransform()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimCase* RimEclipseView::ownerCase()
|
||||
RimCase* RimEclipseView::ownerCase() const
|
||||
{
|
||||
return eclipseCase();
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
|
||||
void setEclipseCase(RimEclipseCase* reservoir);
|
||||
RimEclipseCase* eclipseCase() const;
|
||||
virtual RimCase* ownerCase();
|
||||
virtual RimCase* ownerCase() const override;
|
||||
|
||||
RigMainGrid* mainGrid() const;
|
||||
|
||||
|
||||
@@ -507,7 +507,7 @@ void RimGeoMechView::initAfterRead()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimCase* RimGeoMechView::ownerCase()
|
||||
RimCase* RimGeoMechView::ownerCase() const
|
||||
{
|
||||
return m_geomechCase;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
|
||||
void setGeoMechCase(RimGeoMechCase* gmCase);
|
||||
RimGeoMechCase* geoMechCase();
|
||||
virtual RimCase* ownerCase();
|
||||
virtual RimCase* ownerCase() const override;
|
||||
|
||||
virtual void loadDataAndUpdate();
|
||||
|
||||
|
||||
@@ -720,9 +720,9 @@ void RimView::addWellPathsToModel(cvf::ModelBasicList* wellPathModelBasicList,
|
||||
cvf::ref<caf::DisplayCoordTransform> transForm = displayCoordTransform();
|
||||
|
||||
wellPathsPartManager()->appendStaticGeometryPartsToModel(wellPathModelBasicList,
|
||||
this->ownerCase()->characteristicCellSize(),
|
||||
wellPathClipBoundingBox,
|
||||
transForm.p());
|
||||
this->ownerCase()->characteristicCellSize(),
|
||||
wellPathClipBoundingBox,
|
||||
transForm.p());
|
||||
|
||||
wellPathModelBasicList->updateBoundingBoxesRecursive();
|
||||
}
|
||||
@@ -1026,7 +1026,7 @@ void RimView::zoomAll()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<caf::DisplayCoordTransform> RimView::displayCoordTransform()
|
||||
cvf::ref<caf::DisplayCoordTransform> RimView::displayCoordTransform() const
|
||||
{
|
||||
cvf::ref<caf::DisplayCoordTransform> coordTrans = new caf::DisplayCoordTransform;
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ public:
|
||||
|
||||
virtual void zoomAll() override;
|
||||
|
||||
cvf::ref<caf::DisplayCoordTransform> displayCoordTransform();
|
||||
cvf::ref<caf::DisplayCoordTransform> displayCoordTransform() const;
|
||||
|
||||
virtual QWidget* viewWidget() override;
|
||||
void forceShowWindowOn();
|
||||
@@ -171,7 +171,7 @@ public:
|
||||
public:
|
||||
virtual void loadDataAndUpdate() = 0;
|
||||
void updateGridBoxData();
|
||||
virtual RimCase* ownerCase() = 0;
|
||||
virtual RimCase* ownerCase() const = 0;
|
||||
|
||||
virtual caf::PdmFieldHandle* userDescriptionField() { return &name; }
|
||||
protected:
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
#include <fstream>
|
||||
#include <cmath>
|
||||
#include "RivWellPathPartMgr.h"
|
||||
#include "RimEclipseView.h"
|
||||
|
||||
namespace caf
|
||||
{
|
||||
@@ -349,6 +350,22 @@ void RimWellPathCollection::appendStaticGeometryPartsToModel(cvf::ModelBasicList
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -40,6 +40,7 @@ class RifWellPathImporter;
|
||||
class RimWellPath;
|
||||
class RimProject;
|
||||
class RigWellPath;
|
||||
class RimEclipseView;
|
||||
|
||||
namespace cvf {
|
||||
class ModelBasicList;
|
||||
@@ -101,6 +102,9 @@ public:
|
||||
const cvf::BoundingBox& wellPathClipBoundingBox,
|
||||
const caf::DisplayCoordTransform* displayCoordTransform);
|
||||
|
||||
void appendStaticFracturePartsToModel(cvf::ModelBasicList* model,
|
||||
const RimEclipseView* eclView);
|
||||
|
||||
void appendDynamicGeometryPartsToModel(cvf::ModelBasicList* model,
|
||||
const QDateTime& timeStamp,
|
||||
double characteristicCellSize,
|
||||
|
||||
Reference in New Issue
Block a user