diff --git a/ApplicationCode/ProjectDataModel/Completions/RimFracture.cpp b/ApplicationCode/ProjectDataModel/Completions/RimFracture.cpp index 6ba8c1571f..aaecbe8b58 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimFracture.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimFracture.cpp @@ -70,6 +70,19 @@ CAF_PDM_XML_ABSTRACT_SOURCE_INIT(RimFracture, "Fracture"); +namespace caf { + +template<> +void caf::AppEnum< RimFracture::StimPlanResultColorType >::setUp() +{ + addItem(RimFracture::INTERPOLATED, "INTERPOLATED", "Interpolated"); + addItem(RimFracture::SINGLE_ELEMENT_COLOR, "SINGLE_ELEMENT_COLOR", "Single Element Cell"); + + setDefault(RimFracture::INTERPOLATED); +} + +} // End namespace caf + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -141,6 +154,8 @@ RimFracture::RimFracture(void) m_wellFractureAzimuthAngleWarning.uiCapability()->setUiReadOnly(true); m_wellFractureAzimuthAngleWarning.xmlCapability()->disableIO(); + CAF_PDM_InitFieldNoDefault(&m_stimPlanCellVizMode, "StimPlanCellVizMode", "StimPlan Visualization mode", "", "", ""); + m_fracturePartMgr = new RivWellFracturePartMgr(this); } @@ -175,6 +190,14 @@ void RimFracture::setStimPlanTimeIndexToPlot(int timeIndex) m_stimPlanTimeIndexToPlot = timeIndex; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimFracture::StimPlanResultColorType RimFracture::stimPlanResultColorType() const +{ + return m_stimPlanCellVizMode(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -204,6 +227,7 @@ void RimFracture::fieldChangedByUi(const caf::PdmFieldHandle* changedField, cons if (changedField == &m_azimuth || changedField == &m_fractureTemplate || changedField == &m_stimPlanTimeIndexToPlot || + changedField == &m_stimPlanCellVizMode || changedField == this->objectToggleField() || changedField == &m_dip || changedField == &m_tilt) @@ -495,11 +519,14 @@ void RimFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiO if (dynamic_cast(fracTemplate)) { m_stimPlanTimeIndexToPlot.uiCapability()->setUiHidden(false); + m_stimPlanCellVizMode.uiCapability()->setUiHidden(false); + m_stimPlanTimeIndexToPlot.uiCapability()->setUiReadOnly(true); } else { m_stimPlanTimeIndexToPlot.uiCapability()->setUiHidden(true); + m_stimPlanCellVizMode.uiCapability()->setUiHidden(true); } } else diff --git a/ApplicationCode/ProjectDataModel/Completions/RimFracture.h b/ApplicationCode/ProjectDataModel/Completions/RimFracture.h index 94a5bbfb35..2b04753137 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimFracture.h +++ b/ApplicationCode/ProjectDataModel/Completions/RimFracture.h @@ -43,6 +43,7 @@ class RimFractureTemplate; class RigFracturedEclipseCellExportData; class RigMainGrid; + //================================================================================================== /// /// @@ -51,6 +52,13 @@ class RimFracture : public RimCheckableNamedObject, public Rim3dPropertiesInterf { CAF_PDM_HEADER_INIT; +public: + enum StimPlanResultColorType + { + INTERPOLATED, + SINGLE_ELEMENT_COLOR + }; + public: RimFracture(void); virtual ~RimFracture(void); @@ -59,6 +67,7 @@ public: double perforationEfficiency() const; void setStimPlanTimeIndexToPlot(int timeIndex); + StimPlanResultColorType stimPlanResultColorType() const; double wellRadius(RiaEclipseUnitTools::UnitSystem unitSystem) const; cvf::Vec3d anchorPosition() const ; @@ -123,7 +132,10 @@ protected: caf::PdmField m_wellDiameter; caf::PdmField m_stimPlanTimeIndexToPlot; + caf::PdmField> m_stimPlanCellVizMode; + private: caf::PdmField m_anchorPosition; + cvf::ref m_fracturePartMgr; }; diff --git a/ApplicationCode/ProjectDataModel/Completions/RimSimWellFracture.cpp b/ApplicationCode/ProjectDataModel/Completions/RimSimWellFracture.cpp index 1877babb38..8d9a5c5781 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimSimWellFracture.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimSimWellFracture.cpp @@ -212,6 +212,7 @@ void RimSimWellFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrderi propertyGroup->add(&m_fractureUnit); propertyGroup->add(&m_fractureTemplate); propertyGroup->add(&m_stimPlanTimeIndexToPlot); + propertyGroup->add(&m_stimPlanCellVizMode); propertyGroup->add(&m_perforationLength); propertyGroup->add(&m_perforationEfficiency); propertyGroup->add(&m_wellDiameter); diff --git a/ApplicationCode/ProjectDataModel/Completions/RimWellPathFracture.cpp b/ApplicationCode/ProjectDataModel/Completions/RimWellPathFracture.cpp index d532fe0b91..ca8b51ebff 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimWellPathFracture.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimWellPathFracture.cpp @@ -177,6 +177,7 @@ void RimWellPathFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrder propertyGroup->add(&m_fractureUnit); propertyGroup->add(&m_fractureTemplate); propertyGroup->add(&m_stimPlanTimeIndexToPlot); + propertyGroup->add(&m_stimPlanCellVizMode); propertyGroup->add(&m_perforationLength); propertyGroup->add(&m_perforationEfficiency); propertyGroup->add(&m_wellDiameter);