mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Polygonfilter updates2 (#7286)
* Make sure all contourmap copies are getting the correct case set for cell filters when creating/copying maps. * Rewrite polyline part manager to be more generic, not just linked to annotations. * Add new partmgr for cell filters to draw polygon filter outlines in both eclipse and geomech views * Show lines/spheres for polygon filter outline * Add color edit for line and spheres * Add support for z plane lock in poygon filter outline * Add new flags for enabling filter and/or polyline display * Add K range filter to polygon filter * Enable picking automatically when creating a new polygon filter
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "RivAnnotationsPartMgr.h"
|
||||
#include "RivCellFilterPartMgr.h"
|
||||
#include "RivMeasurementPartMgr.h"
|
||||
#include "RivWellPathsPartMgr.h"
|
||||
|
||||
@@ -170,8 +171,9 @@ Rim3dView::Rim3dView( void )
|
||||
|
||||
m_wellPathsPartManager = new RivWellPathsPartMgr( this );
|
||||
m_annotationsPartManager = new RivAnnotationsPartMgr( this );
|
||||
|
||||
m_cellfilterPartManager = new RivCellFilterPartMgr( this );
|
||||
m_measurementPartManager = new RivMeasurementPartMgr( this );
|
||||
|
||||
this->setAs3DViewMdiWindow();
|
||||
}
|
||||
|
||||
@@ -570,12 +572,14 @@ void Rim3dView::updateDisplayModelForCurrentTimeStepAndRedraw()
|
||||
this->onUpdateDisplayModelForCurrentTimeStep();
|
||||
appendAnnotationsToModel();
|
||||
appendMeasurementToModel();
|
||||
appendCellFiltersToModel();
|
||||
|
||||
if ( Rim3dView* depView = prepareComparisonView() )
|
||||
{
|
||||
depView->onUpdateDisplayModelForCurrentTimeStep();
|
||||
depView->appendAnnotationsToModel();
|
||||
depView->appendMeasurementToModel();
|
||||
depView->appendCellFiltersToModel();
|
||||
|
||||
restoreComparisonView();
|
||||
}
|
||||
@@ -991,6 +995,19 @@ void Rim3dView::addAnnotationsToModel( cvf::ModelBasicList* annotationsModel )
|
||||
annotationsModel->updateBoundingBoxesRecursive();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dView::addCellFiltersToModel( cvf::ModelBasicList* cellFilterModel )
|
||||
{
|
||||
if ( !this->ownerCase() ) return;
|
||||
|
||||
cvf::ref<caf::DisplayCoordTransform> transForm = displayCoordTransform();
|
||||
m_cellfilterPartManager->appendGeometryPartsToModel( cellFilterModel, transForm.p(), ownerCase()->allCellsBoundingBox() );
|
||||
|
||||
cellFilterModel->updateBoundingBoxesRecursive();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1529,6 +1546,28 @@ void Rim3dView::appendAnnotationsToModel()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dView::appendCellFiltersToModel()
|
||||
{
|
||||
if ( !nativeOrOverrideViewer() ) return;
|
||||
|
||||
cvf::Scene* frameScene = nativeOrOverrideViewer()->frame( m_currentTimeStep, isUsingOverrideViewer() );
|
||||
if ( frameScene )
|
||||
{
|
||||
cvf::String name = "CellFilters";
|
||||
this->removeModelByName( frameScene, name );
|
||||
|
||||
cvf::ref<cvf::ModelBasicList> model = new cvf::ModelBasicList;
|
||||
model->setName( name );
|
||||
|
||||
addCellFiltersToModel( model.p() );
|
||||
|
||||
frameScene->addModel( model.p() );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user