2017-05-16 10:21:36 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
2017-05-16 12:49:36 +02:00
|
|
|
// Copyright (C) 2017 Statoil ASA
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2017-05-16 10:21:36 +02:00
|
|
|
// 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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2017-05-16 10:21:36 +02:00
|
|
|
// 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.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2017-05-16 10:21:36 +02:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#include "RicNewFishbonesSubsAtMeasuredDepthFeature.h"
|
|
|
|
|
|
2025-11-07 12:26:42 +01:00
|
|
|
#include "RiaLogging.h"
|
|
|
|
|
|
|
|
|
|
#include "RicFishbonesCreateHelper.h"
|
2017-05-20 20:21:19 +02:00
|
|
|
#include "RicNewFishbonesSubsFeature.h"
|
2017-06-07 11:57:25 +02:00
|
|
|
#include "WellPathCommands/RicWellPathsUnitSystemSettingsImpl.h"
|
2017-05-20 20:21:19 +02:00
|
|
|
|
2021-02-26 14:27:59 +01:00
|
|
|
#include "RimFishbones.h"
|
2017-05-19 15:44:32 +02:00
|
|
|
#include "RimFishbonesCollection.h"
|
2017-05-16 10:21:36 +02:00
|
|
|
#include "RimProject.h"
|
|
|
|
|
#include "RimWellPath.h"
|
|
|
|
|
|
2018-02-27 15:21:14 +01:00
|
|
|
#include "Riu3DMainWindowTools.h"
|
2018-11-30 12:53:46 +01:00
|
|
|
#include "Riu3dSelectionManager.h"
|
2017-05-16 10:21:36 +02:00
|
|
|
|
|
|
|
|
#include "cafSelectionManager.h"
|
|
|
|
|
|
|
|
|
|
#include <QAction>
|
2023-10-19 13:02:53 +02:00
|
|
|
#include <QMenu>
|
2017-05-16 10:21:36 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
CAF_CMD_SOURCE_INIT( RicNewFishbonesSubsAtMeasuredDepthFeature, "RicNewFishbonesSubsAtMeasuredDepthFeature" );
|
2017-05-16 10:21:36 +02:00
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2017-05-16 10:21:36 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
void RicNewFishbonesSubsAtMeasuredDepthFeature::onActionTriggered( bool isChecked )
|
2023-10-19 13:02:53 +02:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
void RicNewFishbonesSubsAtMeasuredDepthFeature::setupActionLook( QAction* actionToSetup )
|
|
|
|
|
{
|
2025-11-07 12:26:42 +01:00
|
|
|
RicFishbonesCreateHelper::setupFishbonesSubMenu( actionToSetup, "Create Fishbones at this Depth" );
|
2023-10-19 13:02:53 +02:00
|
|
|
|
2025-11-07 12:26:42 +01:00
|
|
|
QMenu* subMenu = actionToSetup->menu();
|
|
|
|
|
auto actions = subMenu->actions();
|
2023-10-19 13:02:53 +02:00
|
|
|
|
2025-11-07 12:26:42 +01:00
|
|
|
if ( actions.size() < 3 )
|
2023-10-19 13:02:53 +02:00
|
|
|
{
|
2025-11-07 12:26:42 +01:00
|
|
|
RiaLogging::error( "RicNewFishbonesSubsAtMeasuredDepthFeature::setupActionLook: Unexpected number of actions in submenu." );
|
|
|
|
|
return;
|
2023-10-19 13:02:53 +02:00
|
|
|
}
|
|
|
|
|
|
2025-11-07 12:26:42 +01:00
|
|
|
connect( actions[0], &QAction::triggered, this, &RicNewFishbonesSubsAtMeasuredDepthFeature::onDrillingStandard );
|
|
|
|
|
connect( actions[1], &QAction::triggered, this, &RicNewFishbonesSubsAtMeasuredDepthFeature::onDrillingExtended );
|
|
|
|
|
connect( actions[2], &QAction::triggered, this, &RicNewFishbonesSubsAtMeasuredDepthFeature::onAcidJetting );
|
2023-10-19 13:02:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
bool RicNewFishbonesSubsAtMeasuredDepthFeature::isCommandEnabled() const
|
|
|
|
|
{
|
|
|
|
|
return RiuWellPathSelectionItem::wellPathSelectionItem() != nullptr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2025-03-25 08:31:08 +01:00
|
|
|
void RicNewFishbonesSubsAtMeasuredDepthFeature::createFishbones( const RimFishbonesDefines::RicFishbonesSystemParameters& customParameters )
|
2017-05-16 10:21:36 +02:00
|
|
|
{
|
2021-06-29 09:59:45 +02:00
|
|
|
RiuWellPathSelectionItem* wellPathSelItem = RiuWellPathSelectionItem::wellPathSelectionItem();
|
2019-09-06 10:40:57 +02:00
|
|
|
CVF_ASSERT( wellPathSelItem );
|
2017-05-16 10:21:36 +02:00
|
|
|
|
|
|
|
|
RimWellPath* wellPath = wellPathSelItem->m_wellpath;
|
2019-09-06 10:40:57 +02:00
|
|
|
CVF_ASSERT( wellPath );
|
2017-06-07 11:57:25 +02:00
|
|
|
|
2025-11-07 12:26:42 +01:00
|
|
|
RicFishbonesCreateHelper::createAndConfigureFishbones( wellPath->fishbonesCollection(), customParameters, wellPathSelItem->m_measuredDepth );
|
2017-05-16 10:21:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2017-05-16 10:21:36 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2023-10-19 13:02:53 +02:00
|
|
|
void RicNewFishbonesSubsAtMeasuredDepthFeature::onDrillingStandard()
|
2017-05-16 10:21:36 +02:00
|
|
|
{
|
2025-03-25 08:31:08 +01:00
|
|
|
createFishbones( RimFishbonesDefines::drillingStandardParameters() );
|
2017-05-16 10:21:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2017-05-16 10:21:36 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2023-10-19 13:02:53 +02:00
|
|
|
void RicNewFishbonesSubsAtMeasuredDepthFeature::onDrillingExtended()
|
2017-05-16 10:21:36 +02:00
|
|
|
{
|
2025-03-25 08:31:08 +01:00
|
|
|
createFishbones( RimFishbonesDefines::drillingExtendedParameters() );
|
2023-10-19 13:02:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
void RicNewFishbonesSubsAtMeasuredDepthFeature::onAcidJetting()
|
|
|
|
|
{
|
2025-03-25 08:31:08 +01:00
|
|
|
createFishbones( RimFishbonesDefines::acidJettingParameters() );
|
2017-05-16 10:21:36 +02:00
|
|
|
}
|