mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -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()
|
void RimSeismicSection::updateVisualization()
|
||||||
{
|
{
|
||||||
if ( texturedSection().notNull() ) texturedSection()->setWhatToUpdate( RigTexturedSection::WhatToUpdateEnum::UPDATE_GEOMETRY );
|
if ( texturedSection().notNull() ) texturedSection()->setWhatToUpdate( RigTexturedSection::WhatToUpdateEnum::UPDATE_GEOMETRY );
|
||||||
|
m_wellPathPoints.clear();
|
||||||
scheduleViewUpdate();
|
scheduleViewUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -953,22 +954,44 @@ void RimSeismicSection::setDepthFilter( RimIntersectionFilterEnum filterType, in
|
|||||||
m_zLowerThreshold = lowerValue;
|
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 RimSeismicSection::upperFilterZ( int upperGridLimit ) const
|
||||||
{
|
{
|
||||||
|
int retVal;
|
||||||
switch ( zFilterType() )
|
switch ( zFilterType() )
|
||||||
{
|
{
|
||||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_BELOW:
|
case RimIntersectionFilterEnum::INTERSECT_FILTER_BELOW:
|
||||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN:
|
case RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN:
|
||||||
return m_zUpperThreshold;
|
retVal = m_zUpperThreshold;
|
||||||
|
break;
|
||||||
|
|
||||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_ABOVE:
|
case RimIntersectionFilterEnum::INTERSECT_FILTER_ABOVE:
|
||||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_NONE:
|
case RimIntersectionFilterEnum::INTERSECT_FILTER_NONE:
|
||||||
default:
|
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 RimSeismicSection::lowerFilterZ( int lowerGridLimit ) const
|
||||||
{
|
{
|
||||||
|
int retVal;
|
||||||
switch ( zFilterType() )
|
switch ( zFilterType() )
|
||||||
{
|
{
|
||||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_ABOVE:
|
case RimIntersectionFilterEnum::INTERSECT_FILTER_ABOVE:
|
||||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN:
|
case RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN:
|
||||||
return m_zLowerThreshold;
|
retVal = m_zLowerThreshold;
|
||||||
|
break;
|
||||||
|
|
||||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_BELOW:
|
case RimIntersectionFilterEnum::INTERSECT_FILTER_BELOW:
|
||||||
case RimIntersectionFilterEnum::INTERSECT_FILTER_NONE:
|
case RimIntersectionFilterEnum::INTERSECT_FILTER_NONE:
|
||||||
default:
|
default:
|
||||||
return lowerGridLimit;
|
retVal = lowerGridLimit;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return alignZValue( retVal );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -117,9 +117,10 @@ protected:
|
|||||||
private:
|
private:
|
||||||
void defineCustomContextMenu( const caf::PdmFieldHandle* fieldNeedingMenu, QMenu* menu, QWidget* fieldEditorWidget ) override;
|
void defineCustomContextMenu( const caf::PdmFieldHandle* fieldNeedingMenu, QMenu* menu, QWidget* fieldEditorWidget ) override;
|
||||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||||
|
|
||||||
void onLegendConfigChanged( const caf::SignalEmitter* emitter, RimLegendConfigChangeType changeType );
|
void onLegendConfigChanged( const caf::SignalEmitter* emitter, RimLegendConfigChangeType changeType );
|
||||||
|
|
||||||
|
int alignZValue( int z ) const;
|
||||||
|
|
||||||
void initSliceRanges();
|
void initSliceRanges();
|
||||||
|
|
||||||
void scheduleViewUpdate();
|
void scheduleViewUpdate();
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "RimExtrudedCurveIntersection.h"
|
#include "RimExtrudedCurveIntersection.h"
|
||||||
#include "RimPlotCurve.h"
|
#include "RimPlotCurve.h"
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
|
#include "RimSeismicSection.h"
|
||||||
#include "RimTools.h"
|
#include "RimTools.h"
|
||||||
#include "RimWellPath.h"
|
#include "RimWellPath.h"
|
||||||
#include "RimWellPathFracture.h"
|
#include "RimWellPathFracture.h"
|
||||||
@ -81,29 +82,36 @@ void RimModeledWellPath::updateWellPathVisualization()
|
|||||||
{
|
{
|
||||||
createWellPathGeometry();
|
createWellPathGeometry();
|
||||||
|
|
||||||
std::vector<RimPlotCurve*> refferingCurves;
|
std::vector<RimPlotCurve*> referringCurves;
|
||||||
this->objectsWithReferringPtrFieldsOfType( refferingCurves );
|
objectsWithReferringPtrFieldsOfType( referringCurves );
|
||||||
|
|
||||||
for ( auto curve : refferingCurves )
|
for ( auto curve : referringCurves )
|
||||||
{
|
{
|
||||||
curve->loadDataAndUpdate( false );
|
curve->loadDataAndUpdate( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( auto fracture : this->fractureCollection()->activeFractures() )
|
for ( auto fracture : fractureCollection()->activeFractures() )
|
||||||
{
|
{
|
||||||
fracture->loadDataAndUpdate();
|
fracture->loadDataAndUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<RimExtrudedCurveIntersection*> refferingIntersections;
|
std::vector<RimExtrudedCurveIntersection*> referringIntersections;
|
||||||
this->objectsWithReferringPtrFieldsOfType( refferingIntersections );
|
objectsWithReferringPtrFieldsOfType( referringIntersections );
|
||||||
|
|
||||||
for ( auto intersection : refferingIntersections )
|
for ( auto intersection : referringIntersections )
|
||||||
{
|
{
|
||||||
intersection->rebuildGeometryAndScheduleCreateDisplayModel();
|
intersection->rebuildGeometryAndScheduleCreateDisplayModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<RimSeismicSection*> referringSeismic;
|
||||||
|
objectsWithReferringPtrFieldsOfType( referringSeismic );
|
||||||
|
for ( auto seisSec : referringSeismic )
|
||||||
|
{
|
||||||
|
seisSec->updateVisualization();
|
||||||
|
}
|
||||||
|
|
||||||
RimProject* proj;
|
RimProject* proj;
|
||||||
this->firstAncestorOrThisOfTypeAsserted( proj );
|
firstAncestorOrThisOfTypeAsserted( proj );
|
||||||
proj->scheduleCreateDisplayModelAndRedrawAllViews();
|
proj->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,16 +205,6 @@ void RimModeledWellPath::onGeometryDefinitionChanged( const caf::SignalEmitter*
|
|||||||
updateGeometry( fullUpdate );
|
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 defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||||
void onGeometryDefinitionChanged( const caf::SignalEmitter* emitter, bool fullUpdate );
|
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;
|
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override;
|
||||||
|
|
||||||
void updateGeometry( bool fullUpdate );
|
void updateGeometry( bool fullUpdate );
|
||||||
|
Loading…
Reference in New Issue
Block a user