#1250 Show fractures directly as child objects of wells / well path

This commit is contained in:
Magne Sjaastad
2017-02-22 14:40:13 +01:00
parent 73690e6d66
commit 65d71f7106
11 changed files with 71 additions and 47 deletions

View File

@@ -223,6 +223,7 @@ QStringList RimContextCommandBuilder::commandsFromSelection()
commandIds << "RicNewWellLogFileCurveFeature";
commandIds << "RicNewWellLogCurveExtractionFeature";
commandIds << "RicNewWellPathIntersectionFeature";
commandIds << "RicNewWellPathFractureFeature";
commandIds << "Separator";
commandIds << "RicWellPathDeleteFeature";
}
@@ -372,17 +373,15 @@ QStringList RimContextCommandBuilder::commandsFromSelection()
{
commandIds << "RicAddStoredWellAllocationPlotFeature";
}
else if (dynamic_cast<RimWellPathFractureCollection*>(uiItem) ||
dynamic_cast<RimWellPathFracture*>(uiItem) )
else if (dynamic_cast<RimWellPathFracture*>(uiItem))
{
commandIds << "RicNewWellPathFractureFeature";
commandIds << "RicWellPathFracturesDeleteAllFeature";
//commandIds << "RicWellPathFracturesDeleteAllFeature";
}
else if (dynamic_cast<RimSimWellFractureCollection*>(uiItem) ||
dynamic_cast<RimSimWellFracture*>(uiItem))
else if (dynamic_cast<RimSimWellFracture*>(uiItem))
{
commandIds << "RicNewSimWellFractureFeature";
commandIds << "RicSimWellFracturesDeleteAllFeature";
//commandIds << "RicSimWellFracturesDeleteAllFeature";
}
else if (dynamic_cast<RimFractureTemplateCollection*>(uiItem) ||
dynamic_cast<RimStimPlanFractureTemplate*>(uiItem))
@@ -471,6 +470,8 @@ QStringList RimContextCommandBuilder::commandsFromSelection()
commandIds << "RicEclipseWellShowSpheresFeature";
commandIds << "RicEclipseWellShowWellCellsFeature";
commandIds << "RicEclipseWellShowWellCellFenceFeature";
commandIds << "Separator";
commandIds << "RicNewSimWellFractureFeature";
commandIds << "RicExportSelectedSimWellFractureWellCompletionFeature";
}
else if (dynamic_cast<RimWellPath*>(uiItem))

View File

@@ -28,9 +28,12 @@
#include "RimEclipseWellCollection.h"
#include "RimIntersectionCollection.h"
#include "RimSimWellFractureCollection.h"
#include "RimSimWellFracture.h"
#include "RiuMainWindow.h"
#include "cafPdmUiTreeOrdering.h"
#include "cvfMath.h"
CAF_PDM_SOURCE_INIT(RimEclipseWell, "Well");
@@ -61,7 +64,6 @@ RimEclipseWell::RimEclipseWell()
name.uiCapability()->setUiHidden(true);
name.uiCapability()->setUiReadOnly(true);
simwellFractureCollection.uiCapability()->setUiHidden(true);
m_resultWellIndex = cvf::UNDEFINED_SIZE_T;
@@ -288,6 +290,12 @@ void RimEclipseWell::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
//--------------------------------------------------------------------------------------------------
void RimEclipseWell::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/)
{
for (RimSimWellFracture* fracture : simwellFractureCollection()->simwellFractures())
{
uiTreeOrdering.add(fracture);
}
uiTreeOrdering.setForgetRemainingFields(true);
const RimEclipseView* reservoirView = nullptr;
this->firstAncestorOrThisOfType(reservoirView);
if (!reservoirView) return;

View File

@@ -33,8 +33,6 @@ RimSimWellFractureCollection::RimSimWellFractureCollection(void)
{
CAF_PDM_InitObject("Fractures", ":/FractureSymbol16x16.png", "", "");
CAF_PDM_InitField(&isActive, "Active", true, "Active", "", "", "");
CAF_PDM_InitFieldNoDefault(&simwellFractures, "Fractures", "", "", "", "");
simwellFractures.uiCapability()->setUiHidden(true);
}

View File

@@ -37,7 +37,6 @@ public:
virtual ~RimSimWellFractureCollection(void);
caf::PdmChildArrayField<RimSimWellFracture*> simwellFractures;
caf::PdmField<bool> isActive;
void deleteFractures();

View File

@@ -21,20 +21,26 @@
#include "RimWellPath.h"
#include "RifJsonEncodeDecode.h"
#include "RimMainPlotCollection.h"
#include "RimProject.h"
#include "RimProject.h"
#include "RimTools.h"
#include "RimWellLogFile.h"
#include "RimProject.h"
#include "RimMainPlotCollection.h"
#include "RimWellLogPlotCollection.h"
#include "RivWellPathPartMgr.h"
#include "RimWellPathFracture.h"
#include "RimWellPathFractureCollection.h"
#include "RiuMainWindow.h"
#include "RivWellPathPartMgr.h"
#include "cafPdmUiTreeOrdering.h"
#include <QDateTime>
#include <QDir>
#include <QFileInfo>
#include <QMessageBox>
#include <QDateTime>
CAF_PDM_SOURCE_INIT(RimWellPath, "WellPath");
@@ -97,10 +103,8 @@ RimWellPath::RimWellPath()
m_wellLogFile.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&fractureCollection, "FractureCollection", "Fractures", "", "", "");
fractureCollection.uiCapability()->setUiHidden(true);
fractureCollection = new RimWellPathFractureCollection();
m_wellPath = NULL;
}
@@ -379,6 +383,18 @@ void RimWellPath::setupBeforeSave()
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPath::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/)
{
for (RimWellPathFracture* fracture : fractureCollection()->fractures())
{
uiTreeOrdering.add(fracture);
}
uiTreeOrdering.setForgetRemainingFields(true);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -79,7 +79,8 @@ public:
bool readWellPathFile(QString * errorMessage, RifWellPathAsciiFileReader* asciiReader);
void updateFilePathsFromProjectPath(const QString& newProjectPath, const QString& oldProjectPath);
protected:
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
private:
@@ -107,4 +108,5 @@ private:
cvf::ref<RigWellPath> m_wellPath;
cvf::ref<RivWellPathPartMgr> m_wellPathPartMgr;
};

View File

@@ -33,8 +33,6 @@ RimWellPathFractureCollection::RimWellPathFractureCollection(void)
{
CAF_PDM_InitObject("Fractures", ":/FractureSymbol16x16.png", "", "");
CAF_PDM_InitField(&isActive, "Active", true, "Active", "", "", "");
CAF_PDM_InitFieldNoDefault(&fractures, "Fractures", "", "", "", "");
fractures.uiCapability()->setUiHidden(true);
}

View File

@@ -37,7 +37,6 @@ public:
virtual ~RimWellPathFractureCollection(void);
caf::PdmChildArrayField<RimWellPathFracture*> fractures;
caf::PdmField<bool> isActive;
void deleteFractures();
};