mirror of
https://github.com/OPM/ResInsight.git
synced 2024-12-29 10:21:54 -06:00
Sync seismic section with well path changes. (#10090)
* Sync seismic section with well path changes. * Make sure we pick seismic textures/coordinates that fits the z steps of the seismic data.
This commit is contained in:
parent
7427e7b6e9
commit
dc4d4022d2
@ -426,6 +426,7 @@ void RimSeismicSection::deleteTarget( RimPolylineTarget* targetToDelete )
|
||||
void RimSeismicSection::updateVisualization()
|
||||
{
|
||||
if ( texturedSection().notNull() ) texturedSection()->setWhatToUpdate( RigTexturedSection::WhatToUpdateEnum::UPDATE_GEOMETRY );
|
||||
m_wellPathPoints.clear();
|
||||
scheduleViewUpdate();
|
||||
}
|
||||
|
||||
@ -953,22 +954,44 @@ void RimSeismicSection::setDepthFilter( RimIntersectionFilterEnum filterType, in
|
||||
m_zLowerThreshold = lowerValue;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RimSeismicSection::alignZValue( int z ) const
|
||||
{
|
||||
if ( m_seismicData == nullptr ) return z;
|
||||
|
||||
const int zMin = (int)m_seismicData->zMin();
|
||||
const int zStep = (int)m_seismicData->zStep();
|
||||
|
||||
int alignedZ = ( ( z - zMin ) / zStep );
|
||||
alignedZ *= zStep;
|
||||
alignedZ += zMin;
|
||||
|
||||
return alignedZ;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RimSeismicSection::upperFilterZ( int upperGridLimit ) const
|
||||
{
|
||||
int retVal;
|
||||
switch ( zFilterType() )
|
||||
{
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_BELOW:
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN:
|
||||
return m_zUpperThreshold;
|
||||
retVal = m_zUpperThreshold;
|
||||
break;
|
||||
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_ABOVE:
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_NONE:
|
||||
default:
|
||||
return upperGridLimit;
|
||||
retVal = upperGridLimit;
|
||||
break;
|
||||
}
|
||||
|
||||
return alignZValue( retVal );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -976,17 +999,22 @@ int RimSeismicSection::upperFilterZ( int upperGridLimit ) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RimSeismicSection::lowerFilterZ( int lowerGridLimit ) const
|
||||
{
|
||||
int retVal;
|
||||
switch ( zFilterType() )
|
||||
{
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_ABOVE:
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN:
|
||||
return m_zLowerThreshold;
|
||||
retVal = m_zLowerThreshold;
|
||||
break;
|
||||
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_BELOW:
|
||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_NONE:
|
||||
default:
|
||||
return lowerGridLimit;
|
||||
retVal = lowerGridLimit;
|
||||
break;
|
||||
}
|
||||
|
||||
return alignZValue( retVal );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -117,9 +117,10 @@ protected:
|
||||
private:
|
||||
void defineCustomContextMenu( const caf::PdmFieldHandle* fieldNeedingMenu, QMenu* menu, QWidget* fieldEditorWidget ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
|
||||
void onLegendConfigChanged( const caf::SignalEmitter* emitter, RimLegendConfigChangeType changeType );
|
||||
|
||||
int alignZValue( int z ) const;
|
||||
|
||||
void initSliceRanges();
|
||||
|
||||
void scheduleViewUpdate();
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "RimExtrudedCurveIntersection.h"
|
||||
#include "RimPlotCurve.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSeismicSection.h"
|
||||
#include "RimTools.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathFracture.h"
|
||||
@ -81,29 +82,36 @@ void RimModeledWellPath::updateWellPathVisualization()
|
||||
{
|
||||
createWellPathGeometry();
|
||||
|
||||
std::vector<RimPlotCurve*> refferingCurves;
|
||||
this->objectsWithReferringPtrFieldsOfType( refferingCurves );
|
||||
std::vector<RimPlotCurve*> referringCurves;
|
||||
objectsWithReferringPtrFieldsOfType( referringCurves );
|
||||
|
||||
for ( auto curve : refferingCurves )
|
||||
for ( auto curve : referringCurves )
|
||||
{
|
||||
curve->loadDataAndUpdate( false );
|
||||
}
|
||||
|
||||
for ( auto fracture : this->fractureCollection()->activeFractures() )
|
||||
for ( auto fracture : fractureCollection()->activeFractures() )
|
||||
{
|
||||
fracture->loadDataAndUpdate();
|
||||
}
|
||||
|
||||
std::vector<RimExtrudedCurveIntersection*> refferingIntersections;
|
||||
this->objectsWithReferringPtrFieldsOfType( refferingIntersections );
|
||||
std::vector<RimExtrudedCurveIntersection*> referringIntersections;
|
||||
objectsWithReferringPtrFieldsOfType( referringIntersections );
|
||||
|
||||
for ( auto intersection : refferingIntersections )
|
||||
for ( auto intersection : referringIntersections )
|
||||
{
|
||||
intersection->rebuildGeometryAndScheduleCreateDisplayModel();
|
||||
}
|
||||
|
||||
std::vector<RimSeismicSection*> referringSeismic;
|
||||
objectsWithReferringPtrFieldsOfType( referringSeismic );
|
||||
for ( auto seisSec : referringSeismic )
|
||||
{
|
||||
seisSec->updateVisualization();
|
||||
}
|
||||
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfTypeAsserted( proj );
|
||||
firstAncestorOrThisOfTypeAsserted( proj );
|
||||
proj->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
@ -197,16 +205,6 @@ void RimModeledWellPath::onGeometryDefinitionChanged( const caf::SignalEmitter*
|
||||
updateGeometry( fullUpdate );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimModeledWellPath::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
// TODO remove if nothing happens here
|
||||
|
||||
RimWellPath::fieldChangedByUi( changedField, oldValue, newValue );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -47,8 +47,6 @@ private:
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void onGeometryDefinitionChanged( const caf::SignalEmitter* emitter, bool fullUpdate );
|
||||
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override;
|
||||
|
||||
void updateGeometry( bool fullUpdate );
|
||||
|
Loading…
Reference in New Issue
Block a user