mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1037 - pre-proto - Changed RimFracture to RimWellPathFracture (and same for FractureCollection and commands to create / delete fractures)
This commit is contained in:
@@ -44,6 +44,7 @@ ${CEE_CURRENT_LIST_DIR}RicNewWellPathCollFractureFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicNewWellPathCollFractureAtPosFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicFractureDefinitionsDeleteAllFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicFracturesDeleteAllFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicWellPathFracturesDeleteAllFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicSimWellFracturesDeleteAllFeature.h
|
||||
|
||||
|
||||
@@ -92,7 +93,7 @@ ${CEE_CURRENT_LIST_DIR}RicNewFractureDefinitionFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicNewWellPathCollFractureFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicNewWellPathCollFractureAtPosFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicFractureDefinitionsDeleteAllFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicFracturesDeleteAllFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicWellPathFracturesDeleteAllFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicSimWellFracturesDeleteAllFeature.cpp
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,29 @@
|
||||
#include "RicDeleteItemExec.h"
|
||||
#include "RicDeleteItemExecData.h"
|
||||
|
||||
#include "RimCellRangeFilter.h"
|
||||
#include "RimEclipseInputProperty.h"
|
||||
#include "RimEclipsePropertyFilter.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimFormationNames.h"
|
||||
#include "RimFormationNamesCollection.h"
|
||||
#include "RimFractureDefinition.h"
|
||||
#include "RimGeoMechPropertyFilter.h"
|
||||
#include "RimGeoMechView.h"
|
||||
#include "RimIdenticalGridCaseGroup.h"
|
||||
#include "RimIntersection.h"
|
||||
#include "RimIntersectionBox.h"
|
||||
#include "RimSimWellFracture.h"
|
||||
#include "RimSimWellFractureCollection.h"
|
||||
#include "RimSummaryCurve.h"
|
||||
#include "RimSummaryCurveFilter.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimViewController.h"
|
||||
#include "RimWellLogCurve.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellLogTrack.h"
|
||||
#include "RimWellPathFracture.h"
|
||||
#include "RimWellPathFractureCollection.h"
|
||||
|
||||
#include "cafCmdExecCommandManager.h"
|
||||
#include "cafCmdSelectionHelper.h"
|
||||
@@ -32,27 +53,6 @@
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
#include <QAction>
|
||||
#include "RimGeoMechView.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimIdenticalGridCaseGroup.h"
|
||||
#include "RimEclipseInputProperty.h"
|
||||
#include "RimCellRangeFilter.h"
|
||||
#include "RimEclipsePropertyFilter.h"
|
||||
#include "RimFracture.h"
|
||||
#include "RimFractureCollection.h"
|
||||
#include "RimFractureDefinition.h"
|
||||
#include "RimGeoMechPropertyFilter.h"
|
||||
#include "RimViewController.h"
|
||||
#include "RimWellLogCurve.h"
|
||||
#include "RimSimWellFracture.h"
|
||||
#include "RimSimWellFractureCollection.h"
|
||||
#include "RimSummaryCurve.h"
|
||||
#include "RimSummaryCurveFilter.h"
|
||||
#include "RimIntersection.h"
|
||||
#include "RimIntersectionBox.h"
|
||||
#include "RimFormationNames.h"
|
||||
#include "RimFormationNamesCollection.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
|
||||
namespace caf
|
||||
{
|
||||
@@ -77,8 +77,8 @@ bool isDeletable(PdmUiItem * uiItem)
|
||||
if (dynamic_cast<RimIntersectionBox*>(uiItem)) return true;
|
||||
if (dynamic_cast<RimFormationNames*>(uiItem)) return true;
|
||||
if (dynamic_cast<RimFormationNamesCollection*>(uiItem)) return true;
|
||||
if (dynamic_cast<RimFractureCollection*>(uiItem)) return true;
|
||||
if (dynamic_cast<RimFracture*>(uiItem)) return true;
|
||||
if (dynamic_cast<RimWellPathFractureCollection*>(uiItem)) return true;
|
||||
if (dynamic_cast<RimWellPathFracture*>(uiItem)) return true;
|
||||
if (dynamic_cast<RimFractureDefinition*>(uiItem)) return true;
|
||||
if (dynamic_cast<RimSimWellFractureCollection*>(uiItem)) return true;
|
||||
if (dynamic_cast<RimSimWellFracture*>(uiItem)) return true;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "RicFracturesDeleteAllFeature.h"
|
||||
|
||||
#include "RimFractureCollection.h"
|
||||
#include "RimWellPathFractureCollection.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
@@ -28,15 +28,15 @@
|
||||
namespace caf
|
||||
{
|
||||
|
||||
CAF_CMD_SOURCE_INIT(RicFracturesDeleteAllFeature, "RicFracturesDeleteAllFeature");
|
||||
CAF_CMD_SOURCE_INIT(RicWellPathFracturesDeleteAllFeature, "RicFracturesDeleteAllFeature");
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicFracturesDeleteAllFeature::isCommandEnabled()
|
||||
bool RicWellPathFracturesDeleteAllFeature::isCommandEnabled()
|
||||
{
|
||||
std::vector<RimFractureCollection*> objects;
|
||||
std::vector<RimWellPathFractureCollection*> objects;
|
||||
caf::SelectionManager::instance()->objectsByType(&objects);
|
||||
|
||||
if (objects.size() == 1)
|
||||
@@ -50,12 +50,12 @@ bool RicFracturesDeleteAllFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicFracturesDeleteAllFeature::onActionTriggered(bool isChecked)
|
||||
void RicWellPathFracturesDeleteAllFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
std::vector<RimFractureCollection*> objects;
|
||||
std::vector<RimWellPathFractureCollection*> objects;
|
||||
caf::SelectionManager::instance()->objectsByType(&objects);
|
||||
|
||||
RimFractureCollection* fractureCollection = nullptr;
|
||||
RimWellPathFractureCollection* fractureCollection = nullptr;
|
||||
if (objects.size() > 0)
|
||||
{
|
||||
fractureCollection = objects[0];
|
||||
@@ -69,7 +69,7 @@ void RicFracturesDeleteAllFeature::onActionTriggered(bool isChecked)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicFracturesDeleteAllFeature::setupActionLook(QAction* actionToSetup)
|
||||
void RicWellPathFracturesDeleteAllFeature::setupActionLook(QAction* actionToSetup)
|
||||
{
|
||||
actionToSetup->setText("Delete All Fractures");
|
||||
actionToSetup->setIcon(QIcon(":/Erase.png"));
|
||||
|
||||
@@ -21,21 +21,22 @@
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RimCase.h"
|
||||
#include "RimFracture.h"
|
||||
#include "RimFractureCollection.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimView.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "RimWellPathFracture.h"
|
||||
#include "RimWellPathFractureCollection.h"
|
||||
|
||||
#include "RiuSelectionManager.h"
|
||||
#include "RiuViewer.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
|
||||
#include "RimWellPath.h"
|
||||
#include "RimView.h"
|
||||
#include "cvfVector3.h"
|
||||
#include "cvfRenderState_FF.h"
|
||||
#include "RiuViewer.h"
|
||||
#include "RiuSelectionManager.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
|
||||
@@ -69,13 +70,12 @@ void RicNewWellPathCollFractureAtPosFeature::onActionTriggered(bool isChecked)
|
||||
objHandle->firstAncestorOrThisOfType(wellPathObj);
|
||||
if (!wellPathObj) return;
|
||||
|
||||
RimFractureCollection* fractureCollection = wellPathObj->fractureCollection();
|
||||
RimWellPathFractureCollection* fractureCollection = wellPathObj->fractureCollection();
|
||||
|
||||
RimFracture* fracture = new RimFracture();
|
||||
RimWellPathFracture* fracture = new RimWellPathFracture();
|
||||
fractureCollection->fractures.push_back(fracture);
|
||||
|
||||
fracture->name = "New Well Path Fracture";
|
||||
fracture->welltype = RimFracture::FRACTURE_WELL_PATH;
|
||||
fracture->wellpath = wellPath;
|
||||
fracture->positionAtWellpath = wellPathItem->m_currentPickPositionInDomainCoords;
|
||||
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RimCase.h"
|
||||
#include "RimFracture.h"
|
||||
#include "RimFractureCollection.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
#include "RimWellPathFracture.h"
|
||||
#include "RimWellPathFractureCollection.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
@@ -49,16 +49,14 @@ void RicNewWellPathCollFractureFeature::onActionTriggered(bool isChecked)
|
||||
RimWellPathCollection* wellPathColl = nullptr;
|
||||
objHandle->firstAncestorOrThisOfType(wellPathColl);
|
||||
|
||||
RimFractureCollection* fractureCollection = nullptr;
|
||||
RimWellPathFractureCollection* fractureCollection = nullptr;
|
||||
objHandle->firstAncestorOrThisOfType(fractureCollection);
|
||||
CVF_ASSERT(fractureCollection);
|
||||
|
||||
RimFracture* fracture = new RimFracture();
|
||||
RimWellPathFracture* fracture = new RimWellPathFracture();
|
||||
fractureCollection->fractures.push_back(fracture);
|
||||
|
||||
fracture->name = "New Well Path Fracture";
|
||||
fracture->welltype = RimFracture::FRACTURE_WELL_PATH;
|
||||
//TODO set all relevant defaults...
|
||||
|
||||
fractureCollection->updateConnectedEditors();
|
||||
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2015- Statoil ASA
|
||||
// Copyright (C) 2015- Ceetron Solutions AS
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RicWellPathFracturesDeleteAllFeature.h"
|
||||
|
||||
#include "RimWellPathFractureCollection.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
namespace caf
|
||||
{
|
||||
|
||||
CAF_CMD_SOURCE_INIT(RicWellPathFracturesDeleteAllFeature, "RicWellPathFracturesDeleteAllFeature");
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicWellPathFracturesDeleteAllFeature::isCommandEnabled()
|
||||
{
|
||||
std::vector<RimWellPathFractureCollection*> objects;
|
||||
caf::SelectionManager::instance()->objectsByType(&objects);
|
||||
|
||||
if (objects.size() == 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathFracturesDeleteAllFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
std::vector<RimWellPathFractureCollection*> objects;
|
||||
caf::SelectionManager::instance()->objectsByType(&objects);
|
||||
|
||||
RimWellPathFractureCollection* fractureCollection = nullptr;
|
||||
if (objects.size() > 0)
|
||||
{
|
||||
fractureCollection = objects[0];
|
||||
}
|
||||
|
||||
fractureCollection->deleteFractures();
|
||||
|
||||
fractureCollection->uiCapability()->updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathFracturesDeleteAllFeature::setupActionLook(QAction* actionToSetup)
|
||||
{
|
||||
actionToSetup->setText("Delete All Fractures");
|
||||
actionToSetup->setIcon(QIcon(":/Erase.png"));
|
||||
}
|
||||
|
||||
} // end namespace caf
|
||||
@@ -27,7 +27,7 @@ namespace caf
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicFracturesDeleteAllFeature : public CmdFeature
|
||||
class RicWellPathFracturesDeleteAllFeature : public CmdFeature
|
||||
{
|
||||
CAF_CMD_HEADER_INIT;
|
||||
protected:
|
||||
Reference in New Issue
Block a user