mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3261 Show 3d well log curves even if the grid result isn't dynamic.
* Have to be more precise on whether to attach the results as a static or dynamic property. * Also rewrite some 3dWellLogPlanePartMgr code to only create one draw surface for each draw plane used for the curves.
This commit is contained in:
@@ -410,6 +410,23 @@ RimWellPathCollection* Rim3dView::wellPathCollection() const
|
||||
return RimTools::wellPathCollection();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool Rim3dView::hasVisibleTimeStepDependent3dWellLogCurves() const
|
||||
{
|
||||
std::vector<Rim3dWellLogCurve*> wellLogCurves;
|
||||
wellPathCollection()->descendantsIncludingThisOfType(wellLogCurves);
|
||||
for (const Rim3dWellLogCurve* curve : wellLogCurves)
|
||||
{
|
||||
if (curve->isShowingTimeDependentResultInView(this))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -152,7 +152,8 @@ protected:
|
||||
|
||||
|
||||
RimWellPathCollection* wellPathCollection() const;
|
||||
void addWellPathsToModel(cvf::ModelBasicList* wellPathModelBasicList,
|
||||
bool hasVisibleTimeStepDependent3dWellLogCurves() const;
|
||||
void addWellPathsToModel(cvf::ModelBasicList* wellPathModelBasicList,
|
||||
const cvf::BoundingBox& wellPathClipBoundingBox);
|
||||
|
||||
void addDynamicWellPathsToModel(cvf::ModelBasicList* wellPathModelBasicList,
|
||||
|
||||
@@ -100,9 +100,9 @@ Rim3dWellLogCurve::DrawPlane Rim3dWellLogCurve::drawPlane() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double Rim3dWellLogCurve::drawPlaneAngle() const
|
||||
double Rim3dWellLogCurve::drawPlaneAngle(Rim3dWellLogCurve::DrawPlane drawPlane)
|
||||
{
|
||||
switch (drawPlane())
|
||||
switch (drawPlane)
|
||||
{
|
||||
case HORIZONTAL_LEFT:
|
||||
case HORIZONTAL_CENTER:
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "RimNameConfig.h"
|
||||
|
||||
class Riv3dWellLogCurveGeometryGenerator;
|
||||
class Rim3dView;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@@ -61,11 +62,12 @@ public:
|
||||
virtual QString resultPropertyString() const = 0;
|
||||
|
||||
DrawPlane drawPlane() const;
|
||||
double drawPlaneAngle() const;
|
||||
static double drawPlaneAngle(DrawPlane drawPlane);
|
||||
|
||||
cvf::Color3f color() const;
|
||||
bool isShowingCurve() const;
|
||||
|
||||
virtual bool isShowingTimeDependentResultInView(const Rim3dView* gridView) const { return showInView(gridView); }
|
||||
virtual bool showInView(const Rim3dView* gridView) const { return isShowingCurve(); }
|
||||
virtual bool followAnimationTimeStep() const { return false; }
|
||||
virtual void curveValuesAndMds(std::vector<double>* values, std::vector<double>* measuredDepthValues) const = 0;
|
||||
virtual void curveValuesAndMdsAtTimeStep(std::vector<double>* values, std::vector<double>* measuredDepthValues, int timeStep) const;
|
||||
|
||||
@@ -375,6 +375,44 @@ double Rim3dWellLogExtractionCurve::rkbDiff() const
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool Rim3dWellLogExtractionCurve::isShowingTimeDependentResultInView(const Rim3dView* gridView) const
|
||||
{
|
||||
if (showInView(gridView))
|
||||
{
|
||||
if (dynamic_cast<const RimEclipseCase*>(m_case()))
|
||||
{
|
||||
return m_eclipseResultDefinition->hasDynamicResult();
|
||||
}
|
||||
else if (dynamic_cast<const RimGeoMechCase*>(m_case()))
|
||||
{
|
||||
return m_geomResultDefinition->hasResult();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool Rim3dWellLogExtractionCurve::showInView(const Rim3dView* gridView) const
|
||||
{
|
||||
if (isShowingCurve())
|
||||
{
|
||||
if (dynamic_cast<const RimEclipseCase*>(m_case()))
|
||||
{
|
||||
return dynamic_cast<const RimEclipseView*>(gridView) != nullptr;
|
||||
}
|
||||
else if (dynamic_cast<const RimGeoMechCase*>(m_case()))
|
||||
{
|
||||
return dynamic_cast<const RimGeoMechView*>(gridView) != nullptr;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -388,7 +426,22 @@ caf::PdmFieldHandle* Rim3dWellLogExtractionCurve::userDescriptionField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dWellLogExtractionCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
if (changedField == &m_case || changedField == &m_timeStep)
|
||||
if (changedField == &m_case)
|
||||
{
|
||||
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>(m_case());
|
||||
RimGeoMechCase* geoMechCase = dynamic_cast<RimGeoMechCase*>(m_case());
|
||||
if (eclipseCase)
|
||||
{
|
||||
m_eclipseResultDefinition->setEclipseCase(eclipseCase);
|
||||
}
|
||||
else if (geoMechCase)
|
||||
{
|
||||
m_geomResultDefinition->setGeoMechCase(geoMechCase);
|
||||
}
|
||||
|
||||
this->resetMinMaxValuesAndUpdateUI();
|
||||
}
|
||||
else if (changedField == &m_timeStep)
|
||||
{
|
||||
this->resetMinMaxValuesAndUpdateUI();
|
||||
}
|
||||
|
||||
@@ -53,6 +53,11 @@ public:
|
||||
virtual QString name() const override;
|
||||
virtual QString createAutoName() const override;
|
||||
double rkbDiff() const;
|
||||
|
||||
virtual bool isShowingTimeDependentResultInView(const Rim3dView* gridView) const override;
|
||||
|
||||
virtual bool showInView(const Rim3dView* gridView) const override;
|
||||
|
||||
protected:
|
||||
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
|
||||
@@ -1563,6 +1563,8 @@ bool RimEclipseView::isTimeStepDependentDataVisible() const
|
||||
|
||||
if (this->wellPathCollection()->anyWellsContainingPerforationIntervals()) return true;
|
||||
|
||||
if (this->hasVisibleTimeStepDependent3dWellLogCurves()) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ QString RimGeoMechCase::caseFileName() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigGeoMechCaseData* RimGeoMechCase::geoMechData()
|
||||
{
|
||||
return m_geoMechCaseData.p();
|
||||
return m_geoMechCaseData.p();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -137,7 +137,7 @@ RigGeoMechCaseData* RimGeoMechCase::geoMechData()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RigGeoMechCaseData* RimGeoMechCase::geoMechData() const
|
||||
{
|
||||
return m_geoMechCaseData.p();
|
||||
return m_geoMechCaseData.p();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -646,7 +646,16 @@ void RimGeoMechView::clampCurrentTimestep()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimGeoMechView::isTimeStepDependentDataVisible() const
|
||||
{
|
||||
return this->hasUserRequestedAnimation() && (this->cellResult()->hasResult() || this->geoMechPropertyFilterCollection()->hasActiveFilters());
|
||||
if (this->hasUserRequestedAnimation() &&
|
||||
(this->cellResult()->hasResult() || this->geoMechPropertyFilterCollection()->hasActiveFilters()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (this->hasVisibleTimeStepDependent3dWellLogCurves())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -33,11 +33,11 @@ RimWellLogExtractionCurveNameConfig::RimWellLogExtractionCurveNameConfig(const R
|
||||
{
|
||||
CAF_PDM_InitObject("Well Log Extraction Curve Name Generator", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&m_addCaseName, "AddCaseName", false, "Add Case Name", "", "", "");
|
||||
CAF_PDM_InitField(&m_addProperty, "AddProperty", false, "Add Property Type", "", "", "");
|
||||
CAF_PDM_InitField(&m_addWellName, "AddWellName", false, "Add Well Name", "", "", "");
|
||||
CAF_PDM_InitField(&m_addTimestep, "AddTimeStep", false, "Add Time Step", "", "", "");
|
||||
CAF_PDM_InitField(&m_addDate, "AddDate", false, "Add Date", "", "", "");
|
||||
CAF_PDM_InitField(&m_addCaseName, "AddCaseName", true, "Add Case Name", "", "", "");
|
||||
CAF_PDM_InitField(&m_addProperty, "AddProperty", true, "Add Property Type", "", "", "");
|
||||
CAF_PDM_InitField(&m_addWellName, "AddWellName", true, "Add Well Name", "", "", "");
|
||||
CAF_PDM_InitField(&m_addTimestep, "AddTimeStep", true, "Add Time Step", "", "", "");
|
||||
CAF_PDM_InitField(&m_addDate, "AddDate", true, "Add Date", "", "", "");
|
||||
|
||||
m_customName = "Log Extraction";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user