mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fishbones : Add support for creating three different parameter sets
This commit is contained in:
parent
bb3380b216
commit
bc7ec5f40c
@ -32,6 +32,7 @@
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QMenu>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicNewFishbonesSubsAtMeasuredDepthFeature, "RicNewFishbonesSubsAtMeasuredDepthFeature" );
|
||||
|
||||
@ -39,6 +40,52 @@ CAF_CMD_SOURCE_INIT( RicNewFishbonesSubsAtMeasuredDepthFeature, "RicNewFishbones
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewFishbonesSubsAtMeasuredDepthFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewFishbonesSubsAtMeasuredDepthFeature::setupActionLook( QAction* actionToSetup )
|
||||
{
|
||||
auto icon = QIcon( ":/FishBoneGroup16x16.png" );
|
||||
actionToSetup->setIcon( icon );
|
||||
actionToSetup->setText( "Create Fishbones at this Depth" );
|
||||
|
||||
auto subMenu = new QMenu;
|
||||
|
||||
{
|
||||
auto action = subMenu->addAction( "Drilling Standard" );
|
||||
action->setIcon( icon );
|
||||
connect( action, &QAction::triggered, this, &RicNewFishbonesSubsAtMeasuredDepthFeature::onDrillingStandard );
|
||||
}
|
||||
|
||||
{
|
||||
auto action = subMenu->addAction( "Drilling Extended" );
|
||||
action->setIcon( icon );
|
||||
connect( action, &QAction::triggered, this, &RicNewFishbonesSubsAtMeasuredDepthFeature::onDrillingExtended );
|
||||
}
|
||||
{
|
||||
auto action = subMenu->addAction( "Acid Jetting" );
|
||||
action->setIcon( icon );
|
||||
connect( action, &QAction::triggered, this, &RicNewFishbonesSubsAtMeasuredDepthFeature::onAcidJetting );
|
||||
}
|
||||
|
||||
actionToSetup->setMenu( subMenu );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewFishbonesSubsAtMeasuredDepthFeature::isCommandEnabled() const
|
||||
{
|
||||
return RiuWellPathSelectionItem::wellPathSelectionItem() != nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewFishbonesSubsAtMeasuredDepthFeature::createFishbones( const RicFishbonesSystemParameters& customParameters )
|
||||
{
|
||||
RiuWellPathSelectionItem* wellPathSelItem = RiuWellPathSelectionItem::wellPathSelectionItem();
|
||||
CVF_ASSERT( wellPathSelItem );
|
||||
@ -48,9 +95,15 @@ void RicNewFishbonesSubsAtMeasuredDepthFeature::onActionTriggered( bool isChecke
|
||||
|
||||
if ( !RicWellPathsUnitSystemSettingsImpl::ensureHasUnitSystem( wellPath ) ) return;
|
||||
|
||||
RimFishbones* obj = new RimFishbones;
|
||||
auto* obj = new RimFishbones;
|
||||
wellPath->fishbonesCollection()->appendFishbonesSubs( obj );
|
||||
|
||||
obj->setSystemParameters( customParameters.lateralsPerSub,
|
||||
customParameters.lateralLength,
|
||||
customParameters.holeDiameter,
|
||||
customParameters.buildAngle,
|
||||
customParameters.icdsPerSub );
|
||||
|
||||
obj->setMeasuredDepthAndCount( wellPathSelItem->m_measuredDepth, 12.5, 13 );
|
||||
|
||||
RicNewFishbonesSubsFeature::adjustWellPathScaling( wellPath->fishbonesCollection() );
|
||||
@ -65,16 +118,23 @@ void RicNewFishbonesSubsAtMeasuredDepthFeature::onActionTriggered( bool isChecke
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewFishbonesSubsAtMeasuredDepthFeature::setupActionLook( QAction* actionToSetup )
|
||||
void RicNewFishbonesSubsAtMeasuredDepthFeature::onDrillingStandard()
|
||||
{
|
||||
actionToSetup->setIcon( QIcon( ":/FishBoneGroup16x16.png" ) );
|
||||
actionToSetup->setText( "Create Fishbones at this Depth" );
|
||||
createFishbones( RicNewFishbonesSubsFeature::drillingStandardParameters() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewFishbonesSubsAtMeasuredDepthFeature::isCommandEnabled() const
|
||||
void RicNewFishbonesSubsAtMeasuredDepthFeature::onDrillingExtended()
|
||||
{
|
||||
return RiuWellPathSelectionItem::wellPathSelectionItem() != nullptr;
|
||||
createFishbones( RicNewFishbonesSubsFeature::drillingExtendedParameters() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewFishbonesSubsAtMeasuredDepthFeature::onAcidJetting()
|
||||
{
|
||||
createFishbones( RicNewFishbonesSubsFeature::acidJettingParameters() );
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cafCmdFeature.h"
|
||||
#include "RicNewFishbonesSubsFeature.h"
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@ -27,8 +27,14 @@ class RicNewFishbonesSubsAtMeasuredDepthFeature : public caf::CmdFeature
|
||||
{
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
private:
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
bool isCommandEnabled() const override;
|
||||
|
||||
void createFishbones( const RicFishbonesSystemParameters& customParameters );
|
||||
|
||||
void onDrillingStandard();
|
||||
void onDrillingExtended();
|
||||
void onAcidJetting();
|
||||
};
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "RimFishbones.h"
|
||||
#include "RimFishbonesCollection.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimTools.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
#include "RimWellPathCompletions.h"
|
||||
@ -38,9 +39,9 @@
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QMenu>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "RimTools.h"
|
||||
#include <cmath>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicNewFishbonesSubsFeature, "RicNewFishbonesSubsFeature" );
|
||||
@ -49,6 +50,38 @@ CAF_CMD_SOURCE_INIT( RicNewFishbonesSubsFeature, "RicNewFishbonesSubsFeature" );
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewFishbonesSubsFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
// Nothing to do here, handled by sub menu actions
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewFishbonesSubsFeature::onDrillingStandard()
|
||||
{
|
||||
createFishbones( RicNewFishbonesSubsFeature::drillingStandardParameters() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewFishbonesSubsFeature::onDrillingExtended()
|
||||
{
|
||||
createFishbones( RicNewFishbonesSubsFeature::drillingExtendedParameters() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewFishbonesSubsFeature::onAcidJetting()
|
||||
{
|
||||
createFishbones( RicNewFishbonesSubsFeature::acidJettingParameters() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewFishbonesSubsFeature::createFishbones( const RicFishbonesSystemParameters& customParameters )
|
||||
{
|
||||
RimFishbonesCollection* fishbonesCollection = selectedFishbonesCollection();
|
||||
CVF_ASSERT( fishbonesCollection );
|
||||
@ -56,9 +89,15 @@ void RicNewFishbonesSubsFeature::onActionTriggered( bool isChecked )
|
||||
RimWellPath* wellPath = fishbonesCollection->firstAncestorOrThisOfTypeAsserted<RimWellPath>();
|
||||
if ( !RicWellPathsUnitSystemSettingsImpl::ensureHasUnitSystem( wellPath ) ) return;
|
||||
|
||||
RimFishbones* obj = new RimFishbones;
|
||||
auto* obj = new RimFishbones;
|
||||
fishbonesCollection->appendFishbonesSubs( obj );
|
||||
|
||||
obj->setSystemParameters( customParameters.lateralsPerSub,
|
||||
customParameters.lateralLength,
|
||||
customParameters.holeDiameter,
|
||||
customParameters.buildAngle,
|
||||
customParameters.icdsPerSub );
|
||||
|
||||
double wellPathTipMd = wellPath->uniqueEndMD();
|
||||
if ( wellPathTipMd != HUGE_VAL )
|
||||
{
|
||||
@ -82,6 +121,30 @@ void RicNewFishbonesSubsFeature::onActionTriggered( bool isChecked )
|
||||
proj->reloadCompletionTypeResultsInAllViews();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicFishbonesSystemParameters RicNewFishbonesSubsFeature::drillingStandardParameters()
|
||||
{
|
||||
return { .lateralsPerSub = 3, .lateralLength = 11.0, .holeDiameter = 12.5, .buildAngle = 6.0, .icdsPerSub = 3 };
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicFishbonesSystemParameters RicNewFishbonesSubsFeature::drillingExtendedParameters()
|
||||
{
|
||||
return { .lateralsPerSub = 3, .lateralLength = 18.0, .holeDiameter = 12.5, .buildAngle = 4.0, .icdsPerSub = 3 };
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicFishbonesSystemParameters RicNewFishbonesSubsFeature::acidJettingParameters()
|
||||
{
|
||||
return { .lateralsPerSub = 4, .lateralLength = 12.0, .holeDiameter = 15.0, .buildAngle = 6.0, .icdsPerSub = 4 };
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -95,7 +158,7 @@ RimFishbonesCollection* RicNewFishbonesSubsFeature::selectedFishbonesCollection(
|
||||
|
||||
caf::PdmUiItem* pdmUiItem = allSelectedItems.front();
|
||||
|
||||
caf::PdmObjectHandle* objHandle = dynamic_cast<caf::PdmObjectHandle*>( pdmUiItem );
|
||||
auto* objHandle = dynamic_cast<caf::PdmObjectHandle*>( pdmUiItem );
|
||||
if ( objHandle )
|
||||
{
|
||||
objToFind = objHandle->firstAncestorOrThisOfType<RimFishbonesCollection>();
|
||||
@ -124,8 +187,30 @@ RimFishbonesCollection* RicNewFishbonesSubsFeature::selectedFishbonesCollection(
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewFishbonesSubsFeature::setupActionLook( QAction* actionToSetup )
|
||||
{
|
||||
actionToSetup->setIcon( QIcon( ":/FishBoneGroup16x16.png" ) );
|
||||
auto icon = QIcon( ":/FishBoneGroup16x16.png" );
|
||||
actionToSetup->setIcon( icon );
|
||||
actionToSetup->setText( "Create Fishbones" );
|
||||
|
||||
auto subMenu = new QMenu;
|
||||
|
||||
{
|
||||
auto action = subMenu->addAction( "Drilling Standard" );
|
||||
action->setIcon( icon );
|
||||
connect( action, &QAction::triggered, this, &RicNewFishbonesSubsFeature::onDrillingStandard );
|
||||
}
|
||||
|
||||
{
|
||||
auto action = subMenu->addAction( "Drilling Extended" );
|
||||
action->setIcon( icon );
|
||||
connect( action, &QAction::triggered, this, &RicNewFishbonesSubsFeature::onDrillingExtended );
|
||||
}
|
||||
{
|
||||
auto action = subMenu->addAction( "Acid Jetting" );
|
||||
action->setIcon( icon );
|
||||
connect( action, &QAction::triggered, this, &RicNewFishbonesSubsFeature::onAcidJetting );
|
||||
}
|
||||
|
||||
actionToSetup->setMenu( subMenu );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -22,6 +22,16 @@
|
||||
|
||||
class RimFishbonesCollection;
|
||||
|
||||
struct RicFishbonesSystemParameters
|
||||
{
|
||||
int lateralsPerSub;
|
||||
double lateralLength;
|
||||
double holeDiameter;
|
||||
double buildAngle;
|
||||
|
||||
int icdsPerSub;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
@ -30,13 +40,22 @@ class RicNewFishbonesSubsFeature : public caf::CmdFeature
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
public:
|
||||
static RicFishbonesSystemParameters drillingStandardParameters();
|
||||
static RicFishbonesSystemParameters drillingExtendedParameters();
|
||||
static RicFishbonesSystemParameters acidJettingParameters();
|
||||
|
||||
static void adjustWellPathScaling( RimFishbonesCollection* fishboneCollection );
|
||||
|
||||
protected:
|
||||
private:
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
bool isCommandEnabled() const override;
|
||||
|
||||
private:
|
||||
void onDrillingStandard();
|
||||
void onDrillingExtended();
|
||||
void onAcidJetting();
|
||||
|
||||
void createFishbones( const RicFishbonesSystemParameters& customParameters );
|
||||
|
||||
static RimFishbonesCollection* selectedFishbonesCollection();
|
||||
};
|
||||
|
@ -171,6 +171,18 @@ void RimFishbones::setMeasuredDepthAndCount( double startMD, double spacing, int
|
||||
computeRotationAngles();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFishbones::setSystemParameters( int lateralsPerSub, double lateralLength, double holeDiameter, double buildAngle, int icdsPerSub )
|
||||
{
|
||||
m_lateralCountPerSub = lateralsPerSub;
|
||||
m_lateralLength = QString::number( lateralLength );
|
||||
m_pipeProperties->setHoleDiameter( holeDiameter );
|
||||
m_lateralBuildAngle = buildAngle;
|
||||
m_icdCount = icdsPerSub;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -73,6 +73,8 @@ public:
|
||||
|
||||
void setMeasuredDepthAndCount( double startMD, double spacing, int subCount );
|
||||
|
||||
void setSystemParameters( int lateralsPerSub, double lateralLength, double holeDiameter, double buildAngle, int icdsPerSub );
|
||||
|
||||
double measuredDepth( size_t subIndex ) const;
|
||||
double rotationAngle( size_t subIndex ) const;
|
||||
|
||||
|
@ -44,6 +44,14 @@ RimFishbonesPipeProperties::~RimFishbonesPipeProperties()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFishbonesPipeProperties::setHoleDiameter( double diameter )
|
||||
{
|
||||
m_lateralHoleDiameter = diameter;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -41,6 +41,8 @@ public:
|
||||
RimFishbonesPipeProperties();
|
||||
~RimFishbonesPipeProperties() override;
|
||||
|
||||
void setHoleDiameter( double diameter );
|
||||
|
||||
double skinFactor() const { return m_skinFactor(); }
|
||||
double holeDiameter( RiaDefines::EclipseUnitSystem unitSystem ) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user