mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Rewrite of cell filters. Added new polyline filter and user defined filter types. (#7191)
Make 3d view picker more generic to enable picking cell filter polygon Give cell filters a new, generic interface for updating included/excluded cells from collection Remove old range filter collection and replace with new filter collection that supports both range filters, polyline filters and user defined filters. Update existing range filter code for the new collection and interface Add user defined cell filter type Add polyline cell filter type Implement both Z and K index depth for polyline filters Allow interactive editing of polyline filter node positions. Support both geomech and eclipse views Support view linking with both eclipse and geomech views and the new filter types Support loading old project files with range filter collections into the new collection type Adjust to new world order.
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "Rim3dOverlayInfoConfig.h"
|
||||
#include "RimAnnotationInViewCollection.h"
|
||||
#include "RimCellRangeFilterCollection.h"
|
||||
#include "RimCellFilterCollection.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseResultDefinition.h"
|
||||
#include "RimGeoMechResultDefinition.h"
|
||||
@@ -59,18 +59,14 @@ CAF_PDM_XML_ABSTRACT_SOURCE_INIT( RimGridView, "GenericGridView" ); // Do not us
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimGridView::RimGridView()
|
||||
{
|
||||
CAF_PDM_InitFieldNoDefault( &m_rangeFilterCollection, "RangeFilters", "Range Filters", "", "", "" );
|
||||
m_rangeFilterCollection.uiCapability()->setUiHidden( true );
|
||||
m_rangeFilterCollection = new RimCellRangeFilterCollection();
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_overrideRangeFilterCollection,
|
||||
"RangeFiltersControlled",
|
||||
"Range Filters (controlled)",
|
||||
CAF_PDM_InitFieldNoDefault( &m_overrideCellFilterCollection,
|
||||
"CellFiltersControlled",
|
||||
"Cell Filters (controlled)",
|
||||
"",
|
||||
"",
|
||||
"" );
|
||||
m_overrideRangeFilterCollection.uiCapability()->setUiHidden( true );
|
||||
m_overrideRangeFilterCollection.xmlCapability()->disableIO();
|
||||
m_overrideCellFilterCollection.uiCapability()->setUiHidden( true );
|
||||
m_overrideCellFilterCollection.xmlCapability()->disableIO();
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_intersectionCollection, "CrossSections", "Intersections", "", "", "" );
|
||||
m_intersectionCollection.uiCapability()->setUiHidden( true );
|
||||
@@ -114,6 +110,10 @@ RimGridView::RimGridView()
|
||||
CAF_PDM_InitFieldNoDefault( &m_surfaceCollection, "SurfaceInViewCollection", "Surface Collection Field", "", "", "" );
|
||||
m_surfaceCollection.uiCapability()->setUiTreeHidden( true );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_cellFilterCollection, "RangeFilters", "Cell Filter Collection Field", "", "", "" );
|
||||
m_cellFilterCollection = new RimCellFilterCollection();
|
||||
m_cellFilterCollection.uiCapability()->setUiHidden( true );
|
||||
|
||||
m_surfaceVizModel = new cvf::ModelBasicList;
|
||||
m_surfaceVizModel->setName( "SurfaceModel" );
|
||||
}
|
||||
@@ -220,38 +220,38 @@ RimIntersectionResultsDefinitionCollection* RimGridView::separateSurfaceResultsC
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGridView::rangeFiltersUpdated()
|
||||
void RimGridView::cellFiltersUpdated()
|
||||
{
|
||||
updateViewFollowingRangeFilterUpdates();
|
||||
updateViewFollowingCellFilterUpdates();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimCellRangeFilterCollection* RimGridView::rangeFilterCollection()
|
||||
RimCellFilterCollection* RimGridView::cellFilterCollection()
|
||||
{
|
||||
if ( this->viewController() && this->viewController()->isRangeFiltersControlled() && m_overrideRangeFilterCollection )
|
||||
if ( this->viewController() && this->viewController()->isCellFiltersControlled() && m_overrideCellFilterCollection )
|
||||
{
|
||||
return m_overrideRangeFilterCollection;
|
||||
return m_overrideCellFilterCollection;
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_rangeFilterCollection;
|
||||
return m_cellFilterCollection;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RimCellRangeFilterCollection* RimGridView::rangeFilterCollection() const
|
||||
const RimCellFilterCollection* RimGridView::cellFilterCollection() const
|
||||
{
|
||||
if ( this->viewController() && this->viewController()->isRangeFiltersControlled() && m_overrideRangeFilterCollection )
|
||||
if ( this->viewController() && this->viewController()->isCellFiltersControlled() && m_overrideCellFilterCollection )
|
||||
{
|
||||
return m_overrideRangeFilterCollection;
|
||||
return m_overrideCellFilterCollection;
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_rangeFilterCollection;
|
||||
return m_cellFilterCollection;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -266,24 +266,24 @@ RimAnnotationInViewCollection* RimGridView::annotationCollection() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimGridView::hasOverridenRangeFilterCollection()
|
||||
bool RimGridView::hasOverriddenCellFilterCollection()
|
||||
{
|
||||
return m_overrideRangeFilterCollection() != nullptr;
|
||||
return m_overrideCellFilterCollection() != nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGridView::setOverrideRangeFilterCollection( RimCellRangeFilterCollection* rfc )
|
||||
void RimGridView::setOverrideCellFilterCollection( RimCellFilterCollection* rfc )
|
||||
{
|
||||
if ( m_overrideRangeFilterCollection() ) delete m_overrideRangeFilterCollection();
|
||||
if ( m_overrideCellFilterCollection() ) delete m_overrideCellFilterCollection();
|
||||
|
||||
m_overrideRangeFilterCollection = rfc;
|
||||
m_overrideCellFilterCollection = rfc;
|
||||
// Maintain a link in the active-selection
|
||||
if ( m_overrideRangeFilterCollection )
|
||||
if ( m_overrideCellFilterCollection )
|
||||
{
|
||||
m_rangeFilterCollection->isActive = m_overrideRangeFilterCollection->isActive;
|
||||
m_rangeFilterCollection()->uiCapability()->updateConnectedEditors();
|
||||
m_cellFilterCollection->setActive( m_overrideCellFilterCollection->isActive() );
|
||||
m_cellFilterCollection()->uiCapability()->updateConnectedEditors();
|
||||
}
|
||||
|
||||
this->scheduleGeometryRegen( RANGE_FILTERED );
|
||||
@@ -294,12 +294,12 @@ void RimGridView::setOverrideRangeFilterCollection( RimCellRangeFilterCollection
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGridView::replaceRangeFilterCollectionWithOverride()
|
||||
void RimGridView::replaceCellFilterCollectionWithOverride()
|
||||
{
|
||||
RimCellRangeFilterCollection* overrideRfc = m_overrideRangeFilterCollection;
|
||||
RimCellFilterCollection* overrideRfc = m_overrideCellFilterCollection;
|
||||
CVF_ASSERT( overrideRfc );
|
||||
|
||||
RimCellRangeFilterCollection* currentRfc = m_rangeFilterCollection;
|
||||
RimCellFilterCollection* currentRfc = m_cellFilterCollection;
|
||||
if ( currentRfc )
|
||||
{
|
||||
delete currentRfc;
|
||||
@@ -307,9 +307,9 @@ void RimGridView::replaceRangeFilterCollectionWithOverride()
|
||||
|
||||
// Must call removeChildObject() to make sure the object has no parent
|
||||
// No parent is required when assigning a object into a field
|
||||
m_overrideRangeFilterCollection.removeChildObject( overrideRfc );
|
||||
m_overrideCellFilterCollection.removeChildObject( overrideRfc );
|
||||
|
||||
m_rangeFilterCollection = overrideRfc;
|
||||
m_cellFilterCollection = overrideRfc;
|
||||
|
||||
this->uiCapability()->updateConnectedEditors();
|
||||
}
|
||||
@@ -370,7 +370,7 @@ Rim3dOverlayInfoConfig* RimGridView::overlayInfoConfig() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGridView::updateViewFollowingRangeFilterUpdates()
|
||||
void RimGridView::updateViewFollowingCellFilterUpdates()
|
||||
{
|
||||
showGridCells( true );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user