mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-05 05:01:01 -06:00
Enable polygons in contourmaps (#12073)
* Enable polygons in ensemble statistics views and allow adding polygons in contour maps
This commit is contained in:
parent
d37bc104e4
commit
c13ce39b5e
@ -65,7 +65,7 @@ RimPolygonInView::RimPolygonInView()
|
||||
CAF_PDM_InitField( &m_selectPolygon, "SelectPolygon", false, "" );
|
||||
caf::PdmUiPushButtonEditor::configureEditorLabelHidden( &m_selectPolygon );
|
||||
|
||||
CAF_PDM_InitField( &m_handleScalingFactor, "HandleScalingFactor", 1.0, "Handle Scaling Factor" );
|
||||
CAF_PDM_InitField( &m_handleScalingFactor, "HandleScalingFactor", 2.0, "Handle Scaling Factor" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_targets, "Targets", "Targets" );
|
||||
m_targets.uiCapability()->setUiEditorTypeName( caf::PdmUiTableViewEditor::uiEditorTypeName() );
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEclipseViewCollection.h"
|
||||
#include "RimStatisticsContourMap.h"
|
||||
#include "RimStatisticsContourMapView.h"
|
||||
#include "RimWellTargetCandidatesGenerator.h"
|
||||
|
||||
#include "cafCmdFeatureMenuBuilder.h"
|
||||
@ -184,6 +185,30 @@ RimEclipseViewCollection* RimEclipseCaseEnsemble::viewCollection() const
|
||||
return m_viewCollection;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimEclipseView*> RimEclipseCaseEnsemble::allViews() const
|
||||
{
|
||||
std::vector<RimEclipseView*> retList;
|
||||
if ( !viewCollection() ) return retList;
|
||||
|
||||
for ( auto view : viewCollection()->views() )
|
||||
{
|
||||
retList.push_back( view );
|
||||
}
|
||||
|
||||
for ( auto cmap : m_statisticsContourMaps.childrenByType() )
|
||||
{
|
||||
for ( auto view : cmap->views() )
|
||||
{
|
||||
retList.push_back( view );
|
||||
}
|
||||
}
|
||||
|
||||
return retList;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -59,6 +59,8 @@ public:
|
||||
void addView( RimEclipseView* view );
|
||||
RimEclipseView* addViewForCase( RimEclipseCase* eclipseCase );
|
||||
|
||||
std::vector<RimEclipseView*> allViews() const;
|
||||
|
||||
RimEclipseViewCollection* viewCollection() const;
|
||||
|
||||
void addWellTargetsGenerator( RimWellTargetCandidatesGenerator* generator );
|
||||
|
@ -54,6 +54,7 @@
|
||||
#include "RimEclipseCaseCollection.h"
|
||||
#include "RimEclipseCaseEnsemble.h"
|
||||
#include "RimEclipseContourMapViewCollection.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEclipseViewCollection.h"
|
||||
#include "RimEnsembleWellLogsCollection.h"
|
||||
#include "RimFileWellPath.h"
|
||||
@ -829,11 +830,26 @@ std::vector<Rim3dView*> RimProject::allViews() const
|
||||
for ( RimOilField* oilField : oilFields() )
|
||||
{
|
||||
if ( !oilField ) continue;
|
||||
if ( !oilField->seismicViewCollection() ) continue;
|
||||
|
||||
for ( auto seisview : oilField->seismicViewCollection()->views() )
|
||||
if ( oilField->seismicViewCollection() )
|
||||
{
|
||||
views.push_back( seisview );
|
||||
for ( auto seisview : oilField->seismicViewCollection()->views() )
|
||||
{
|
||||
views.push_back( seisview );
|
||||
}
|
||||
}
|
||||
|
||||
if ( oilField->analysisModels() )
|
||||
{
|
||||
for ( auto ensemble : oilField->analysisModels()->caseEnsembles.childrenByType() )
|
||||
{
|
||||
if ( !ensemble ) continue;
|
||||
|
||||
for ( auto view : ensemble->allViews() )
|
||||
{
|
||||
views.push_back( view );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -846,16 +862,12 @@ std::vector<Rim3dView*> RimProject::allViews() const
|
||||
std::vector<Rim3dView*> RimProject::allVisibleViews() const
|
||||
{
|
||||
std::vector<Rim3dView*> views;
|
||||
for ( RimCase* rimCase : allGridCases() )
|
||||
{
|
||||
if ( !rimCase ) continue;
|
||||
|
||||
for ( Rim3dView* view : rimCase->views() )
|
||||
for ( auto view : allViews() )
|
||||
{
|
||||
if ( view && view->viewer() )
|
||||
{
|
||||
if ( view && view->viewer() )
|
||||
{
|
||||
views.push_back( view );
|
||||
}
|
||||
views.push_back( view );
|
||||
}
|
||||
}
|
||||
|
||||
@ -882,22 +894,9 @@ std::vector<RimGridView*> RimProject::allVisibleGridViews() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimProject::scheduleCreateDisplayModelAndRedrawAllViews()
|
||||
{
|
||||
for ( RimCase* rimCase : allGridCases() )
|
||||
for ( auto view : allViews() )
|
||||
{
|
||||
if ( !rimCase ) continue;
|
||||
for ( Rim3dView* view : rimCase->views() )
|
||||
{
|
||||
view->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
auto seismicViewCollection = activeOilField()->seismicViewCollection();
|
||||
if ( seismicViewCollection )
|
||||
{
|
||||
for ( auto seisview : seismicViewCollection->views() )
|
||||
{
|
||||
seisview->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
if ( view ) view->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -588,6 +588,14 @@ double RimStatisticsContourMap::sampleSpacingFactor() const
|
||||
return RimContourMapResolutionTools::resolutionFromEnumValue( m_resolution() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimStatisticsContourMapView*> RimStatisticsContourMap::views() const
|
||||
{
|
||||
return m_views.childrenByType();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -63,7 +63,8 @@ public:
|
||||
RigContourMapGrid* contourMapGrid() const;
|
||||
std::vector<double> result( size_t timeStep, StatisticsType statisticsType ) const;
|
||||
|
||||
void addView( RimStatisticsContourMapView* view );
|
||||
void addView( RimStatisticsContourMapView* view );
|
||||
std::vector<RimStatisticsContourMapView*> views() const;
|
||||
|
||||
void ensureResultsComputed();
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
#include "RivContourMapProjectionPartMgr.h"
|
||||
|
||||
#include "Polygons/RimPolygonInViewCollection.h"
|
||||
#include "Rim3dOverlayInfoConfig.h"
|
||||
#include "RimAnnotationInViewCollection.h"
|
||||
#include "RimCase.h"
|
||||
@ -157,6 +158,7 @@ void RimStatisticsContourMapView::defineUiTreeOrdering( caf::PdmUiTreeOrdering&
|
||||
uiTreeOrdering.add( wellCollection() );
|
||||
uiTreeOrdering.add( faultCollection() );
|
||||
uiTreeOrdering.add( annotationCollection() );
|
||||
uiTreeOrdering.add( polygonInViewCollection() );
|
||||
|
||||
uiTreeOrdering.skipRemainingChildren();
|
||||
}
|
||||
|
@ -438,8 +438,8 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
|
||||
|
||||
menuBuilder << "RicToggleMeasurementModeFeature";
|
||||
menuBuilder << "RicTogglePolyMeasurementModeFeature";
|
||||
menuBuilder.addCmdFeature( "RicCreatePolygonFeature", "Polygon" );
|
||||
}
|
||||
menuBuilder.addCmdFeature( "RicCreatePolygonFeature", "Polygon" );
|
||||
}
|
||||
|
||||
// Well log curve creation commands
|
||||
|
Loading…
Reference in New Issue
Block a user