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