mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Intersection : Support creation of multiple intersections from sim wells
This commit is contained in:
parent
051bbe6467
commit
eb02908dc7
@ -46,18 +46,18 @@ bool RicNewSimWellIntersectionFeature::isCommandEnabled()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicNewSimWellIntersectionFeature::onActionTriggered( bool isChecked )
|
void RicNewSimWellIntersectionFeature::onActionTriggered( bool isChecked )
|
||||||
{
|
{
|
||||||
std::vector<RimSimWellInView*> collection;
|
std::vector<RimSimWellInView*> simWells;
|
||||||
caf::SelectionManager::instance()->objectsByType( &collection );
|
caf::SelectionManager::instance()->objectsByType( &simWells );
|
||||||
CVF_ASSERT( collection.size() == 1 );
|
|
||||||
|
|
||||||
RimSimWellInView* simWell = collection[0];
|
for ( auto simWell : simWells )
|
||||||
|
{
|
||||||
|
RimEclipseView* eclView = nullptr;
|
||||||
|
simWell->firstAncestorOrThisOfType( eclView );
|
||||||
|
CVF_ASSERT( eclView );
|
||||||
|
|
||||||
RimEclipseView* eclView = nullptr;
|
auto* cmd = new RicNewSimWellIntersectionCmd( eclView->intersectionCollection(), simWell );
|
||||||
simWell->firstAncestorOrThisOfType( eclView );
|
caf::CmdExecCommandManager::instance()->processExecuteCommand( cmd );
|
||||||
CVF_ASSERT( eclView );
|
}
|
||||||
|
|
||||||
RicNewSimWellIntersectionCmd* cmd = new RicNewSimWellIntersectionCmd( eclView->intersectionCollection(), simWell );
|
|
||||||
caf::CmdExecCommandManager::instance()->processExecuteCommand( cmd );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -103,7 +103,7 @@ void RicNewSimWellIntersectionCmd::redo()
|
|||||||
CVF_ASSERT( m_intersectionCollection );
|
CVF_ASSERT( m_intersectionCollection );
|
||||||
CVF_ASSERT( m_simWell );
|
CVF_ASSERT( m_simWell );
|
||||||
|
|
||||||
RimExtrudedCurveIntersection* intersection = new RimExtrudedCurveIntersection();
|
auto* intersection = new RimExtrudedCurveIntersection();
|
||||||
intersection->setName( m_simWell->name );
|
intersection->setName( m_simWell->name );
|
||||||
intersection->configureForSimulationWell( m_simWell );
|
intersection->configureForSimulationWell( m_simWell );
|
||||||
|
|
||||||
|
@ -1182,6 +1182,7 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
|
|||||||
menuBuilder << "RicEclipseWellShowWellCellFenceFeature";
|
menuBuilder << "RicEclipseWellShowWellCellFenceFeature";
|
||||||
menuBuilder << "Separator";
|
menuBuilder << "Separator";
|
||||||
menuBuilder << "RicNewSimWellFractureFeature";
|
menuBuilder << "RicNewSimWellFractureFeature";
|
||||||
|
menuBuilder << "RicNewSimWellIntersectionFeature";
|
||||||
}
|
}
|
||||||
#ifdef USE_ODB_API
|
#ifdef USE_ODB_API
|
||||||
else if ( dynamic_cast<RimWellIASettings*>( firstUiItem ) )
|
else if ( dynamic_cast<RimWellIASettings*>( firstUiItem ) )
|
||||||
|
Loading…
Reference in New Issue
Block a user