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:
jonjenssen 2023-04-14 10:49:05 +02:00 committed by GitHub
parent 7427e7b6e9
commit dc4d4022d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 50 additions and 25 deletions

View File

@ -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 );
}
//--------------------------------------------------------------------------------------------------

View File

@ -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();

View File

@ -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 );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -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 );