mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Streamlines: New generator and UI usability improvements (#7424)
Co-authored-by: jonjenssen <jonjenssen@users.noreply.github.com> Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
This commit is contained in:
@@ -73,6 +73,7 @@
|
||||
#include "RimSimWellInView.h"
|
||||
#include "RimSimWellInViewCollection.h"
|
||||
#include "RimStimPlanColors.h"
|
||||
#include "RimStreamlineInViewCollection.h"
|
||||
#include "RimSurfaceInViewCollection.h"
|
||||
#include "RimTernaryLegendConfig.h"
|
||||
#include "RimViewController.h"
|
||||
@@ -94,6 +95,7 @@
|
||||
#include "RivReservoirSimWellsPartMgr.h"
|
||||
#include "RivReservoirViewPartMgr.h"
|
||||
#include "RivSingleCellPartGenerator.h"
|
||||
#include "RivStreamlinesPartMgr.h"
|
||||
#include "RivTernarySaturationOverlayItem.h"
|
||||
#include "RivWellFracturePartMgr.h"
|
||||
#include "RivWellPathsPartMgr.h"
|
||||
@@ -180,6 +182,10 @@ RimEclipseView::RimEclipseView()
|
||||
m_annotationCollection = new RimAnnotationInViewCollection;
|
||||
m_annotationCollection.uiCapability()->setUiHidden( true );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_streamlineCollection, "StreamlineCollection", "Streamlines", "", "", "" );
|
||||
m_streamlineCollection = new RimStreamlineInViewCollection();
|
||||
m_streamlineCollection.uiCapability()->setUiHidden( true );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_propertyFilterCollection, "PropertyFilters", "Property Filters", "", "", "" );
|
||||
m_propertyFilterCollection = new RimEclipsePropertyFilterCollection();
|
||||
m_propertyFilterCollection.uiCapability()->setUiHidden( true );
|
||||
@@ -202,6 +208,7 @@ RimEclipseView::RimEclipseView()
|
||||
|
||||
m_reservoirGridPartManager = new RivReservoirViewPartMgr( this );
|
||||
m_simWellsPartManager = new RivReservoirSimWellsPartMgr( this );
|
||||
m_streamlinesPartManager = new RivStreamlinesPartMgr( this );
|
||||
m_eclipseCase = nullptr;
|
||||
|
||||
nameConfig()->setCustomName( "3D View" );
|
||||
@@ -211,6 +218,8 @@ RimEclipseView::RimEclipseView()
|
||||
nameConfig()->hideSampleSpacingField( true );
|
||||
|
||||
setDeletable( true );
|
||||
|
||||
this->updateAnimations.connect( this, &RimEclipseView::onAnimationsUpdate );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -677,6 +686,19 @@ void RimEclipseView::onCreateDisplayModel()
|
||||
RicExportToSharingServerScheduler::instance()->scheduleUpdateSession();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseView::onAnimationsUpdate( const caf::SignalEmitter* emitter )
|
||||
{
|
||||
m_streamlinesPartManager->updateAnimation();
|
||||
|
||||
if ( viewer() )
|
||||
{
|
||||
viewer()->update();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -687,6 +709,7 @@ void RimEclipseView::onUpdateDisplayModelForCurrentTimeStep()
|
||||
// m_surfaceCollection->clearGeometry();
|
||||
|
||||
m_propertyFilterCollection()->updateFromCurrentTimeStep();
|
||||
m_streamlineCollection()->updateFromCurrentTimeStep( currentTimeStep() );
|
||||
|
||||
updateVisibleGeometries();
|
||||
|
||||
@@ -697,8 +720,8 @@ void RimEclipseView::onUpdateDisplayModelForCurrentTimeStep()
|
||||
wellCollection()->scaleWellDisks();
|
||||
|
||||
appendWellsAndFracturesToModel();
|
||||
|
||||
appendElementVectorResultToModel();
|
||||
appendStreamlinesToModel();
|
||||
|
||||
m_overlayInfoConfig()->update3DInfo();
|
||||
|
||||
@@ -999,6 +1022,29 @@ void RimEclipseView::appendElementVectorResultToModel()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseView::appendStreamlinesToModel()
|
||||
{
|
||||
if ( nativeOrOverrideViewer() )
|
||||
{
|
||||
cvf::Scene* frameScene = nativeOrOverrideViewer()->frame( m_currentTimeStep, isUsingOverrideViewer() );
|
||||
if ( frameScene )
|
||||
{
|
||||
cvf::String name = "StreamlinesModel";
|
||||
this->removeModelByName( frameScene, name );
|
||||
|
||||
cvf::ref<cvf::ModelBasicList> frameParts = new cvf::ModelBasicList;
|
||||
frameParts->setName( name );
|
||||
|
||||
m_streamlinesPartManager->appendDynamicGeometryPartsToModel( frameParts.p(), m_currentTimeStep );
|
||||
|
||||
frameScene->addModel( frameParts.p() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1468,6 +1514,11 @@ void RimEclipseView::onUpdateLegends()
|
||||
{
|
||||
m_surfaceCollection->updateLegendRangesTextAndVisibility( nativeOrOverrideViewer(), isUsingOverrideViewer() );
|
||||
}
|
||||
|
||||
if ( m_streamlineCollection )
|
||||
{
|
||||
m_streamlineCollection->updateLegendRangesTextAndVisibility( nativeOrOverrideViewer(), isUsingOverrideViewer() );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1510,7 +1561,7 @@ void RimEclipseView::setEclipseCase( RimEclipseCase* reservoir )
|
||||
cellResult()->setEclipseCase( reservoir );
|
||||
faultResultSettings()->customFaultResult()->setEclipseCase( reservoir );
|
||||
cellFilterCollection()->setCase( reservoir );
|
||||
|
||||
m_streamlineCollection->setEclipseCase( reservoir );
|
||||
cellEdgeResult()->setEclipseCase( reservoir );
|
||||
}
|
||||
|
||||
@@ -1614,6 +1665,14 @@ void RimEclipseView::syncronizeLocalAnnotationsFromGlobal()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimStreamlineInViewCollection* RimEclipseView::streamlineCollection() const
|
||||
{
|
||||
return m_streamlineCollection;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1876,7 +1935,7 @@ void RimEclipseView::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrderin
|
||||
uiTreeOrdering.add( cellEdgeResult() );
|
||||
uiTreeOrdering.add( elementVectorResult() );
|
||||
uiTreeOrdering.add( faultResultSettings() );
|
||||
|
||||
uiTreeOrdering.add( &m_streamlineCollection );
|
||||
addRequiredUiTreeObjects( uiTreeOrdering );
|
||||
|
||||
uiTreeOrdering.add( wellCollection() );
|
||||
|
||||
Reference in New Issue
Block a user