#3741 Make it possible to enable/disable all well path components in plots and 3d view.

* Add check box to casing design and update of plot
* Add isEnabled() method to component interface which controls plotting.
This commit is contained in:
Gaute Lindkvist
2018-11-22 12:57:11 +01:00
parent 132408ab6f
commit ae8cb9d210
17 changed files with 166 additions and 67 deletions

View File

@@ -632,6 +632,17 @@ cvf::BoundingBox RimFishbonesMultipleSubs::boundingBoxInDomainCoords() const
return bb;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimFishbonesMultipleSubs::isEnabled() const
{
RimFishbonesCollection* collection;
this->firstAncestorOrThisOfTypeAsserted(collection);
return collection->isChecked() && isActive();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -110,6 +110,7 @@ public:
cvf::BoundingBox boundingBoxInDomainCoords() const override;
// Overrides from RimWellPathCompletionsInterface
bool isEnabled() const override;
RiaDefines::WellPathComponentType componentType() const override;
QString componentLabel() const override;
QString componentTypeLabel() const override;

View File

@@ -39,6 +39,7 @@
#include "RimReservoirCellResultsStorage.h"
#include "RimStimPlanColors.h"
#include "RimStimPlanFractureTemplate.h"
#include "RimWellPathFractureCollection.h"
#include "RivWellFracturePartMgr.h"
@@ -286,6 +287,16 @@ void RimFracture::clearCachedNonDarcyProperties()
m_cachedFractureProperties = NonDarcyData();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimFracture::isEnabled() const
{
RimWellPathFractureCollection* fractureCollection = nullptr;
this->firstAncestorOrThisOfTypeAsserted(fractureCollection);
return fractureCollection->isChecked() && isChecked();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -129,6 +129,7 @@ public:
friend class RimFractureTemplate;
// RimWellPathCompletionsInterface overrides.
bool isEnabled() const override;
RiaDefines::WellPathComponentType componentType() const override;
QString componentLabel() const override;
QString componentTypeLabel() const override;

View File

@@ -23,6 +23,7 @@
#include "RigCaseCellResultsData.h"
#include "RigWellPath.h"
#include "RimPerforationCollection.h"
#include "RimProject.h"
#include "RimWellPath.h"
#include "RimWellPathValve.h"
@@ -232,6 +233,16 @@ std::vector<RimWellPathValve*> RimPerforationInterval::valves() const
return allValves;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimPerforationInterval::isEnabled() const
{
RimPerforationCollection* perforationCollection;
this->firstAncestorOrThisOfTypeAsserted(perforationCollection);
return perforationCollection->isChecked() && isChecked();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -70,6 +70,7 @@ public:
std::vector<RimWellPathValve*> valves() const;
// RimWellPathCompletionInterface overrides
bool isEnabled() const override;
RiaDefines::WellPathComponentType componentType() const override;
QString componentLabel() const override;
QString componentTypeLabel() const override;

View File

@@ -31,6 +31,7 @@
class RimWellPathComponentInterface
{
public:
virtual bool isEnabled() const = 0;
virtual RiaDefines::WellPathComponentType componentType() const = 0;
virtual QString componentLabel() const = 0;
virtual QString componentTypeLabel() const = 0;

View File

@@ -103,6 +103,16 @@ std::vector<double> RimWellPathValve::valveLocations() const
return valveDepths;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimWellPathValve::isEnabled() const
{
RimPerforationInterval* perforationInterval = nullptr;
this->firstAncestorOrThisOfType(perforationInterval);
return perforationInterval->isEnabled() && isChecked();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -46,6 +46,7 @@ public:
std::vector<double> valveLocations() const;
// Overrides from RimWellPathCompletionInterface
bool isEnabled() const override;
RiaDefines::WellPathComponentType componentType() const override;
QString componentLabel() const override;
QString componentTypeLabel() const override;