mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Release 2023.06
This commit is contained in:
@@ -267,7 +267,7 @@ void RimBoxIntersection::appendManipulatorPartsToModel( cvf::ModelBasicList* mod
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimBoxIntersection::rebuildGeometry()
|
||||
void RimBoxIntersection::clearGeometry()
|
||||
{
|
||||
m_intersectionBoxPartMgr = nullptr;
|
||||
}
|
||||
@@ -336,8 +336,7 @@ void RimBoxIntersection::fieldChangedByUi( const caf::PdmFieldHandle* changedFie
|
||||
{
|
||||
m_boxManipulator = new RicBoxManipulatorEventHandler( viewer() );
|
||||
|
||||
Rim3dView* rimView = nullptr;
|
||||
this->firstAncestorOrThisOfType( rimView );
|
||||
auto rimView = firstAncestorOrThisOfType<Rim3dView>();
|
||||
for ( Rim3dView* mainView : rimView->viewsUsingThisAsComparisonView() )
|
||||
{
|
||||
m_boxManipulator->registerInAdditionalViewer( mainView->viewer() );
|
||||
@@ -367,9 +366,7 @@ void RimBoxIntersection::fieldChangedByUi( const caf::PdmFieldHandle* changedFie
|
||||
{
|
||||
if ( m_boxManipulator )
|
||||
{
|
||||
Rim3dView* rimView = nullptr;
|
||||
this->firstAncestorOrThisOfType( rimView );
|
||||
|
||||
auto rimView = firstAncestorOrThisOfType<Rim3dView>();
|
||||
if ( rimView )
|
||||
{
|
||||
cvf::ref<caf::DisplayCoordTransform> transForm = rimView->displayCoordTransform();
|
||||
@@ -393,8 +390,7 @@ void RimBoxIntersection::updateBoxManipulatorGeometry()
|
||||
{
|
||||
if ( m_boxManipulator.isNull() ) return;
|
||||
|
||||
Rim3dView* rimView = nullptr;
|
||||
this->firstAncestorOrThisOfType( rimView );
|
||||
auto rimView = firstAncestorOrThisOfType<Rim3dView>();
|
||||
if ( !rimView ) return;
|
||||
|
||||
cvf::ref<caf::DisplayCoordTransform> transForm = rimView->displayCoordTransform();
|
||||
@@ -522,8 +518,7 @@ void RimBoxIntersection::initAfterRead()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimBoxIntersection::slotScheduleRedraw()
|
||||
{
|
||||
Rim3dView* rimView = nullptr;
|
||||
this->firstAncestorOrThisOfType( rimView );
|
||||
auto rimView = firstAncestorOrThisOfType<Rim3dView>();
|
||||
if ( rimView )
|
||||
{
|
||||
rimView->scheduleCreateDisplayModelAndRedraw();
|
||||
@@ -535,9 +530,7 @@ void RimBoxIntersection::slotScheduleRedraw()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimBoxIntersection::slotUpdateGeometry( const cvf::Vec3d& origin, const cvf::Vec3d& size )
|
||||
{
|
||||
Rim3dView* rimView = nullptr;
|
||||
this->firstAncestorOrThisOfType( rimView );
|
||||
|
||||
auto rimView = firstAncestorOrThisOfType<Rim3dView>();
|
||||
if ( rimView )
|
||||
{
|
||||
cvf::ref<caf::DisplayCoordTransform> transForm = rimView->displayCoordTransform();
|
||||
@@ -663,23 +656,8 @@ void RimBoxIntersection::switchSingelPlaneState()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::BoundingBox RimBoxIntersection::currentCellBoundingBox()
|
||||
{
|
||||
RimCase* rimCase = nullptr;
|
||||
this->firstAncestorOrThisOfType( rimCase );
|
||||
auto rimCase = firstAncestorOrThisOfTypeAsserted<RimCase>();
|
||||
|
||||
CVF_ASSERT( rimCase );
|
||||
/*
|
||||
RimEclipseView* eclView = nullptr;
|
||||
this->firstAncestorOrThisOfType(eclView);
|
||||
|
||||
bool useAllCells = true;
|
||||
if (eclView)
|
||||
{
|
||||
useAllCells = eclView->showInactiveCells();
|
||||
}
|
||||
|
||||
if(false)//useAllCells) // For now, only use the active CellsBBox.
|
||||
return rimCase->allCellsBoundingBox();
|
||||
else */
|
||||
return rimCase->activeCellsBoundingBox();
|
||||
}
|
||||
|
||||
@@ -688,11 +666,8 @@ cvf::BoundingBox RimBoxIntersection::currentCellBoundingBox()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuViewer* RimBoxIntersection::viewer()
|
||||
{
|
||||
Rim3dView* rimView = nullptr;
|
||||
this->firstAncestorOrThisOfType( rimView );
|
||||
auto rimView = firstAncestorOrThisOfType<Rim3dView>();
|
||||
if ( rimView ) return rimView->viewer();
|
||||
|
||||
RiuViewer* riuViewer = nullptr;
|
||||
if ( rimView ) riuViewer = rimView->viewer();
|
||||
|
||||
return riuViewer;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
|
||||
RivBoxIntersectionPartMgr* intersectionBoxPartMgr();
|
||||
void appendManipulatorPartsToModel( cvf::ModelBasicList* model );
|
||||
void rebuildGeometry();
|
||||
void clearGeometry();
|
||||
|
||||
void setToDefaultSizeBox();
|
||||
void setToDefaultSizeSlice( SinglePlaneState plane, const cvf::Vec3d& position );
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEnsembleSurface.h"
|
||||
#include "RimGeoMechView.h"
|
||||
#include "RimGridView.h"
|
||||
#include "RimIntersectionResultDefinition.h"
|
||||
#include "RimIntersectionResultsDefinitionCollection.h"
|
||||
@@ -246,7 +247,7 @@ RimExtrudedCurveIntersection::RimExtrudedCurveIntersection()
|
||||
m_surfaceIntersections = new RimSurfaceIntersectionCollection;
|
||||
m_surfaceIntersections->objectChanged.connect( this, &RimExtrudedCurveIntersection::onSurfaceIntersectionsChanged );
|
||||
|
||||
CAF_PDM_InitField( &m_depthUpperThreshold, "UpperThreshold", 0.0, "Upper Threshold" );
|
||||
CAF_PDM_InitField( &m_depthUpperThreshold, "UpperThreshold", -300000.0, "Upper Threshold" );
|
||||
m_depthUpperThreshold.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() );
|
||||
|
||||
CAF_PDM_InitField( &m_depthLowerThreshold, "LowerThreshold", 300000.0, "Lower Threshold" );
|
||||
@@ -266,6 +267,15 @@ RimExtrudedCurveIntersection::RimExtrudedCurveIntersection()
|
||||
CAF_PDM_InitFieldNoDefault( &m_collectionDepthFilterType, "CollectionDepthFilterType", "Collection Controlled Filter Type" );
|
||||
m_collectionDepthFilterType.uiCapability()->setUiHidden( true );
|
||||
|
||||
CAF_PDM_InitField( &m_enableKFilter, "EnableKFilter", false, "Enable K Range Filter" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_kFilterText, "KRangeFilter", "K Range Filter", "", "Example: 2,4-6,10-30:2", "" );
|
||||
|
||||
CAF_PDM_InitField( &m_kFilterCollectionOverride, "KFilterCollectionOverride", false, "K Range Filter is Controlled by Intersection Collection" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_kFilterCollectionOverride );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_kFilterCollectionText, "KRangeCollectionFilter", "Collection K Range Filter", "", "Example: 2,4-6,10-30:2", "" );
|
||||
m_kFilterCollectionText.uiCapability()->setUiHidden( true );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
@@ -320,7 +330,7 @@ double RimExtrudedCurveIntersection::upperFilterDepth( double upperGridLimit ) c
|
||||
}
|
||||
}
|
||||
|
||||
switch ( m_depthFilterType() )
|
||||
switch ( depthFilterType() )
|
||||
{
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_BELOW:
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN:
|
||||
@@ -365,7 +375,7 @@ double RimExtrudedCurveIntersection::lowerFilterDepth( double lowerGridLimit ) c
|
||||
}
|
||||
}
|
||||
|
||||
switch ( m_depthFilterType() )
|
||||
switch ( depthFilterType() )
|
||||
{
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_ABOVE:
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN:
|
||||
@@ -396,6 +406,32 @@ void RimExtrudedCurveIntersection::setDepthOverrideParameters( double upperThres
|
||||
m_collectionDepthFilterType = filterType;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimExtrudedCurveIntersection::kLayerFilterEnabled() const
|
||||
{
|
||||
return m_enableKFilter() || m_kFilterCollectionOverride();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimExtrudedCurveIntersection::kFilterText() const
|
||||
{
|
||||
if ( m_kFilterCollectionOverride() ) return m_kFilterCollectionText();
|
||||
return m_kFilterText();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimExtrudedCurveIntersection::setKFilterOverride( bool collectionOverride, QString kFilterText )
|
||||
{
|
||||
m_kFilterCollectionOverride = collectionOverride;
|
||||
m_kFilterCollectionText = kFilterText;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -405,7 +441,8 @@ void RimExtrudedCurveIntersection::fieldChangedByUi( const caf::PdmFieldHandle*
|
||||
changedField == &m_simulationWell || changedField == &m_branchIndex || changedField == &m_extentLength ||
|
||||
changedField == &m_lengthUp || changedField == &m_lengthDown || changedField == &m_showInactiveCells ||
|
||||
changedField == &m_useSeparateDataSource || changedField == &m_separateDataSource || changedField == &m_depthUpperThreshold ||
|
||||
changedField == &m_depthLowerThreshold || changedField == &m_depthThresholdOverridden || changedField == &m_depthFilterType )
|
||||
changedField == &m_depthLowerThreshold || changedField == &m_depthThresholdOverridden || changedField == &m_depthFilterType ||
|
||||
changedField == &m_enableKFilter || changedField == &m_kFilterText || changedField == &m_kFilterCollectionOverride )
|
||||
{
|
||||
rebuildGeometryAndScheduleCreateDisplayModel();
|
||||
}
|
||||
@@ -541,39 +578,51 @@ void RimExtrudedCurveIntersection::defineUiOrdering( QString uiConfigName, caf::
|
||||
m_extentLength.uiCapability()->setUiReadOnly( false );
|
||||
}
|
||||
|
||||
if ( eclipseView() )
|
||||
auto filterGroup = uiOrdering.addNewGroup( "Depth Filter" );
|
||||
if ( m_depthThresholdOverridden() )
|
||||
{
|
||||
auto filterGroup = uiOrdering.addNewGroup( "Depth Filter" );
|
||||
if ( m_depthThresholdOverridden() )
|
||||
filterGroup->add( &m_depthThresholdOverridden );
|
||||
}
|
||||
else
|
||||
{
|
||||
filterGroup->add( &m_depthFilterType );
|
||||
|
||||
switch ( m_depthFilterType() )
|
||||
{
|
||||
filterGroup->add( &m_depthThresholdOverridden );
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_BELOW:
|
||||
m_depthUpperThreshold.uiCapability()->setUiName( "Depth" );
|
||||
filterGroup->add( &m_depthUpperThreshold );
|
||||
break;
|
||||
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN:
|
||||
m_depthUpperThreshold.uiCapability()->setUiName( "Upper Depth" );
|
||||
filterGroup->add( &m_depthUpperThreshold );
|
||||
m_depthLowerThreshold.uiCapability()->setUiName( "Lower Depth" );
|
||||
filterGroup->add( &m_depthLowerThreshold );
|
||||
break;
|
||||
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_ABOVE:
|
||||
m_depthLowerThreshold.uiCapability()->setUiName( "Depth" );
|
||||
filterGroup->add( &m_depthLowerThreshold );
|
||||
break;
|
||||
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
||||
if ( eclipseView() != nullptr )
|
||||
{
|
||||
filterGroup->add( &m_depthFilterType );
|
||||
auto kgroup = uiOrdering.addNewGroup( "K Range Filter" );
|
||||
|
||||
switch ( m_depthFilterType() )
|
||||
if ( m_kFilterCollectionOverride() )
|
||||
{
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_BELOW:
|
||||
m_depthUpperThreshold.uiCapability()->setUiName( "Depth" );
|
||||
filterGroup->add( &m_depthUpperThreshold );
|
||||
break;
|
||||
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN:
|
||||
m_depthUpperThreshold.uiCapability()->setUiName( "Upper Depth" );
|
||||
filterGroup->add( &m_depthUpperThreshold );
|
||||
m_depthLowerThreshold.uiCapability()->setUiName( "Lower Depth" );
|
||||
filterGroup->add( &m_depthLowerThreshold );
|
||||
break;
|
||||
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_ABOVE:
|
||||
m_depthLowerThreshold.uiCapability()->setUiName( "Depth" );
|
||||
filterGroup->add( &m_depthLowerThreshold );
|
||||
break;
|
||||
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_NONE:
|
||||
default:
|
||||
break;
|
||||
kgroup->add( &m_kFilterCollectionOverride );
|
||||
}
|
||||
else
|
||||
{
|
||||
kgroup->add( &m_enableKFilter );
|
||||
kgroup->add( &m_kFilterText );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -708,8 +757,7 @@ std::vector<std::vector<cvf::Vec3d>> RimExtrudedCurveIntersection::polyLines( cv
|
||||
if ( m_wellPath() && wellPath()->wellPathGeometry() )
|
||||
{
|
||||
lines.push_back( wellPath()->wellPathGeometry()->wellPathPoints() );
|
||||
RimCase* ownerCase = nullptr;
|
||||
this->firstAncestorOrThisOfType( ownerCase );
|
||||
auto ownerCase = firstAncestorOrThisOfType<RimCase>();
|
||||
if ( ownerCase && ownerCase->activeCellsBoundingBox().isValid() )
|
||||
{
|
||||
size_t dummy;
|
||||
@@ -796,7 +844,7 @@ RivExtrudedCurveIntersectionPartMgr* RimExtrudedCurveIntersection::intersectionP
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimExtrudedCurveIntersection::rebuildGeometry()
|
||||
void RimExtrudedCurveIntersection::clearGeometry()
|
||||
{
|
||||
m_crossSectionPartMgr = nullptr;
|
||||
}
|
||||
@@ -958,7 +1006,7 @@ void RimExtrudedCurveIntersection::setBaseColor( bool enable, caf::PdmUiListEdit
|
||||
{
|
||||
if ( attribute )
|
||||
{
|
||||
attribute->m_qssState = enable ? "ExternalInput" : QString();
|
||||
attribute->qssState = enable ? "ExternalInput" : QString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -995,6 +1043,16 @@ void RimExtrudedCurveIntersection::defineEditorAttribute( const caf::PdmFieldHan
|
||||
doubleSliderAttrib->m_minimum = -1.0 * bb.max().z();
|
||||
doubleSliderAttrib->m_maximum = -1.0 * bb.min().z();
|
||||
}
|
||||
|
||||
RimGeoMechView* geomView = firstAncestorOrThisOfType<RimGeoMechView>();
|
||||
|
||||
if ( geomView )
|
||||
{
|
||||
const cvf::BoundingBox bb = geomView->domainBoundingBox();
|
||||
|
||||
doubleSliderAttrib->m_minimum = -1.0 * bb.max().z();
|
||||
doubleSliderAttrib->m_maximum = -1.0 * bb.min().z();
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( field == &m_inputPolylineFromViewerEnabled )
|
||||
@@ -1041,8 +1099,7 @@ void RimExtrudedCurveIntersection::appendPointToPolyLine( const cvf::Vec3d& poin
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
Rim2dIntersectionView* RimExtrudedCurveIntersection::correspondingIntersectionView() const
|
||||
{
|
||||
std::vector<Rim2dIntersectionView*> objects;
|
||||
this->objectsWithReferringPtrFieldsOfType( objects );
|
||||
std::vector<Rim2dIntersectionView*> objects = objectsWithReferringPtrFieldsOfType<Rim2dIntersectionView>();
|
||||
for ( auto isectView : objects )
|
||||
{
|
||||
if ( isectView )
|
||||
@@ -1237,8 +1294,7 @@ void RimExtrudedCurveIntersection::rebuildGeometryAndScheduleCreateDisplayModel(
|
||||
{
|
||||
m_crossSectionPartMgr = nullptr;
|
||||
|
||||
Rim3dView* rimView = nullptr;
|
||||
this->firstAncestorOrThisOfType( rimView );
|
||||
auto rimView = firstAncestorOrThisOfType<Rim3dView>();
|
||||
if ( rimView )
|
||||
{
|
||||
rimView->scheduleCreateDisplayModelAndRedraw();
|
||||
@@ -1314,7 +1370,5 @@ void RimExtrudedCurveIntersection::setPointsFromXYD( const std::vector<cvf::Vec3
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseView* RimExtrudedCurveIntersection::eclipseView() const
|
||||
{
|
||||
RimEclipseView* eclipseView = nullptr;
|
||||
firstAncestorOrThisOfType( eclipseView );
|
||||
return eclipseView;
|
||||
return firstAncestorOrThisOfType<RimEclipseView>();
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#include "cafPdmChildField.h"
|
||||
#include "cafPdmProxyValueField.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
class RimWellPath;
|
||||
class RivExtrudedCurveIntersectionPartMgr;
|
||||
class RimEclipseView;
|
||||
@@ -81,6 +83,10 @@ public:
|
||||
double lowerFilterDepth( double lowerGridLimit ) const;
|
||||
RimIntersectionFilterEnum depthFilterType() const;
|
||||
|
||||
bool kLayerFilterEnabled() const;
|
||||
QString kFilterText() const;
|
||||
void setKFilterOverride( bool collectionOverride, QString kFilterText );
|
||||
|
||||
void setDepthOverride( bool collectionOverride );
|
||||
void setDepthOverrideParameters( double upperThreshold, double lowerThreshold, RimIntersectionFilterEnum filterType );
|
||||
|
||||
@@ -103,7 +109,7 @@ public:
|
||||
|
||||
Rim2dIntersectionView* correspondingIntersectionView() const;
|
||||
RivExtrudedCurveIntersectionPartMgr* intersectionPartMgr();
|
||||
void rebuildGeometry();
|
||||
void clearGeometry();
|
||||
const RivIntersectionGeometryGeneratorInterface* intersectionGeometryGenerator() const override;
|
||||
|
||||
std::vector<cvf::Vec3d> polyLinesForExtrusionDirection() const;
|
||||
@@ -197,4 +203,10 @@ private:
|
||||
cvf::ref<RivExtrudedCurveIntersectionPartMgr> m_crossSectionPartMgr;
|
||||
|
||||
mutable std::vector<std::vector<cvf::Vec3d>> m_simulationWellBranchCenterlines;
|
||||
|
||||
caf::PdmField<bool> m_enableKFilter;
|
||||
caf::PdmField<QString> m_kFilterText;
|
||||
|
||||
caf::PdmField<bool> m_kFilterCollectionOverride;
|
||||
caf::PdmField<QString> m_kFilterCollectionText;
|
||||
};
|
||||
|
||||
@@ -128,8 +128,7 @@ QList<caf::PdmOptionItemInfo> RimIntersection::calculateValueOptions( const caf:
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimIntersectionResultsDefinitionCollection* RimIntersection::findSeparateResultsCollection()
|
||||
{
|
||||
RimGridView* view;
|
||||
this->firstAncestorOrThisOfTypeAsserted( view );
|
||||
auto view = firstAncestorOrThisOfTypeAsserted<RimGridView>();
|
||||
return view->separateIntersectionResultsCollection();
|
||||
}
|
||||
|
||||
@@ -187,8 +186,7 @@ void RimIntersection::updateDefaultSeparateDataSource()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<RivIntersectionHexGridInterface> RimIntersection::createHexGridInterface()
|
||||
{
|
||||
RimGeoMechView* geoView;
|
||||
this->firstAncestorOrThisOfType( geoView );
|
||||
auto geoView = firstAncestorOrThisOfType<RimGeoMechView>();
|
||||
|
||||
RimIntersectionResultDefinition* resDef = activeSeparateResultDefinition();
|
||||
if ( resDef && resDef->activeCase() )
|
||||
@@ -214,8 +212,7 @@ cvf::ref<RivIntersectionHexGridInterface> RimIntersection::createHexGridInterfac
|
||||
}
|
||||
}
|
||||
|
||||
RimEclipseView* eclipseView;
|
||||
this->firstAncestorOrThisOfType( eclipseView );
|
||||
auto eclipseView = firstAncestorOrThisOfType<RimEclipseView>();
|
||||
if ( eclipseView && eclipseView->mainGrid() )
|
||||
{
|
||||
RigMainGrid* grid = eclipseView->mainGrid();
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "RimGridView.h"
|
||||
#include "RimIntersectionResultDefinition.h"
|
||||
#include "RimIntersectionResultsDefinitionCollection.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSimWellInView.h"
|
||||
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
@@ -42,6 +43,7 @@
|
||||
#include "cafPdmUiCheckBoxEditor.h"
|
||||
#include "cafPdmUiDoubleSliderEditor.h"
|
||||
#include "cafPdmUiTreeOrdering.h"
|
||||
|
||||
#include "cvfModelBasicList.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimIntersectionCollection, "IntersectionCollection", "CrossSectionCollection" );
|
||||
@@ -59,8 +61,8 @@ RimIntersectionCollection::RimIntersectionCollection()
|
||||
CAF_PDM_InitFieldNoDefault( &m_intersectionBoxes, "IntersectionBoxes", "IntersectionBoxes" );
|
||||
m_intersectionBoxes.uiCapability()->setUiTreeHidden( true );
|
||||
|
||||
CAF_PDM_InitField( &isActive, "Active", true, "Active" );
|
||||
isActive.uiCapability()->setUiHidden( true );
|
||||
CAF_PDM_InitField( &m_isActive, "Active", true, "Active" );
|
||||
m_isActive.uiCapability()->setUiHidden( true );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_depthUpperThreshold, "UpperDepthThreshold", "Upper Threshold" );
|
||||
m_depthUpperThreshold.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() );
|
||||
@@ -69,9 +71,14 @@ RimIntersectionCollection::RimIntersectionCollection()
|
||||
m_depthLowerThreshold.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() );
|
||||
|
||||
CAF_PDM_InitField( &m_depthThresholdOverridden, "DepthFilterOverride", false, "Override Intersection Depth Filters" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_depthThresholdOverridden );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_depthFilterType, "CollectionDepthFilterType", "Depth Filter Type" );
|
||||
|
||||
CAF_PDM_InitField( &m_kFilterOverridden, "OverrideKFilter", false, "Override Intersection K Range Filters" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_kFilterStr, "KRangeFilter", "K Range Filter", "", "Example: 2,4-6,10-30:2", "" );
|
||||
|
||||
CAF_PDM_InitField( &m_applyCellFilters, "ApplyCellFilters", true, "Use Cell Filters for Intersections" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -88,7 +95,15 @@ RimIntersectionCollection::~RimIntersectionCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimIntersectionCollection::objectToggleField()
|
||||
{
|
||||
return &isActive;
|
||||
return &m_isActive;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimIntersectionCollection::isActive() const
|
||||
{
|
||||
return m_isActive();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -96,8 +111,7 @@ caf::PdmFieldHandle* RimIntersectionCollection::objectToggleField()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionCollection::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= "" */ )
|
||||
{
|
||||
RimGridView* gridView = nullptr;
|
||||
this->firstAncestorOfType( gridView );
|
||||
auto gridView = firstAncestorOfType<RimGridView>();
|
||||
if ( gridView )
|
||||
{
|
||||
auto uiTree = gridView->separateIntersectionResultsCollection()->uiTreeOrdering();
|
||||
@@ -207,9 +221,36 @@ void RimIntersectionCollection::appendPartsToModel( Rim3dView& view, cvf::ModelB
|
||||
{
|
||||
if ( cs->isActive() )
|
||||
{
|
||||
cs->intersectionPartMgr()->appendPolylinePartsToModel( view, model, scaleTransform );
|
||||
}
|
||||
}
|
||||
|
||||
for ( RimBoxIntersection* cs : m_intersectionBoxes )
|
||||
{
|
||||
if ( cs->isActive() && cs->show3dManipulator() )
|
||||
{
|
||||
cs->appendManipulatorPartsToModel( model );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionCollection::appendDynamicPartsToModel( cvf::ModelBasicList* model,
|
||||
cvf::Transform* scaleTransform,
|
||||
size_t timeStepIndex,
|
||||
cvf::UByteArray* visibleCells )
|
||||
{
|
||||
if ( !isActive() ) return;
|
||||
|
||||
for ( RimExtrudedCurveIntersection* cs : m_intersections )
|
||||
{
|
||||
if ( cs->isActive() )
|
||||
{
|
||||
cs->intersectionPartMgr()->generatePartGeometry( visibleCells );
|
||||
cs->intersectionPartMgr()->appendIntersectionFacesToModel( model, scaleTransform );
|
||||
cs->intersectionPartMgr()->appendMeshLinePartsToModel( model, scaleTransform );
|
||||
cs->intersectionPartMgr()->appendPolylinePartsToModel( view, model, scaleTransform );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,32 +258,26 @@ void RimIntersectionCollection::appendPartsToModel( Rim3dView& view, cvf::ModelB
|
||||
{
|
||||
if ( cs->isActive() )
|
||||
{
|
||||
cs->intersectionBoxPartMgr()->generatePartGeometry( visibleCells );
|
||||
cs->intersectionBoxPartMgr()->appendNativeIntersectionFacesToModel( model, scaleTransform );
|
||||
cs->intersectionBoxPartMgr()->appendMeshLinePartsToModel( model, scaleTransform );
|
||||
|
||||
if ( cs->show3dManipulator() )
|
||||
{
|
||||
cs->appendManipulatorPartsToModel( model );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
model->updateBoundingBoxesRecursive();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionCollection::rebuildGeometry()
|
||||
void RimIntersectionCollection::clearGeometry()
|
||||
{
|
||||
for ( RimExtrudedCurveIntersection* intersection : m_intersections )
|
||||
{
|
||||
intersection->rebuildGeometry();
|
||||
intersection->clearGeometry();
|
||||
}
|
||||
|
||||
for ( RimBoxIntersection* intersectionBox : m_intersectionBoxes )
|
||||
{
|
||||
intersectionBox->rebuildGeometry();
|
||||
intersectionBox->clearGeometry();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,7 +286,7 @@ void RimIntersectionCollection::rebuildGeometry()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimExtrudedCurveIntersection*> RimIntersectionCollection::intersections() const
|
||||
{
|
||||
return m_intersections.children();
|
||||
return m_intersections.childrenByType();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -259,7 +294,7 @@ std::vector<RimExtrudedCurveIntersection*> RimIntersectionCollection::intersecti
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimBoxIntersection*> RimIntersectionCollection::intersectionBoxes() const
|
||||
{
|
||||
return m_intersectionBoxes.children();
|
||||
return m_intersectionBoxes.childrenByType();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -306,8 +341,7 @@ void RimIntersectionCollection::appendIntersectionNoUpdate( RimExtrudedCurveInte
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionCollection::syncronize2dIntersectionViews()
|
||||
{
|
||||
RimCase* ownerCase = nullptr;
|
||||
this->firstAncestorOrThisOfTypeAsserted( ownerCase );
|
||||
auto ownerCase = firstAncestorOrThisOfTypeAsserted<RimCase>();
|
||||
ownerCase->intersectionViewCollection()->syncFromExistingIntersections( true );
|
||||
}
|
||||
|
||||
@@ -353,12 +387,12 @@ void RimIntersectionCollection::fieldChangedByUi( const caf::PdmFieldHandle* cha
|
||||
{
|
||||
bool rebuildView = false;
|
||||
|
||||
if ( changedField == &isActive )
|
||||
if ( changedField == &m_isActive )
|
||||
{
|
||||
updateUiIconFromToggleField();
|
||||
rebuildView = true;
|
||||
}
|
||||
if ( changedField == &m_depthThresholdOverridden )
|
||||
else if ( changedField == &m_depthThresholdOverridden )
|
||||
{
|
||||
for ( RimExtrudedCurveIntersection* cs : m_intersections )
|
||||
{
|
||||
@@ -371,8 +405,8 @@ void RimIntersectionCollection::fieldChangedByUi( const caf::PdmFieldHandle* cha
|
||||
}
|
||||
rebuildView = true;
|
||||
}
|
||||
|
||||
if ( ( changedField == &m_depthUpperThreshold ) || ( changedField == &m_depthLowerThreshold ) || ( changedField == &m_depthFilterType ) )
|
||||
else if ( ( changedField == &m_depthUpperThreshold ) || ( changedField == &m_depthLowerThreshold ) ||
|
||||
( changedField == &m_depthFilterType ) )
|
||||
{
|
||||
for ( RimExtrudedCurveIntersection* cs : m_intersections )
|
||||
{
|
||||
@@ -381,6 +415,19 @@ void RimIntersectionCollection::fieldChangedByUi( const caf::PdmFieldHandle* cha
|
||||
}
|
||||
rebuildView = true;
|
||||
}
|
||||
else if ( changedField == &m_kFilterOverridden || changedField == &m_kFilterStr )
|
||||
{
|
||||
for ( RimExtrudedCurveIntersection* cs : m_intersections )
|
||||
{
|
||||
cs->setKFilterOverride( m_kFilterOverridden, m_kFilterStr );
|
||||
cs->rebuildGeometryAndScheduleCreateDisplayModel();
|
||||
}
|
||||
rebuildView = true;
|
||||
}
|
||||
else if ( changedField == &m_applyCellFilters )
|
||||
{
|
||||
rebuildView = true;
|
||||
}
|
||||
|
||||
if ( rebuildView )
|
||||
{
|
||||
@@ -441,40 +488,51 @@ void RimIntersectionCollection::updateIntersectionBoxGeometry()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionCollection::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
caf::PdmUiGroup* genGroup = uiOrdering.addNewGroup( "General" );
|
||||
genGroup->add( &m_applyCellFilters );
|
||||
|
||||
caf::PdmUiGroup* filterGroup = uiOrdering.addNewGroup( "Depth Filter - Curve Intersections" );
|
||||
filterGroup->setCollapsedByDefault();
|
||||
|
||||
m_depthFilterType.uiCapability()->setUiReadOnly( !m_depthThresholdOverridden() );
|
||||
m_depthUpperThreshold.uiCapability()->setUiReadOnly( !m_depthThresholdOverridden() );
|
||||
m_depthLowerThreshold.uiCapability()->setUiReadOnly( !m_depthThresholdOverridden() );
|
||||
|
||||
filterGroup->add( &m_depthThresholdOverridden );
|
||||
filterGroup->add( &m_depthFilterType );
|
||||
|
||||
switch ( m_depthFilterType() )
|
||||
{
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_BELOW:
|
||||
m_depthUpperThreshold.uiCapability()->setUiName( "Depth" );
|
||||
filterGroup->add( &m_depthUpperThreshold );
|
||||
break;
|
||||
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN:
|
||||
m_depthUpperThreshold.uiCapability()->setUiName( "Upper Depth" );
|
||||
filterGroup->add( &m_depthUpperThreshold );
|
||||
m_depthLowerThreshold.uiCapability()->setUiName( "Lower Depth" );
|
||||
filterGroup->add( &m_depthLowerThreshold );
|
||||
break;
|
||||
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_ABOVE:
|
||||
m_depthLowerThreshold.uiCapability()->setUiName( "Depth" );
|
||||
filterGroup->add( &m_depthLowerThreshold );
|
||||
break;
|
||||
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if ( eclipseView() )
|
||||
{
|
||||
caf::PdmUiGroup* filterGroup = uiOrdering.addNewGroup( "Depth Filter - Curve Intersections" );
|
||||
caf::PdmUiGroup* kfilterGroup = uiOrdering.addNewGroup( "K Filter - Curve Intersections" );
|
||||
kfilterGroup->setCollapsedByDefault();
|
||||
|
||||
m_depthFilterType.uiCapability()->setUiReadOnly( !m_depthThresholdOverridden() );
|
||||
m_depthUpperThreshold.uiCapability()->setUiReadOnly( !m_depthThresholdOverridden() );
|
||||
m_depthLowerThreshold.uiCapability()->setUiReadOnly( !m_depthThresholdOverridden() );
|
||||
m_kFilterStr.uiCapability()->setUiReadOnly( !m_kFilterOverridden() );
|
||||
|
||||
filterGroup->add( &m_depthThresholdOverridden );
|
||||
filterGroup->add( &m_depthFilterType );
|
||||
|
||||
switch ( m_depthFilterType() )
|
||||
{
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_BELOW:
|
||||
m_depthUpperThreshold.uiCapability()->setUiName( "Depth" );
|
||||
filterGroup->add( &m_depthUpperThreshold );
|
||||
break;
|
||||
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN:
|
||||
m_depthUpperThreshold.uiCapability()->setUiName( "Upper Depth" );
|
||||
filterGroup->add( &m_depthUpperThreshold );
|
||||
m_depthLowerThreshold.uiCapability()->setUiName( "Lower Depth" );
|
||||
filterGroup->add( &m_depthLowerThreshold );
|
||||
break;
|
||||
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_ABOVE:
|
||||
m_depthLowerThreshold.uiCapability()->setUiName( "Depth" );
|
||||
filterGroup->add( &m_depthLowerThreshold );
|
||||
break;
|
||||
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
kfilterGroup->add( &m_kFilterOverridden );
|
||||
kfilterGroup->add( &m_kFilterStr );
|
||||
}
|
||||
|
||||
uiOrdering.skipRemainingFields( true );
|
||||
@@ -503,14 +561,23 @@ void RimIntersectionCollection::defineEditorAttribute( const caf::PdmFieldHandle
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionCollection::initAfterRead()
|
||||
{
|
||||
if ( RimProject::current()->isProjectFileVersionEqualOrOlderThan( "2023.03.0" ) )
|
||||
{
|
||||
m_applyCellFilters = false;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseView* RimIntersectionCollection::eclipseView() const
|
||||
{
|
||||
RimEclipseView* eclipseView = nullptr;
|
||||
firstAncestorOrThisOfType( eclipseView );
|
||||
return eclipseView;
|
||||
return firstAncestorOrThisOfType<RimEclipseView>();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -518,10 +585,17 @@ RimEclipseView* RimIntersectionCollection::eclipseView() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionCollection::rebuild3dView() const
|
||||
{
|
||||
Rim3dView* rimView = nullptr;
|
||||
firstAncestorOrThisOfType( rimView );
|
||||
auto rimView = firstAncestorOrThisOfType<Rim3dView>();
|
||||
if ( rimView )
|
||||
{
|
||||
rimView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimIntersectionCollection::shouldApplyCellFiltersToIntersections() const
|
||||
{
|
||||
return m_applyCellFilters();
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
#include "cvfArray.h"
|
||||
|
||||
#include "RimIntersectionEnums.h"
|
||||
|
||||
class Rim3dView;
|
||||
@@ -53,8 +55,6 @@ public:
|
||||
RimIntersectionCollection();
|
||||
~RimIntersectionCollection() override;
|
||||
|
||||
caf::PdmField<bool> isActive;
|
||||
|
||||
void appendIntersectionAndUpdate( RimExtrudedCurveIntersection* intersection, bool allowActiveViewChange = true );
|
||||
void appendIntersectionNoUpdate( RimExtrudedCurveIntersection* intersection );
|
||||
|
||||
@@ -70,12 +70,18 @@ public:
|
||||
void scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
|
||||
void recomputeSimWellBranchData();
|
||||
|
||||
bool shouldApplyCellFiltersToIntersections() const;
|
||||
|
||||
// Visualization interface
|
||||
|
||||
void applySingleColorEffect();
|
||||
void updateCellResultColor( bool hasGeneralCellResult, int timeStepIndex );
|
||||
void appendPartsToModel( Rim3dView& view, cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
|
||||
void rebuildGeometry();
|
||||
void appendDynamicPartsToModel( cvf::ModelBasicList* model,
|
||||
cvf::Transform* scaleTransform,
|
||||
size_t timeStepIndex,
|
||||
cvf::UByteArray* visibleCells = nullptr );
|
||||
void clearGeometry();
|
||||
|
||||
std::vector<RimExtrudedCurveIntersection*> intersections() const;
|
||||
std::vector<RimBoxIntersection*> intersectionBoxes() const;
|
||||
@@ -84,6 +90,8 @@ public:
|
||||
|
||||
void onChildAdded( caf::PdmFieldHandle* containerForNewObject ) override;
|
||||
|
||||
bool isActive() const;
|
||||
|
||||
protected:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
caf::PdmFieldHandle* objectToggleField() override;
|
||||
@@ -91,11 +99,14 @@ protected:
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void initAfterRead() override;
|
||||
|
||||
private:
|
||||
RimEclipseView* eclipseView() const;
|
||||
void rebuild3dView() const;
|
||||
|
||||
caf::PdmField<bool> m_isActive;
|
||||
|
||||
caf::PdmChildArrayField<RimExtrudedCurveIntersection*> m_intersections;
|
||||
caf::PdmChildArrayField<RimBoxIntersection*> m_intersectionBoxes;
|
||||
|
||||
@@ -103,4 +114,9 @@ private:
|
||||
caf::PdmField<double> m_depthUpperThreshold;
|
||||
caf::PdmField<double> m_depthLowerThreshold;
|
||||
caf::PdmField<caf::AppEnum<RimIntersectionFilterEnum>> m_depthFilterType;
|
||||
|
||||
caf::PdmField<bool> m_applyCellFilters;
|
||||
|
||||
caf::PdmField<bool> m_kFilterOverridden;
|
||||
caf::PdmField<QString> m_kFilterStr;
|
||||
};
|
||||
|
||||
@@ -29,7 +29,7 @@ void caf::AppEnum<RimIntersectionFilterEnum>::setUp()
|
||||
addItem( RimIntersectionFilterEnum::INTERSECT_FILTER_ABOVE, "INTERSECT_SHOW_ABOVE", "Above" );
|
||||
addItem( RimIntersectionFilterEnum::INTERSECT_FILTER_BELOW, "INTERSECT_SHOW_BELOW", "Below" );
|
||||
addItem( RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN, "INTERSECT_SHOW_BELOW", "Between" );
|
||||
setDefault( RimIntersectionFilterEnum::INTERSECT_FILTER_NONE );
|
||||
setDefault( RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN );
|
||||
}
|
||||
|
||||
} // namespace caf
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
|
||||
#include "RimIntersectionResultDefinition.h"
|
||||
|
||||
#include "RiaResultNames.h"
|
||||
#include "RigCaseCellResultsData.h"
|
||||
|
||||
#include "Rim2dIntersectionView.h"
|
||||
#include "RimCase.h"
|
||||
#include "RimEclipseCase.h"
|
||||
@@ -101,8 +104,7 @@ void RimIntersectionResultDefinition::assignCaseIfMissing() const
|
||||
{
|
||||
if ( !m_case )
|
||||
{
|
||||
RimCase* ownerCase = nullptr;
|
||||
this->firstAncestorOrThisOfType( ownerCase );
|
||||
auto ownerCase = firstAncestorOrThisOfType<RimCase>();
|
||||
const_cast<RimIntersectionResultDefinition*>( this )->setActiveCase( ownerCase );
|
||||
}
|
||||
}
|
||||
@@ -328,14 +330,12 @@ void RimIntersectionResultDefinition::fieldChangedByUi( const caf::PdmFieldHandl
|
||||
|
||||
this->updateConnectedEditors();
|
||||
|
||||
RimIntersectionResultsDefinitionCollection* interResDefColl = nullptr;
|
||||
this->firstAncestorOrThisOfType( interResDefColl );
|
||||
bool isInAction = isActive() && interResDefColl && interResDefColl->isActive();
|
||||
auto interResDefColl = firstAncestorOrThisOfType<RimIntersectionResultsDefinitionCollection>();
|
||||
bool isInAction = isActive() && interResDefColl && interResDefColl->isActive();
|
||||
|
||||
if ( changedField == &m_isActive || ( changedField == &m_timeStep && isInAction ) )
|
||||
{
|
||||
std::vector<PdmObject*> referringObjects;
|
||||
this->objectsWithReferringPtrFieldsOfType( referringObjects );
|
||||
std::vector<PdmObject*> referringObjects = objectsWithReferringPtrFieldsOfType<PdmObject>();
|
||||
for ( auto* obj : referringObjects )
|
||||
{
|
||||
obj->updateConnectedEditors();
|
||||
@@ -346,8 +346,7 @@ void RimIntersectionResultDefinition::fieldChangedByUi( const caf::PdmFieldHandl
|
||||
|
||||
if ( reDraw )
|
||||
{
|
||||
RimGridView* gridView = nullptr;
|
||||
this->firstAncestorOrThisOfType( gridView );
|
||||
auto gridView = firstAncestorOrThisOfType<RimGridView>();
|
||||
if ( gridView ) gridView->scheduleCreateDisplayModelAndRedraw();
|
||||
|
||||
update2dIntersectionViews();
|
||||
@@ -364,9 +363,7 @@ void RimIntersectionResultDefinition::update2dIntersectionViews()
|
||||
// Update 2D Intersection views
|
||||
updateCaseInResultDefinitions();
|
||||
|
||||
std::vector<RimExtrudedCurveIntersection*> intersections;
|
||||
this->objectsWithReferringPtrFieldsOfType( intersections );
|
||||
|
||||
auto intersections = objectsWithReferringPtrFieldsOfType<RimExtrudedCurveIntersection>();
|
||||
for ( auto intersection : intersections )
|
||||
{
|
||||
if ( intersection && intersection->correspondingIntersectionView() )
|
||||
@@ -387,7 +384,10 @@ void RimIntersectionResultDefinition::setDefaultEclipseLegendConfig()
|
||||
auto eclResultDef = this->eclipseResultDefinition();
|
||||
eclResultDef->updateRangesForExplicitLegends( this->regularLegendConfig(), this->ternaryLegendConfig(), this->timeStep() );
|
||||
|
||||
m_legendConfig->setDefaultConfigForResultName( m_eclipseResultDefinition->resultVariable(), useDiscreteLogLevels, isCategoryResult );
|
||||
m_legendConfig->setDefaultConfigForResultName( m_case->caseId(),
|
||||
m_eclipseResultDefinition->resultVariable(),
|
||||
useDiscreteLogLevels,
|
||||
isCategoryResult );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -428,7 +428,7 @@ void RimIntersectionResultDefinition::defineUiOrdering( QString uiConfigName, ca
|
||||
m_geomResultDefinition->uiOrdering( uiConfigName, uiOrdering );
|
||||
}
|
||||
|
||||
if ( ( eclipseCase && m_eclipseResultDefinition->hasDynamicResult() || m_eclipseResultDefinition->isTernarySaturationSelected() ) ||
|
||||
if ( ( ( eclipseCase && ( m_eclipseResultDefinition->hasDynamicResult() || m_eclipseResultDefinition->isTernarySaturationSelected() ) ) ) ||
|
||||
geomCase )
|
||||
{
|
||||
uiOrdering.add( &m_timeStep );
|
||||
@@ -488,8 +488,7 @@ void RimIntersectionResultDefinition::updateCaseInResultDefinitions()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimIntersectionResultDefinition::isInAction() const
|
||||
{
|
||||
RimIntersectionResultsDefinitionCollection* interResDefColl = nullptr;
|
||||
this->firstAncestorOrThisOfType( interResDefColl );
|
||||
auto interResDefColl = firstAncestorOrThisOfType<RimIntersectionResultsDefinitionCollection>();
|
||||
|
||||
return isActive() && interResDefColl && interResDefColl->isActive();
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ bool RimIntersectionResultsDefinitionCollection::isActive() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimIntersectionResultDefinition*> RimIntersectionResultsDefinitionCollection::intersectionResultsDefinitions() const
|
||||
{
|
||||
return m_intersectionResultsDefs.children();
|
||||
return m_intersectionResultsDefs.childrenByType();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -73,8 +73,7 @@ void RimIntersectionResultsDefinitionCollection::appendIntersectionResultDefinit
|
||||
|
||||
if ( interResDef->activeCase() == nullptr )
|
||||
{
|
||||
RimCase* ownerCase = nullptr;
|
||||
this->firstAncestorOrThisOfType( ownerCase );
|
||||
auto ownerCase = firstAncestorOrThisOfType<RimCase>();
|
||||
interResDef->setActiveCase( ownerCase );
|
||||
}
|
||||
}
|
||||
@@ -96,8 +95,7 @@ void RimIntersectionResultsDefinitionCollection::fieldChangedByUi( const caf::Pd
|
||||
{
|
||||
this->updateUiIconFromToggleField();
|
||||
|
||||
RimGridView* gridView = nullptr;
|
||||
this->firstAncestorOrThisOfType( gridView );
|
||||
auto gridView = firstAncestorOrThisOfType<RimGridView>();
|
||||
if ( gridView ) gridView->scheduleCreateDisplayModelAndRedraw();
|
||||
if ( intersectionResultsDefinitions().size() > 0 ) intersectionResultsDefinitions()[0]->update2dIntersectionViews();
|
||||
}
|
||||
@@ -116,8 +114,7 @@ void RimIntersectionResultsDefinitionCollection::initAfterRead()
|
||||
void RimIntersectionResultsDefinitionCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
RimGridView* gridView = nullptr;
|
||||
this->firstAncestorOrThisOfType( gridView );
|
||||
auto gridView = firstAncestorOrThisOfType<RimGridView>();
|
||||
if ( gridView )
|
||||
{
|
||||
gridView->scheduleCreateDisplayModelAndRedraw();
|
||||
|
||||
Reference in New Issue
Block a user