2015-11-18 09:15:13 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2015- Statoil ASA
|
|
|
|
|
// Copyright (C) 2015- Ceetron Solutions AS
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2015-11-18 09:15:13 +01: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
|
|
|
//
|
2015-11-18 09:15:13 +01: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>
|
2015-11-18 09:15:13 +01:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
2016-09-21 10:52:16 +02:00
|
|
|
#include "RimIntersectionCollection.h"
|
2015-11-18 09:15:13 +01:00
|
|
|
|
2018-02-01 17:45:22 +01:00
|
|
|
#include "Rim2dIntersectionView.h"
|
2018-03-02 11:25:47 +01:00
|
|
|
#include "Rim2dIntersectionViewCollection.h"
|
2018-01-23 14:23:28 +01:00
|
|
|
#include "Rim3dView.h"
|
2019-11-26 13:56:02 +01:00
|
|
|
#include "RimBoxIntersection.h"
|
2018-01-23 14:23:28 +01:00
|
|
|
#include "RimCase.h"
|
2019-11-26 11:35:21 +01:00
|
|
|
#include "RimExtrudedCurveIntersection.h"
|
2017-10-13 09:29:42 +02:00
|
|
|
#include "RimSimWellInView.h"
|
2015-11-18 09:15:13 +01:00
|
|
|
|
2018-02-27 15:53:33 +01:00
|
|
|
#include "Riu3DMainWindowTools.h"
|
2016-07-27 08:05:44 +02:00
|
|
|
|
2019-11-26 13:14:55 +01:00
|
|
|
#include "RivBoxIntersectionPartMgr.h"
|
2019-11-26 11:51:54 +01:00
|
|
|
#include "RivExtrudedCurveIntersectionPartMgr.h"
|
2016-07-27 08:05:44 +02:00
|
|
|
|
2019-11-29 09:29:17 +01:00
|
|
|
#include "RimIntersectionResultDefinition.h"
|
2019-11-14 13:59:31 +01:00
|
|
|
#include "cvfModelBasicList.h"
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
CAF_PDM_SOURCE_INIT( RimIntersectionCollection, "CrossSectionCollection" );
|
2015-11-18 09:15:13 +01:00
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2015-11-18 09:15:13 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2016-09-21 10:52:16 +02:00
|
|
|
RimIntersectionCollection::RimIntersectionCollection()
|
2015-11-18 09:15:13 +01:00
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
CAF_PDM_InitObject( "Intersections", ":/CrossSections16x16.png", "", "" );
|
2015-11-18 09:15:13 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_intersections, "CrossSections", "Intersections", "", "", "" );
|
|
|
|
|
m_intersections.uiCapability()->setUiHidden( true );
|
2015-11-18 09:15:13 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_intersectionBoxes, "IntersectionBoxes", "IntersectionBoxes", "", "", "" );
|
|
|
|
|
m_intersectionBoxes.uiCapability()->setUiHidden( true );
|
2016-09-30 08:40:46 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
CAF_PDM_InitField( &isActive, "Active", true, "Active", "", "", "" );
|
|
|
|
|
isActive.uiCapability()->setUiHidden( true );
|
2015-11-18 09:15:13 +01:00
|
|
|
}
|
|
|
|
|
|
2015-12-03 08:26:38 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2015-12-03 08:26:38 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2016-09-21 10:52:16 +02:00
|
|
|
RimIntersectionCollection::~RimIntersectionCollection()
|
2015-12-03 08:26:38 +01:00
|
|
|
{
|
2016-10-25 10:03:55 +02:00
|
|
|
m_intersections.deleteAllChildObjects();
|
2016-09-30 08:40:46 +02:00
|
|
|
m_intersectionBoxes.deleteAllChildObjects();
|
2015-12-03 08:26:38 +01:00
|
|
|
}
|
|
|
|
|
|
2015-11-18 09:15:13 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2015-11-18 09:15:13 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2016-09-21 10:52:16 +02:00
|
|
|
caf::PdmFieldHandle* RimIntersectionCollection::objectToggleField()
|
2015-11-18 09:15:13 +01:00
|
|
|
{
|
|
|
|
|
return &isActive;
|
|
|
|
|
}
|
2015-11-19 11:41:16 +01:00
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2015-11-19 11:41:16 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2016-09-21 10:52:16 +02:00
|
|
|
void RimIntersectionCollection::applySingleColorEffect()
|
2015-11-19 11:41:16 +01:00
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
if ( !this->isActive() ) return;
|
2016-09-28 09:04:21 +02:00
|
|
|
|
2019-11-26 11:35:21 +01:00
|
|
|
for ( RimExtrudedCurveIntersection* cs : m_intersections )
|
2015-11-19 11:41:16 +01:00
|
|
|
{
|
2019-11-12 15:10:41 +01:00
|
|
|
if ( cs->isActive() )
|
2015-11-22 15:07:34 +01:00
|
|
|
{
|
2016-10-25 10:03:55 +02:00
|
|
|
cs->intersectionPartMgr()->applySingleColorEffect();
|
2015-11-22 15:07:34 +01:00
|
|
|
}
|
2015-11-19 11:41:16 +01:00
|
|
|
}
|
2016-09-30 08:40:46 +02:00
|
|
|
|
2019-11-26 13:14:55 +01:00
|
|
|
for ( RimBoxIntersection* cs : m_intersectionBoxes )
|
2016-09-30 08:40:46 +02:00
|
|
|
{
|
2019-11-12 16:58:26 +01:00
|
|
|
if ( cs->isActive() )
|
2016-09-30 08:40:46 +02:00
|
|
|
{
|
|
|
|
|
cs->intersectionBoxPartMgr()->applySingleColorEffect();
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-11-19 11:41:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2015-11-19 11:41:16 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-11-29 09:29:17 +01:00
|
|
|
void RimIntersectionCollection::updateCellResultColor( bool hasGeneralCellResult, size_t timeStepIndex )
|
2015-11-19 11:41:16 +01:00
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
if ( !this->isActive() ) return;
|
2016-09-28 09:04:21 +02:00
|
|
|
|
2019-11-26 11:35:21 +01:00
|
|
|
for ( RimExtrudedCurveIntersection* cs : m_intersections )
|
2015-11-19 11:41:16 +01:00
|
|
|
{
|
2019-11-12 15:10:41 +01:00
|
|
|
if ( cs->isActive() )
|
2015-11-22 15:07:34 +01:00
|
|
|
{
|
2019-11-29 09:29:17 +01:00
|
|
|
bool hasSeparateInterResult = cs->activeSeparateResultDefinition() &&
|
|
|
|
|
cs->activeSeparateResultDefinition()->hasResult();
|
|
|
|
|
if ( hasSeparateInterResult || hasGeneralCellResult )
|
|
|
|
|
{
|
|
|
|
|
cs->intersectionPartMgr()->updateCellResultColor( timeStepIndex, nullptr, nullptr );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
cs->intersectionPartMgr()->applySingleColorEffect();
|
|
|
|
|
}
|
2015-11-22 15:07:34 +01:00
|
|
|
}
|
2015-11-19 11:41:16 +01:00
|
|
|
}
|
2016-09-30 08:40:46 +02:00
|
|
|
|
2019-11-26 13:14:55 +01:00
|
|
|
for ( RimBoxIntersection* cs : m_intersectionBoxes )
|
2016-09-30 08:40:46 +02:00
|
|
|
{
|
2019-11-12 16:58:26 +01:00
|
|
|
if ( cs->isActive() )
|
2016-09-30 08:40:46 +02:00
|
|
|
{
|
2019-11-29 09:29:17 +01:00
|
|
|
bool hasSeparateInterResult = cs->activeSeparateResultDefinition() &&
|
|
|
|
|
cs->activeSeparateResultDefinition()->hasResult();
|
|
|
|
|
if ( hasSeparateInterResult || hasGeneralCellResult )
|
|
|
|
|
{
|
|
|
|
|
cs->intersectionBoxPartMgr()->updateCellResultColor( timeStepIndex );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
cs->intersectionBoxPartMgr()->applySingleColorEffect();
|
|
|
|
|
}
|
2016-09-30 08:40:46 +02:00
|
|
|
}
|
|
|
|
|
}
|
2015-11-19 11:41:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2015-11-19 11:41:16 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
void RimIntersectionCollection::appendPartsToModel( Rim3dView& view,
|
|
|
|
|
cvf::ModelBasicList* model,
|
|
|
|
|
cvf::Transform* scaleTransform )
|
2015-11-19 11:41:16 +01:00
|
|
|
{
|
2019-11-12 15:10:41 +01:00
|
|
|
if ( !isActive() ) return;
|
2015-11-19 18:56:23 +01:00
|
|
|
|
2019-11-26 11:35:21 +01:00
|
|
|
for ( RimExtrudedCurveIntersection* cs : m_intersections )
|
2015-11-19 11:41:16 +01:00
|
|
|
{
|
2019-11-12 15:10:41 +01:00
|
|
|
if ( cs->isActive() )
|
2015-11-19 11:41:16 +01:00
|
|
|
{
|
2020-01-14 12:36:38 +01:00
|
|
|
cs->intersectionPartMgr()->appendIntersectionFacesToModel( model, scaleTransform );
|
2019-09-06 10:40:57 +02:00
|
|
|
cs->intersectionPartMgr()->appendMeshLinePartsToModel( model, scaleTransform );
|
|
|
|
|
cs->intersectionPartMgr()->appendPolylinePartsToModel( view, model, scaleTransform );
|
2015-11-19 11:41:16 +01:00
|
|
|
}
|
|
|
|
|
}
|
2016-09-30 08:40:46 +02:00
|
|
|
|
2019-11-26 13:14:55 +01:00
|
|
|
for ( RimBoxIntersection* cs : m_intersectionBoxes )
|
2016-09-30 08:40:46 +02:00
|
|
|
{
|
2019-11-12 15:10:41 +01:00
|
|
|
if ( cs->isActive() )
|
2016-09-30 08:40:46 +02:00
|
|
|
{
|
2019-11-26 12:30:44 +01:00
|
|
|
cs->intersectionBoxPartMgr()->appendNativeIntersectionFacesToModel( model, scaleTransform );
|
2019-09-06 10:40:57 +02:00
|
|
|
cs->intersectionBoxPartMgr()->appendMeshLinePartsToModel( model, scaleTransform );
|
2016-10-03 14:26:46 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
if ( cs->show3dManipulator() )
|
2016-10-03 14:26:46 +02:00
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
cs->appendManipulatorPartsToModel( model );
|
2016-10-03 14:26:46 +02:00
|
|
|
}
|
2016-09-30 08:40:46 +02:00
|
|
|
}
|
|
|
|
|
}
|
2019-11-14 13:59:31 +01:00
|
|
|
|
|
|
|
|
model->updateBoundingBoxesRecursive();
|
2015-11-19 11:41:16 +01:00
|
|
|
}
|
2015-11-19 13:40:45 +01:00
|
|
|
|
2018-11-06 10:09:30 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2018-11-06 10:09:30 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
void RimIntersectionCollection::rebuildGeometry()
|
|
|
|
|
{
|
2019-11-26 11:35:21 +01:00
|
|
|
for ( RimExtrudedCurveIntersection* intersection : m_intersections )
|
2018-11-06 10:09:30 +01:00
|
|
|
{
|
|
|
|
|
intersection->rebuildGeometry();
|
|
|
|
|
}
|
|
|
|
|
|
2019-11-26 13:14:55 +01:00
|
|
|
for ( RimBoxIntersection* intersectionBox : m_intersectionBoxes )
|
2018-11-06 10:09:30 +01:00
|
|
|
{
|
|
|
|
|
intersectionBox->rebuildGeometry();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-02-05 13:23:44 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2018-02-05 13:23:44 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-11-26 11:35:21 +01:00
|
|
|
std::vector<RimExtrudedCurveIntersection*> RimIntersectionCollection::intersections() const
|
2018-02-05 13:23:44 +01:00
|
|
|
{
|
|
|
|
|
return m_intersections.childObjects();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2018-02-05 13:23:44 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-11-26 13:14:55 +01:00
|
|
|
std::vector<RimBoxIntersection*> RimIntersectionCollection::intersectionBoxes() const
|
2018-02-05 13:23:44 +01:00
|
|
|
{
|
|
|
|
|
return m_intersectionBoxes.childObjects();
|
|
|
|
|
}
|
|
|
|
|
|
2018-03-02 11:25:47 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2018-03-02 11:25:47 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
void RimIntersectionCollection::recomputeSimWellBranchData()
|
|
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
for ( const auto& intersection : intersections() )
|
2018-03-02 11:25:47 +01:00
|
|
|
{
|
|
|
|
|
intersection->recomputeSimulationWellBranchData();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-11-19 13:40:45 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2015-11-19 13:40:45 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-11-26 13:56:02 +01:00
|
|
|
void RimIntersectionCollection::appendIntersectionAndUpdate( RimExtrudedCurveIntersection* intersection,
|
|
|
|
|
bool allowActiveViewChange )
|
2015-11-19 13:40:45 +01:00
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
m_intersections.push_back( intersection );
|
2015-11-19 13:40:45 +01:00
|
|
|
|
2018-01-23 14:23:28 +01:00
|
|
|
syncronize2dIntersectionViews();
|
|
|
|
|
|
2015-11-19 13:40:45 +01:00
|
|
|
updateConnectedEditors();
|
2019-10-24 12:46:07 +02:00
|
|
|
Riu3DMainWindowTools::selectAsCurrentItem( intersection, allowActiveViewChange );
|
2015-11-19 13:40:45 +01:00
|
|
|
|
2018-01-24 11:30:39 +01:00
|
|
|
Rim3dView* rimView = nullptr;
|
2019-09-06 10:40:57 +02:00
|
|
|
firstAncestorOrThisOfType( rimView );
|
|
|
|
|
if ( rimView )
|
2015-11-19 13:40:45 +01:00
|
|
|
{
|
|
|
|
|
rimView->scheduleCreateDisplayModelAndRedraw();
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-11-19 18:56:23 +01:00
|
|
|
|
2018-01-24 11:30:39 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2018-01-24 11:30:39 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-11-26 11:35:21 +01:00
|
|
|
void RimIntersectionCollection::appendIntersectionNoUpdate( RimExtrudedCurveIntersection* intersection )
|
2018-01-24 11:30:39 +01:00
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
m_intersections.push_back( intersection );
|
2018-01-24 11:30:39 +01:00
|
|
|
}
|
|
|
|
|
|
2018-01-23 14:23:28 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2018-01-23 14:23:28 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
void RimIntersectionCollection::syncronize2dIntersectionViews()
|
|
|
|
|
{
|
|
|
|
|
RimCase* ownerCase = nullptr;
|
2019-09-06 10:40:57 +02:00
|
|
|
this->firstAncestorOrThisOfTypeAsserted( ownerCase );
|
|
|
|
|
ownerCase->intersectionViewCollection()->syncFromExistingIntersections( true );
|
2018-01-23 14:23:28 +01:00
|
|
|
}
|
|
|
|
|
|
2018-02-01 17:45:22 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2018-02-01 17:45:22 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
void RimIntersectionCollection::scheduleCreateDisplayModelAndRedraw2dIntersectionViews()
|
|
|
|
|
{
|
2019-11-26 11:35:21 +01:00
|
|
|
for ( RimExtrudedCurveIntersection* isection : m_intersections )
|
2018-02-01 17:45:22 +01:00
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
if ( isection->correspondingIntersectionView() )
|
2018-10-23 16:32:40 +02:00
|
|
|
{
|
|
|
|
|
isection->correspondingIntersectionView()->scheduleCreateDisplayModelAndRedraw();
|
|
|
|
|
}
|
2018-02-01 17:45:22 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-09-30 08:40:46 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2016-09-30 08:40:46 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-11-26 13:14:55 +01:00
|
|
|
void RimIntersectionCollection::appendIntersectionBoxAndUpdate( RimBoxIntersection* intersectionBox )
|
2016-09-30 08:40:46 +02:00
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
m_intersectionBoxes.push_back( intersectionBox );
|
2018-01-24 10:48:23 +01:00
|
|
|
|
|
|
|
|
updateConnectedEditors();
|
2019-10-17 16:39:24 +02:00
|
|
|
Riu3DMainWindowTools::selectAsCurrentItem( intersectionBox, false );
|
2018-01-24 10:48:23 +01:00
|
|
|
|
2018-01-24 11:30:39 +01:00
|
|
|
Rim3dView* rimView = nullptr;
|
2019-09-06 10:40:57 +02:00
|
|
|
firstAncestorOrThisOfType( rimView );
|
|
|
|
|
if ( rimView )
|
2018-01-24 10:48:23 +01:00
|
|
|
{
|
|
|
|
|
rimView->scheduleCreateDisplayModelAndRedraw();
|
|
|
|
|
}
|
2016-09-30 08:40:46 +02:00
|
|
|
}
|
|
|
|
|
|
2018-01-24 11:30:39 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2018-01-24 11:30:39 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-11-26 13:14:55 +01:00
|
|
|
void RimIntersectionCollection::appendIntersectionBoxNoUpdate( RimBoxIntersection* intersectionBox )
|
2018-01-24 11:30:39 +01:00
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
m_intersectionBoxes.push_back( intersectionBox );
|
2018-01-24 11:30:39 +01:00
|
|
|
}
|
|
|
|
|
|
2015-11-19 18:56:23 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2015-11-19 18:56:23 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
void RimIntersectionCollection::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
|
|
|
|
const QVariant& oldValue,
|
|
|
|
|
const QVariant& newValue )
|
2015-11-19 18:56:23 +01:00
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
if ( changedField == &isActive )
|
2015-11-19 18:56:23 +01:00
|
|
|
{
|
2019-05-06 10:36:05 +02:00
|
|
|
updateUiIconFromToggleField();
|
|
|
|
|
|
2018-01-24 11:30:39 +01:00
|
|
|
Rim3dView* rimView = nullptr;
|
2019-09-06 10:40:57 +02:00
|
|
|
firstAncestorOrThisOfType( rimView );
|
|
|
|
|
if ( rimView )
|
2015-11-19 18:56:23 +01:00
|
|
|
{
|
|
|
|
|
rimView->scheduleCreateDisplayModelAndRedraw();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2016-07-27 08:05:44 +02:00
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2016-07-27 08:05:44 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
bool RimIntersectionCollection::hasActiveIntersectionForSimulationWell( const RimSimWellInView* simWell ) const
|
2016-07-27 08:05:44 +02:00
|
|
|
{
|
2019-11-12 15:10:41 +01:00
|
|
|
if ( !isActive() ) return false;
|
2016-07-27 08:05:44 +02:00
|
|
|
|
2019-11-26 11:35:21 +01:00
|
|
|
for ( RimExtrudedCurveIntersection* cs : m_intersections )
|
2016-07-27 08:05:44 +02:00
|
|
|
{
|
2019-11-26 13:56:02 +01:00
|
|
|
if ( cs->isActive() && cs->type() == RimExtrudedCurveIntersection::CS_SIMULATION_WELL &&
|
|
|
|
|
cs->simulationWell() == simWell )
|
2016-07-27 08:05:44 +02:00
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2016-10-25 09:50:33 +02:00
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2016-10-25 09:50:33 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
void RimIntersectionCollection::updateIntersectionBoxGeometry()
|
|
|
|
|
{
|
2019-11-26 13:14:55 +01:00
|
|
|
for ( RimBoxIntersection* intersectionBox : m_intersectionBoxes )
|
2016-10-25 09:50:33 +02:00
|
|
|
{
|
|
|
|
|
intersectionBox->updateBoxManipulatorGeometry();
|
|
|
|
|
}
|
|
|
|
|
}
|