mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6132 Fracture Model: Add menu item to create fracture model at depth in 3D View.
This commit is contained in:
parent
b511f92ee2
commit
fd91eaf2be
@ -13,6 +13,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RicNewStimPlanFractureTemplateFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewWellPathFractureAtPosFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewWellPathFractureFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewFractureModelFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewWellPathFractureModelAtPosFeature.h
|
||||
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicCreateMultipleFracturesFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicCreateMultipleFracturesOptionItemUi.h
|
||||
@ -35,6 +36,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RicNewStimPlanFractureTemplateFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewWellPathFractureAtPosFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewWellPathFractureFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewFractureModelFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewWellPathFractureModelAtPosFeature.cpp
|
||||
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicCreateMultipleFracturesFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicCreateMultipleFracturesOptionItemUi.cpp
|
||||
|
@ -47,7 +47,8 @@ CAF_CMD_SOURCE_INIT( RicNewFractureModelFeature, "RicNewFractureModelFeature" );
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFractureModel* RicNewFractureModelFeature::addFractureModel( RimWellPath* wellPath,
|
||||
RimWellPathCollection* wellPathCollection )
|
||||
RimWellPathCollection* wellPathCollection,
|
||||
double measuredDepth )
|
||||
{
|
||||
CVF_ASSERT( wellPath );
|
||||
|
||||
@ -82,6 +83,11 @@ RimFractureModel* RicNewFractureModelFeature::addFractureModel( RimWellPath*
|
||||
project->updateAllRequiredEditors();
|
||||
}
|
||||
|
||||
if ( measuredDepth > 0.0 )
|
||||
{
|
||||
fractureModel->setMD( measuredDepth );
|
||||
}
|
||||
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( fractureModel );
|
||||
return fractureModel;
|
||||
}
|
||||
|
@ -33,7 +33,8 @@ class RicNewFractureModelFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
public:
|
||||
static RimFractureModel* addFractureModel( RimWellPath* wellPath, RimWellPathCollection* wellPathCollection );
|
||||
static RimFractureModel*
|
||||
addFractureModel( RimWellPath* wellPath, RimWellPathCollection* wellPathCollection, double measuredDepth = -1.0 );
|
||||
|
||||
protected:
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
|
@ -0,0 +1,68 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2020- Equinor ASA
|
||||
//
|
||||
// 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 "RicNewWellPathFractureModelAtPosFeature.h"
|
||||
|
||||
#include "RicNewFractureModelFeature.h"
|
||||
|
||||
#include "RimTools.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "Riu3dSelectionManager.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicNewWellPathFractureModelAtPosFeature, "RicNewWellPathFractureModelAtPosFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewWellPathFractureModelAtPosFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
Riu3dSelectionManager* riuSelManager = Riu3dSelectionManager::instance();
|
||||
RiuSelectionItem* selItem = riuSelManager->selectedItem( Riu3dSelectionManager::RUI_TEMPORARY );
|
||||
|
||||
RiuWellPathSelectionItem* wellPathItem = dynamic_cast<RiuWellPathSelectionItem*>( selItem );
|
||||
if ( !wellPathItem ) return;
|
||||
|
||||
RimWellPath* wellPath = wellPathItem->m_wellpath;
|
||||
if ( !wellPath ) return;
|
||||
|
||||
RimWellPathCollection* wellPathCollection = RimTools::wellPathCollection();
|
||||
if ( !wellPathCollection ) return;
|
||||
|
||||
RicNewFractureModelFeature::addFractureModel( wellPath, wellPathCollection, wellPathItem->m_measuredDepth );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewWellPathFractureModelAtPosFeature::setupActionLook( QAction* actionToSetup )
|
||||
{
|
||||
actionToSetup->setIcon( QIcon( ":/FractureSymbol16x16.png" ) );
|
||||
actionToSetup->setText( "Create Fracture Model at this Depth" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewWellPathFractureModelAtPosFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2020- Equinor ASA
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cafCmdFeature.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicNewWellPathFractureModelAtPosFeature : public caf::CmdFeature
|
||||
{
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
bool isCommandEnabled() override;
|
||||
};
|
@ -526,6 +526,7 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
|
||||
menuBuilder << "RicNewValveAtMeasuredDepthFeature";
|
||||
menuBuilder << "RicNewFishbonesSubsAtMeasuredDepthFeature";
|
||||
menuBuilder << "RicNewWellPathFractureAtPosFeature";
|
||||
menuBuilder << "RicNewWellPathFractureModelAtPosFeature";
|
||||
menuBuilder.addSeparator();
|
||||
menuBuilder << "RicNewWellPathAttributeFeature";
|
||||
menuBuilder << "RicWellPathImportCompletionsFileFeature";
|
||||
|
Loading…
Reference in New Issue
Block a user