mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1250 Show fractures directly as child objects of wells / well path
This commit is contained in:
parent
73690e6d66
commit
65d71f7106
@ -21,16 +21,20 @@
|
||||
#include "RicDeleteItemExec.h"
|
||||
#include "RicDeleteItemExecData.h"
|
||||
|
||||
#include "RimCase.h"
|
||||
#include "RimCellRangeFilterCollection.h"
|
||||
#include "RimEclipsePropertyFilterCollection.h"
|
||||
#include "RimFormationNamesCollection.h"
|
||||
#include "RimGeoMechPropertyFilterCollection.h"
|
||||
#include "RimIntersectionCollection.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSimWellFractureCollection.h"
|
||||
#include "RimView.h"
|
||||
#include "RimViewLinkerCollection.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellLogPlotCollection.h"
|
||||
#include "RimWellLogTrack.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "cafNotificationCenter.h"
|
||||
@ -39,9 +43,6 @@
|
||||
#include "cafPdmReferenceHelper.h"
|
||||
#include "cafPdmUiFieldHandle.h"
|
||||
#include "cafSelectionManager.h"
|
||||
#include "RimFormationNamesCollection.h"
|
||||
#include "RimCase.h"
|
||||
#include "RimSimWellFractureCollection.h"
|
||||
|
||||
|
||||
namespace caf
|
||||
@ -123,9 +124,9 @@ void RicDeleteItemExec::redo()
|
||||
}
|
||||
|
||||
// SimWell Fractures
|
||||
RimSimWellFractureCollection* simWellFractureColl;
|
||||
parentObj->firstAncestorOrThisOfType(simWellFractureColl);
|
||||
if (view && simWellFractureColl)
|
||||
RimEclipseWell* eclipseWell;
|
||||
parentObj->firstAncestorOrThisOfType(eclipseWell);
|
||||
if (view && eclipseWell)
|
||||
{
|
||||
view->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
@ -134,6 +135,14 @@ void RicDeleteItemExec::redo()
|
||||
|
||||
// Well paths
|
||||
|
||||
RimWellPath* wellPath;
|
||||
parentObj->firstAncestorOrThisOfType(wellPath);
|
||||
|
||||
if (wellPath)
|
||||
{
|
||||
wellPath->updateConnectedEditors();
|
||||
}
|
||||
|
||||
RimWellPathCollection* wellPathColl;
|
||||
parentObj->firstAncestorOrThisOfType(wellPathColl);
|
||||
|
||||
|
@ -54,12 +54,8 @@ void RicNewSimWellFractureFeature::onActionTriggered(bool isChecked)
|
||||
RimEclipseWell* eclipseWell = nullptr;
|
||||
objHandle->firstAncestorOrThisOfType(eclipseWell);
|
||||
|
||||
RimSimWellFractureCollection* fractureCollection = nullptr;
|
||||
objHandle->firstAncestorOrThisOfType(fractureCollection);
|
||||
CVF_ASSERT(fractureCollection);
|
||||
|
||||
RimSimWellFracture* fracture = new RimSimWellFracture();
|
||||
fractureCollection->simwellFractures.push_back(fracture);
|
||||
eclipseWell->simwellFractureCollection()->simwellFractures.push_back(fracture);
|
||||
|
||||
RimOilField* oilfield = nullptr;
|
||||
objHandle->firstAncestorOrThisOfType(oilfield);
|
||||
@ -82,7 +78,7 @@ void RicNewSimWellFractureFeature::onActionTriggered(bool isChecked)
|
||||
|
||||
fracture->updateFracturePositionFromLocation();
|
||||
|
||||
fractureCollection->updateConnectedEditors();
|
||||
eclipseWell->updateConnectedEditors();
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(fracture);
|
||||
|
||||
RimEclipseView* mainView = nullptr;
|
||||
|
@ -52,22 +52,15 @@ void RicNewWellPathFractureFeature::onActionTriggered(bool isChecked)
|
||||
caf::PdmObjectHandle* objHandle = dynamic_cast<caf::PdmObjectHandle*>(pdmUiItem);
|
||||
if (!objHandle) return;
|
||||
|
||||
RimWellPathCollection* wellPathColl = nullptr;
|
||||
objHandle->firstAncestorOrThisOfType(wellPathColl);
|
||||
|
||||
RimWellPathFractureCollection* fractureCollection = nullptr;
|
||||
objHandle->firstAncestorOrThisOfType(fractureCollection);
|
||||
CVF_ASSERT(fractureCollection);
|
||||
|
||||
RimWellPathFracture* fracture = new RimWellPathFracture();
|
||||
fractureCollection->fractures.push_back(fracture);
|
||||
|
||||
float md_default = 0.0f;
|
||||
fracture->setMeasuredDepth(md_default);
|
||||
|
||||
RimWellPath* wellPath = nullptr;
|
||||
objHandle->firstAncestorOrThisOfType(wellPath);
|
||||
CVF_ASSERT(wellPath);
|
||||
|
||||
RimWellPathFracture* fracture = new RimWellPathFracture();
|
||||
wellPath->fractureCollection()->fractures.push_back(fracture);
|
||||
|
||||
float md_default = 0.0f;
|
||||
fracture->setMeasuredDepth(md_default);
|
||||
|
||||
RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
||||
cvf::Vec3d positionAtWellpath = wellPathGeometry->interpolatedPointAlongWellPath(md_default);
|
||||
@ -92,10 +85,15 @@ void RicNewWellPathFractureFeature::onActionTriggered(bool isChecked)
|
||||
fracture->setAzimuth();
|
||||
}
|
||||
|
||||
fractureCollection->updateConnectedEditors();
|
||||
wellPath->updateConnectedEditors();
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(fracture);
|
||||
|
||||
wellPathColl->scheduleGeometryRegenAndRedrawViews();
|
||||
RimWellPathCollection* wellPathColl = nullptr;
|
||||
objHandle->firstAncestorOrThisOfType(wellPathColl);
|
||||
if (wellPathColl)
|
||||
{
|
||||
wellPathColl->scheduleGeometryRegenAndRedrawViews();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -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))
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -37,7 +37,6 @@ public:
|
||||
virtual ~RimSimWellFractureCollection(void);
|
||||
|
||||
caf::PdmChildArrayField<RimSimWellFracture*> simwellFractures;
|
||||
caf::PdmField<bool> isActive;
|
||||
|
||||
void deleteFractures();
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -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;
|
||||
|
||||
};
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -37,7 +37,6 @@ public:
|
||||
virtual ~RimWellPathFractureCollection(void);
|
||||
|
||||
caf::PdmChildArrayField<RimWellPathFracture*> fractures;
|
||||
caf::PdmField<bool> isActive;
|
||||
|
||||
void deleteFractures();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user