mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Seismic support improvments (#10086)
Adds support for creating seismic sections from well paths and existing intersections. Adds more stability and user improvements
This commit is contained in:
@@ -5,6 +5,8 @@ set(SOURCE_GROUP_HEADER_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewZSliceSeismicSectionFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicSeismicSectionFeatureImpl.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewPolylineSeismicSectionFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewWellpathSeismicSectionFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicSeismicSectionFromIntersectionFeature.h
|
||||
)
|
||||
|
||||
set(SOURCE_GROUP_SOURCE_FILES
|
||||
@@ -14,6 +16,8 @@ set(SOURCE_GROUP_SOURCE_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewZSliceSeismicSectionFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicSeismicSectionFeatureImpl.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewPolylineSeismicSectionFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewWellpathSeismicSectionFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicSeismicSectionFromIntersectionFeature.cpp
|
||||
)
|
||||
|
||||
list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES})
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2020- Equinor ASA
|
||||
// Copyright (C) 2023 Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
@@ -17,16 +17,9 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RicNewInlineSeismicSectionFeature.h"
|
||||
|
||||
#include "RicSeismicSectionFeatureImpl.h"
|
||||
|
||||
#include "RimGridView.h"
|
||||
#include "RimSeismicSection.h"
|
||||
#include "RimSeismicSectionCollection.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafSelectionManagerTools.h"
|
||||
#include "cafUtils.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicNewInlineSeismicSectionFeature, "RicNewInlineSeismicSectionFeature" );
|
||||
@@ -44,7 +37,7 @@ bool RicNewInlineSeismicSectionFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewInlineSeismicSectionFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
RicSeismicSectionFeatureImpl::createSeismicSection( "Inline", RiaDefines::SeismicSectionType::SS_INLINE );
|
||||
RicSeismicSectionFeatureImpl::createSeismicSection( RiaDefines::SeismicSectionType::SS_INLINE );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2020- Equinor ASA
|
||||
// Copyright (C) 2023 Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
@@ -17,16 +17,9 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RicNewPolylineSeismicSectionFeature.h"
|
||||
|
||||
#include "RicSeismicSectionFeatureImpl.h"
|
||||
|
||||
#include "RimGridView.h"
|
||||
#include "RimSeismicSection.h"
|
||||
#include "RimSeismicSectionCollection.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafSelectionManagerTools.h"
|
||||
#include "cafUtils.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicNewPolylineSeismicSectionFeature, "RicNewPolylineSeismicSectionFeature" );
|
||||
@@ -44,7 +37,7 @@ bool RicNewPolylineSeismicSectionFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewPolylineSeismicSectionFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
RicSeismicSectionFeatureImpl::createSeismicSection( "Polyline Section", RiaDefines::SeismicSectionType::SS_POLYLINE );
|
||||
RicSeismicSectionFeatureImpl::createSeismicSection( RiaDefines::SeismicSectionType::SS_POLYLINE );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@@ -0,0 +1,50 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2023 Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RicNewWellpathSeismicSectionFeature.h"
|
||||
|
||||
#include "RicSeismicSectionFeatureImpl.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicNewWellpathSeismicSectionFeature, "RicNewWellpathSeismicSectionFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewWellpathSeismicSectionFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewWellpathSeismicSectionFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
RicSeismicSectionFeatureImpl::createSeismicSection( RiaDefines::SeismicSectionType::SS_WELLPATH );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewWellpathSeismicSectionFeature::setupActionLook( QAction* actionToSetup )
|
||||
{
|
||||
actionToSetup->setIcon( QIcon( ":/Seismic16x16.png" ) );
|
||||
actionToSetup->setText( "New Well Path Section" );
|
||||
}
|
@@ -0,0 +1,34 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2023 Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cafCmdFeature.h"
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicNewWellpathSeismicSectionFeature : public caf::CmdFeature
|
||||
{
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
@@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2020- Equinor ASA
|
||||
// Copyright (C) 2023 Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
@@ -17,6 +17,7 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RicNewXlineSeismicSectionFeature.h"
|
||||
|
||||
#include "RicSeismicSectionFeatureImpl.h"
|
||||
|
||||
#include <QAction>
|
||||
@@ -36,7 +37,7 @@ bool RicNewXlineSeismicSectionFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewXlineSeismicSectionFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
RicSeismicSectionFeatureImpl::createSeismicSection( "Xline", RiaDefines::SeismicSectionType::SS_XLINE );
|
||||
RicSeismicSectionFeatureImpl::createSeismicSection( RiaDefines::SeismicSectionType::SS_XLINE );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2020- Equinor ASA
|
||||
// Copyright (C) 2023 Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
@@ -17,16 +17,9 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RicNewZSliceSeismicSectionFeature.h"
|
||||
|
||||
#include "RicSeismicSectionFeatureImpl.h"
|
||||
|
||||
#include "RimGridView.h"
|
||||
#include "RimSeismicSection.h"
|
||||
#include "RimSeismicSectionCollection.h"
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafSelectionManagerTools.h"
|
||||
#include "cafUtils.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicNewZSliceSeismicSectionFeature, "RicNewZSliceSeismicSectionFeature" );
|
||||
@@ -44,7 +37,7 @@ bool RicNewZSliceSeismicSectionFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewZSliceSeismicSectionFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
RicSeismicSectionFeatureImpl::createSeismicSection( "Depth Slice", RiaDefines::SeismicSectionType::SS_DEPTHSLICE );
|
||||
RicSeismicSectionFeatureImpl::createSeismicSection( RiaDefines::SeismicSectionType::SS_DEPTHSLICE );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@@ -28,7 +28,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicSeismicSectionFeatureImpl::createSeismicSection( const QString& name, RiaDefines::SeismicSectionType sectionType )
|
||||
void RicSeismicSectionFeatureImpl::createSeismicSection( RiaDefines::SeismicSectionType sectionType )
|
||||
{
|
||||
// Find the selected seismic section collection
|
||||
std::vector<RimSeismicSectionCollection*> colls = caf::selectedObjectsByTypeStrict<RimSeismicSectionCollection*>();
|
||||
@@ -39,7 +39,6 @@ void RicSeismicSectionFeatureImpl::createSeismicSection( const QString& name, Ri
|
||||
if ( newSection )
|
||||
{
|
||||
newSection->setSectionType( sectionType );
|
||||
newSection->setUserDescription( name );
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( newSection );
|
||||
if ( sectionType == RiaDefines::SeismicSectionType::SS_POLYLINE ) newSection->enablePicking( true );
|
||||
}
|
||||
|
@@ -25,5 +25,5 @@ class QString;
|
||||
class RicSeismicSectionFeatureImpl
|
||||
{
|
||||
public:
|
||||
static void createSeismicSection( const QString& name, RiaDefines::SeismicSectionType sectionType );
|
||||
static void createSeismicSection( RiaDefines::SeismicSectionType sectionType );
|
||||
};
|
||||
|
@@ -0,0 +1,135 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2023 Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RicSeismicSectionFromIntersectionFeature.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaSeismicDefines.h"
|
||||
|
||||
#include "RimExtrudedCurveIntersection.h"
|
||||
#include "RimGridView.h"
|
||||
#include "RimPolylineTarget.h"
|
||||
#include "RimSeismicSection.h"
|
||||
#include "RimSeismicSectionCollection.h"
|
||||
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "cafSelectionManagerTools.h"
|
||||
#include "cafUtils.h"
|
||||
|
||||
#include "cvfBoundingBox.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicSeismicSectionFromIntersectionFeature, "RicSeismicSectionFromIntersectionFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicSeismicSectionFromIntersectionFeature::isCommandEnabled()
|
||||
{
|
||||
RimExtrudedCurveIntersection* intersection = getSelectedIntersection();
|
||||
if ( intersection != nullptr )
|
||||
{
|
||||
return ( ( intersection->type() == RimExtrudedCurveIntersection::CrossSectionEnum::CS_POLYLINE ) ||
|
||||
( intersection->type() == RimExtrudedCurveIntersection::CrossSectionEnum::CS_WELL_PATH ) );
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicSeismicSectionFromIntersectionFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
RimExtrudedCurveIntersection* intersection = getSelectedIntersection();
|
||||
if ( intersection == nullptr ) return;
|
||||
|
||||
RimGridView* activeView = RiaApplication::instance()->activeGridView();
|
||||
if ( activeView == nullptr ) return;
|
||||
|
||||
auto bbox = activeView->domainBoundingBox();
|
||||
|
||||
RimSeismicSectionCollection* seisColl = activeView->seismicSectionCollection();
|
||||
RimSeismicSection* newSection = seisColl->addNewSection();
|
||||
if ( !newSection ) return;
|
||||
|
||||
if ( intersection->type() == RimExtrudedCurveIntersection::CrossSectionEnum::CS_POLYLINE )
|
||||
{
|
||||
newSection->setSectionType( RiaDefines::SeismicSectionType::SS_POLYLINE );
|
||||
newSection->setUserDescription( intersection->name() );
|
||||
|
||||
auto polyline = intersection->polyLines();
|
||||
if ( polyline.size() > 0 )
|
||||
{
|
||||
for ( auto& p : polyline[0] )
|
||||
{
|
||||
RimPolylineTarget* target = new RimPolylineTarget();
|
||||
target->setAsPointXYZ( p );
|
||||
newSection->addTargetNoUpdate( target );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( ( intersection->type() == RimExtrudedCurveIntersection::CrossSectionEnum::CS_WELL_PATH ) )
|
||||
{
|
||||
newSection->setSectionType( RiaDefines::SeismicSectionType::SS_WELLPATH );
|
||||
newSection->setWellPath( intersection->wellPath() );
|
||||
}
|
||||
|
||||
if ( intersection->depthFilterType() == RimIntersectionFilterEnum::INTERSECT_FILTER_NONE )
|
||||
{
|
||||
newSection->setDepthFilter( RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN,
|
||||
(int)( -1 * bbox.max().z() ),
|
||||
(int)( -1 * bbox.min().z() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
newSection->setDepthFilter( intersection->depthFilterType(),
|
||||
(int)-1 * intersection->upperFilterDepth( bbox.max().z() ),
|
||||
(int)-1 * intersection->lowerFilterDepth( ( bbox.min().z() ) ) );
|
||||
}
|
||||
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( newSection );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicSeismicSectionFromIntersectionFeature::setupActionLook( QAction* actionToSetup )
|
||||
{
|
||||
actionToSetup->setIcon( QIcon( ":/Seismic16x16.png" ) );
|
||||
actionToSetup->setText( "Create as Seismic Section" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimExtrudedCurveIntersection* RicSeismicSectionFromIntersectionFeature::getSelectedIntersection()
|
||||
{
|
||||
std::vector<caf::PdmUiItem*> selectedUiItems;
|
||||
caf::SelectionManager::instance()->selectedItems( selectedUiItems );
|
||||
|
||||
RimExtrudedCurveIntersection* intersection = nullptr;
|
||||
|
||||
if ( !selectedUiItems.empty() )
|
||||
{
|
||||
intersection = dynamic_cast<RimExtrudedCurveIntersection*>( selectedUiItems[0] );
|
||||
}
|
||||
return intersection;
|
||||
}
|
@@ -0,0 +1,40 @@
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2023 Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cafCmdFeature.h"
|
||||
|
||||
class RimExtrudedCurveIntersection;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicSeismicSectionFromIntersectionFeature : public caf::CmdFeature
|
||||
{
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
|
||||
private:
|
||||
RimExtrudedCurveIntersection* getSelectedIntersection();
|
||||
};
|
Reference in New Issue
Block a user