Merge pull request #5312 from OPM/feature-reservoir-surface-import

Feature reservoir surface import
This commit is contained in:
Magne Sjaastad 2020-01-08 14:27:33 +01:00 committed by GitHub
commit cbe89c05c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
36 changed files with 1709 additions and 175 deletions

View File

@ -71,6 +71,7 @@
#include "RimSummaryCaseMainCollection.h"
#include "RimSummaryCrossPlotCollection.h"
#include "RimSummaryPlot.h"
#include "RimSurfaceCollection.h"
#include "RimTextAnnotation.h"
#include "RimTextAnnotationInView.h"
#include "RimViewLinker.h"
@ -541,6 +542,8 @@ bool RiaApplication::loadProject( const QString& projectFileName,
fracture->loadDataAndUpdate();
}
}
oilField->surfaceCollection()->loadData();
}
// If load action is specified to recalculate statistics, do it now.

View File

@ -57,6 +57,7 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/ModelVisualization
${CMAKE_CURRENT_SOURCE_DIR}/ModelVisualization/GridBox
${CMAKE_CURRENT_SOURCE_DIR}/ModelVisualization/Intersections
${CMAKE_CURRENT_SOURCE_DIR}/ModelVisualization/Surfaces
${CMAKE_CURRENT_SOURCE_DIR}/UserInterface
${CMAKE_CURRENT_SOURCE_DIR}/CommandFileInterface
${CMAKE_CURRENT_SOURCE_DIR}/CommandFileInterface/Core
@ -68,6 +69,7 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/ProjectDataModel/GridCrossPlots
${CMAKE_CURRENT_SOURCE_DIR}/ProjectDataModel/Measurement
${CMAKE_CURRENT_SOURCE_DIR}/ProjectDataModel/Summary
${CMAKE_CURRENT_SOURCE_DIR}/ProjectDataModel/Surfaces
${CMAKE_CURRENT_SOURCE_DIR}/ResultStatisticsCache
${CMAKE_CURRENT_SOURCE_DIR}/ReservoirDataModel
@ -134,12 +136,14 @@ list( APPEND REFERENCED_CMAKE_FILES
ProjectDataModel/Completions/CMakeLists_files.cmake
ProjectDataModel/Measurement/CMakeLists_files.cmake
ProjectDataModel/PlotTemplates/CMakeLists_files.cmake
ProjectDataModel/Surfaces/CMakeLists_files.cmake
GeoMech/GeoMechVisualization/CMakeLists_files.cmake
ModelVisualization/CMakeLists_files.cmake
ModelVisualization/GridBox/CMakeLists_files.cmake
ModelVisualization/Intersections/CMakeLists_files.cmake
ModelVisualization/Surfaces/CMakeLists_files.cmake
ModelVisualization/WindowEdgeAxesOverlayItem/CMakeLists_files.cmake
UserInterface/CMakeLists_files.cmake
@ -163,6 +167,7 @@ list( APPEND REFERENCED_CMAKE_FILES
Commands/OperationsUsingObjReferences/CMakeLists_files.cmake
Commands/SummaryPlotCommands/CMakeLists_files.cmake
Commands/SsiHubImportCommands/CMakeLists_files.cmake
Commands/SurfaceCommands/CMakeLists_files.cmake
Commands/ToggleCommands/CMakeLists_files.cmake
Commands/ViewLink/CMakeLists_files.cmake
Commands/WellLogCommands/CMakeLists_files.cmake

View File

@ -22,6 +22,7 @@
#include "RiaGuiApplication.h"
#include "Rim2dIntersectionViewCollection.h"
#include "Rim3dView.h"
#include "RimAnnotationCollection.h"
#include "RimAnnotationInViewCollection.h"
@ -33,6 +34,7 @@
#include "RimEnsembleCurveSet.h"
#include "RimEnsembleCurveSetCollection.h"
#include "RimFormationNamesCollection.h"
#include "RimFractureTemplateCollection.h"
#include "RimGeoMechPropertyFilterCollection.h"
#include "RimIntersectionCollection.h"
#include "RimIntersectionResultsDefinitionCollection.h"
@ -41,6 +43,7 @@
#include "RimSummaryCrossPlotCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RimSurfaceCollection.h"
#include "RimViewLinkerCollection.h"
#include "RimWellLogPlot.h"
#include "RimWellLogPlotCollection.h"
@ -50,9 +53,6 @@
#include "RiuPlotMainWindow.h"
#include "RimFractureTemplateCollection.h"
#include "Rim2dIntersectionViewCollection.h"
#include "cafNotificationCenter.h"
#include "cafPdmChildArrayField.h"
#include "cafPdmDocument.h"
@ -329,6 +329,15 @@ void RicDeleteItemExec::redo()
annotationColl->onAnnotationDeleted();
}
}
{
RimSurfaceCollection* surfCollection;
parentObj->firstAncestorOrThisOfType( surfCollection );
if ( surfCollection )
{
surfCollection->updateViews();
}
}
}
}

View File

@ -54,6 +54,7 @@
#include "RimSummaryCurve.h"
#include "RimSummaryCurveFilter.h"
#include "RimSummaryPlot.h"
#include "RimSurface.h"
#include "RimTextAnnotation.h"
#include "RimViewController.h"
#include "RimWellAllocationPlot.h"
@ -139,6 +140,7 @@ bool isDeletable( caf::PdmUiItem* uiItem )
if ( dynamic_cast<RimReachCircleAnnotation*>( uiItem ) ) return true;
if ( dynamic_cast<RimPolylinesAnnotation*>( uiItem ) ) return true;
if ( dynamic_cast<RimIntersectionResultDefinition*>( uiItem ) ) return true;
if ( dynamic_cast<RimSurface*>( uiItem ) ) return true;
if ( dynamic_cast<RimGridCrossPlot*>( uiItem ) )
{

View File

@ -89,7 +89,7 @@ void RicNewViewFeature::setupActionLook( QAction* actionToSetup )
//--------------------------------------------------------------------------------------------------
Rim3dView* RicNewViewFeature::createReservoirView( RimEclipseCase* eclipseCase, RimGeoMechCase* geomCase )
{
Rim3dView* insertedView = nullptr;
RimGridView* insertedView = nullptr;
if ( eclipseCase )
{
@ -100,6 +100,8 @@ Rim3dView* RicNewViewFeature::createReservoirView( RimEclipseCase* eclipseCase,
insertedView = geomCase->createAndAddReservoirView();
}
insertedView->updateSurfacesInViewTreeItems();
// Must be run before buildViewItems, as wells are created in this function
insertedView->loadDataAndUpdate();

View File

@ -0,0 +1,30 @@
set (SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RicImportSurfacesFeature.h
)
set (SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RicImportSurfacesFeature.cpp
)
list(APPEND CODE_HEADER_FILES
${SOURCE_GROUP_HEADER_FILES}
)
list(APPEND CODE_SOURCE_FILES
${SOURCE_GROUP_SOURCE_FILES}
)
#set (QT_MOC_HEADERS
#${QT_MOC_HEADERS}
#${CMAKE_CURRENT_LIST_DIR}/RicTextAnnotation3dEditor.h
#)
source_group( "CommandFeature\\SurfaceCommands" FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake )
# cotire
caf_cotire_start_unity_at_first_item(SOURCE_GROUP_SOURCE_FILES)
list(APPEND CAF_COTIRE_START_NEW_UNITY_SOURCES
${CMAKE_CURRENT_LIST_DIR}/RicImportSurfacesFeature.cpp
)

View File

@ -0,0 +1,89 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2020- 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 "RicImportSurfacesFeature.h"
#include "RiaApplication.h"
#include "RimOilField.h"
#include "RimProject.h"
#include "RimSurface.h"
#include "RimSurfaceCollection.h"
#include "Riu3DMainWindowTools.h"
#include <QAction>
#include <QFileDialog>
CAF_CMD_SOURCE_INIT( RicImportSurfacesFeature, "RicImportSurfacesFeature" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicImportSurfacesFeature::isCommandEnabled()
{
return true;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicImportSurfacesFeature::onActionTriggered( bool isChecked )
{
RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory( "BINARY_GRID" );
QStringList fileNames = QFileDialog::getOpenFileNames( Riu3DMainWindowTools::mainWindowWidget(),
"Import Surfaces",
defaultDir,
"Petrel surface file (*.ptl);All Files (*.*)" );
if ( fileNames.isEmpty() ) return;
// Remember the path to next time
app->setLastUsedDialogDirectory( "BINARY_GRID", QFileInfo( fileNames.last() ).absolutePath() );
// Find or create the SurfaceCollection
RimProject* proj = RiaApplication::instance()->project();
RimSurfaceCollection* surfColl = proj->activeOilField()->surfaceCollection();
if ( !surfColl )
{
surfColl = new RimSurfaceCollection();
proj->activeOilField()->surfaceCollection = surfColl;
proj->updateConnectedEditors();
}
// For each file,
RimSurface* lastCreatedOrUpdated = surfColl->importSurfacesFromFiles( fileNames );
if ( lastCreatedOrUpdated )
{
Riu3DMainWindowTools::selectAsCurrentItem( lastCreatedOrUpdated );
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicImportSurfacesFeature::setupActionLook( QAction* actionToSetup )
{
actionToSetup->setIcon( QIcon( ":/ReservoirSurfaces16x16.png" ) );
actionToSetup->setText( "Import Surfaces" );
}

View File

@ -0,0 +1,35 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2020- 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 RicImportSurfacesFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;
protected:
// Overrides
bool isCommandEnabled() override;
void onActionTriggered( bool isChecked ) override;
void setupActionLook( QAction* actionToSetup ) override;
};

View File

@ -0,0 +1,18 @@
set (SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RivSurfacePartMgr.h
)
set (SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RivSurfacePartMgr.cpp
)
list(APPEND CODE_HEADER_FILES
${SOURCE_GROUP_HEADER_FILES}
)
list(APPEND CODE_SOURCE_FILES
${SOURCE_GROUP_SOURCE_FILES}
)
source_group( "ModelVisualization\\Surfaces" FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake )

View File

@ -0,0 +1,97 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2020- 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 "RivSurfacePartMgr.h"
#include "RigSurface.h"
#include "RimSurface.h"
#include "RimSurfaceInView.h"
#include "RimCase.h"
#include "cafEffectGenerator.h"
#include "cvfDrawableGeo.h"
#include "cvfModelBasicList.h"
#include "cvfPart.h"
#include "cvfPrimitiveSetIndexedUInt.h"
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RivSurfacePartMgr::RivSurfacePartMgr( RimSurfaceInView* surface )
: m_surfaceInView( surface )
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivSurfacePartMgr::appendNativeGeometryPartsToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform )
{
if ( m_nativeTrianglesPart.isNull() || m_surfaceInView->surface()->surfaceData() != m_usedSurfaceData.p() )
{
generateNativePartGeometry();
}
if ( m_nativeTrianglesPart.notNull() )
{
m_nativeTrianglesPart->setTransform( scaleTransform );
caf::SurfaceEffectGenerator surfaceGen( cvf::Color4f( m_surfaceInView->surface()->color() ), caf::PO_1 );
cvf::ref<cvf::Effect> eff = surfaceGen.generateCachedEffect();
m_nativeTrianglesPart->setEffect( eff.p() );
model->addPart( m_nativeTrianglesPart.p() );
if ( m_nativeMeshLinesPart.notNull() )
{
m_nativeMeshLinesPart->setTransform( scaleTransform );
model->addPart( m_nativeMeshLinesPart.p() );
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivSurfacePartMgr::generateNativePartGeometry()
{
RimCase* ownerCase;
m_surfaceInView->firstAncestorOrThisOfTypeAsserted( ownerCase );
cvf::Vec3d displayModOffsett = ownerCase->displayModelOffset();
m_usedSurfaceData = m_surfaceInView->surface()->surfaceData();
const std::vector<cvf::Vec3d>& vertices = m_usedSurfaceData->vertices();
cvf::ref<cvf::Vec3fArray> cvfVertices = new cvf::Vec3fArray( vertices.size() );
for ( size_t i = 0; i < vertices.size(); ++i )
{
( *cvfVertices )[i] = cvf::Vec3f( vertices[i] - displayModOffsett );
}
const std::vector<unsigned>& triangleIndices = m_usedSurfaceData->triangleIndices();
cvf::ref<cvf::UIntArray> cvfIndices = new cvf::UIntArray( triangleIndices );
cvf::ref<cvf::PrimitiveSetIndexedUInt> indexSet = new cvf::PrimitiveSetIndexedUInt( cvf::PT_TRIANGLES );
indexSet->setIndices( cvfIndices.p() );
cvf::ref<cvf::DrawableGeo> drawGeo = new cvf::DrawableGeo;
drawGeo->addPrimitiveSet( indexSet.p() );
drawGeo->setVertexArray( cvfVertices.p() );
m_nativeTrianglesPart = new cvf::Part();
m_nativeTrianglesPart->setDrawable( drawGeo.p() );
}

View File

@ -0,0 +1,50 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2020- 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 "cafPdmPointer.h"
#include "cvfObject.h"
namespace cvf
{
class ModelBasicList;
class Transform;
class Part;
class ScalarMapper;
class DrawableGeo;
} // namespace cvf
class RimSurfaceInView;
class RigSurface;
class RivSurfacePartMgr : public cvf::Object
{
public:
explicit RivSurfacePartMgr( RimSurfaceInView* surface );
void appendNativeGeometryPartsToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
private:
void generateNativePartGeometry();
caf::PdmPointer<RimSurfaceInView> m_surfaceInView;
cvf::ref<RigSurface> m_usedSurfaceData; // Store the reference to the old data, to know when new data has arrived.
cvf::ref<cvf::Part> m_nativeTrianglesPart;
cvf::ref<cvf::Part> m_nativeMeshLinesPart;
};

View File

@ -102,6 +102,8 @@
#include "RimSummaryCurveCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RimSurface.h"
#include "RimSurfaceCollection.h"
#include "RimValveTemplate.h"
#include "RimValveTemplateCollection.h"
#include "RimViewController.h"
@ -799,6 +801,10 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
menuBuilder << "Separator";
menuBuilder << "RicConvertFractureTemplateUnitFeature";
}
else if ( dynamic_cast<RimSurfaceCollection*>( firstUiItem ) || dynamic_cast<RimSurface*>( firstUiItem ) )
{
menuBuilder << "RicImportSurfacesFeature";
}
else if ( dynamic_cast<RimAnnotationCollection*>( firstUiItem ) ||
dynamic_cast<RimAnnotationGroupCollection*>( firstUiItem ) )
{

View File

@ -71,6 +71,7 @@
#include "RimSimWellInView.h"
#include "RimSimWellInViewCollection.h"
#include "RimStimPlanColors.h"
#include "RimSurfaceInViewCollection.h"
#include "RimTernaryLegendConfig.h"
#include "RimViewController.h"
#include "RimViewLinker.h"
@ -538,6 +539,15 @@ void RimEclipseView::onCreateDisplayModel()
m_reservoirGridPartManager->scaleTransform() );
nativeOrOverrideViewer()->addStaticModelOnce( m_intersectionVizModel.p(), isUsingOverrideViewer() );
// Surfaces
m_surfaceVizModel->removeAllParts();
if ( m_surfaceCollection )
{
m_surfaceCollection->appendPartsToModel( m_surfaceVizModel.p(), m_reservoirGridPartManager->scaleTransform() );
nativeOrOverrideViewer()->addStaticModelOnce( m_surfaceVizModel.p(), isUsingOverrideViewer() );
}
// Well path model
m_wellPathPipeVizModel->removeAllParts();
@ -1754,6 +1764,8 @@ void RimEclipseView::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrderin
uiTreeOrdering.add( annotationCollection() );
uiTreeOrdering.add( intersectionCollection() );
if ( surfaceInViewCollection() ) uiTreeOrdering.add( surfaceInViewCollection() );
uiTreeOrdering.add( m_rangeFilterCollection() );
uiTreeOrdering.add( m_propertyFilterCollection() );
uiTreeOrdering.skipRemainingChildren( true );

View File

@ -42,6 +42,7 @@
#include "RimIntersectionResultDefinition.h"
#include "RimIntersectionResultsDefinitionCollection.h"
#include "RimRegularLegendConfig.h"
#include "RimSurfaceInViewCollection.h"
#include "RimTensorResults.h"
#include "RimTernaryLegendConfig.h"
#include "RimViewLinker.h"
@ -297,6 +298,15 @@ void RimGeoMechView::onCreateDisplayModel()
m_intersectionCollection->appendPartsToModel( *this, m_intersectionVizModel.p(), scaleTransform() );
nativeOrOverrideViewer()->addStaticModelOnce( m_intersectionVizModel.p(), isUsingOverrideViewer() );
// Surfaces
m_surfaceVizModel->removeAllParts();
if ( m_surfaceCollection )
{
m_surfaceCollection->appendPartsToModel( m_surfaceVizModel.p(), scaleTransform() );
nativeOrOverrideViewer()->addStaticModelOnce( m_surfaceVizModel.p(), isUsingOverrideViewer() );
}
// If the animation was active before recreating everything, make viewer view current frame
if ( isTimeStepDependentDataVisibleInThisOrComparisonView() )
@ -907,6 +917,7 @@ void RimGeoMechView::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrderin
uiTreeOrdering.add( &m_wellMeasurementCollection );
uiTreeOrdering.add( m_intersectionCollection() );
if ( surfaceInViewCollection() ) uiTreeOrdering.add( surfaceInViewCollection() );
uiTreeOrdering.add( m_rangeFilterCollection() );
uiTreeOrdering.add( m_propertyFilterCollection() );

View File

@ -29,8 +29,11 @@
#include "RimGridCollection.h"
#include "RimIntersectionCollection.h"
#include "RimIntersectionResultsDefinitionCollection.h"
#include "RimOilField.h"
#include "RimProject.h"
#include "RimPropertyFilterCollection.h"
#include "RimSurfaceCollection.h"
#include "RimSurfaceInViewCollection.h"
#include "RimTextAnnotation.h"
#include "RimViewController.h"
#include "RimViewLinker.h"
@ -45,6 +48,7 @@
#include "RivSingleCellPartGenerator.h"
#include "cvfModel.h"
#include "cvfModelBasicList.h"
#include "cvfPart.h"
#include "cvfScene.h"
@ -97,6 +101,12 @@ RimGridView::RimGridView()
CAF_PDM_InitFieldNoDefault( &m_wellMeasurementCollection, "WellMeasurements", "Well Measurements", "", "", "" );
m_wellMeasurementCollection = new RimWellMeasurementInViewCollection;
m_wellMeasurementCollection.uiCapability()->setUiHidden( true );
CAF_PDM_InitFieldNoDefault( &m_surfaceCollection, "SurfaceInViewCollection", "Surface Collection Field", "", "", "" );
m_surfaceCollection.uiCapability()->setUiTreeHidden( true );
m_surfaceVizModel = new cvf::ModelBasicList;
m_surfaceVizModel->setName( "SurfaceModel" );
}
//--------------------------------------------------------------------------------------------------
@ -174,6 +184,14 @@ RimIntersectionCollection* RimGridView::intersectionCollection() const
return m_intersectionCollection();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSurfaceInViewCollection* RimGridView::surfaceInViewCollection() const
{
return m_surfaceCollection();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -565,3 +583,28 @@ void RimGridView::updateWellMeasurements()
{
m_wellMeasurementCollection->syncWithChangesInWellMeasurementCollection();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridView::updateSurfacesInViewTreeItems()
{
RimProject* proj = RiaApplication::instance()->project();
RimSurfaceCollection* surfColl = proj->activeOilField()->surfaceCollection();
if ( surfColl && surfColl->surfaces().size() )
{
if ( !m_surfaceCollection() )
{
m_surfaceCollection = new RimSurfaceInViewCollection();
}
m_surfaceCollection->updateFromSurfaceCollection();
}
else
{
delete m_surfaceCollection;
}
this->updateConnectedEditors();
}

View File

@ -31,6 +31,7 @@ class RimPropertyFilterCollection;
class RimGridCollection;
class RimCellRangeFilterCollection;
class RimWellMeasurementInViewCollection;
class RimSurfaceInViewCollection;
class RimGridView : public Rim3dView
{
@ -47,6 +48,7 @@ public:
cvf::ref<cvf::UByteArray> currentTotalCellVisibility();
RimIntersectionCollection* intersectionCollection() const;
RimSurfaceInViewCollection* surfaceInViewCollection() const;
RimIntersectionResultsDefinitionCollection* separateIntersectionResultsCollection() const;
RimAnnotationInViewCollection* annotationCollection() const;
RimWellMeasurementInViewCollection* measurementCollection() const;
@ -72,6 +74,7 @@ public:
bool forceChange = false ) override;
void updateWellMeasurements();
void updateSurfacesInViewTreeItems();
protected:
virtual void updateViewFollowingRangeFilterUpdates();
@ -87,6 +90,8 @@ protected:
void initAfterRead() override;
protected:
cvf::ref<cvf::ModelBasicList> m_surfaceVizModel;
// Fields
caf::PdmChildField<RimIntersectionCollection*> m_intersectionCollection;
@ -98,6 +103,7 @@ protected:
caf::PdmChildField<RimGridCollection*> m_gridCollection;
caf::PdmChildField<RimAnnotationInViewCollection*> m_annotationCollection;
caf::PdmChildField<RimWellMeasurementInViewCollection*> m_wellMeasurementCollection;
caf::PdmChildField<RimSurfaceInViewCollection*> m_surfaceCollection;
private:
void onCreatePartCollectionFromSelection( cvf::Collection<cvf::Part>* parts ) override;

View File

@ -31,6 +31,7 @@
#include "RimObservedSummaryData.h"
#include "RimSummaryCase.h"
#include "RimSummaryCaseMainCollection.h"
#include "RimSurfaceCollection.h"
#include "RimValveTemplateCollection.h"
#include "RimWellPathCollection.h"
@ -71,18 +72,20 @@ RimOilField::RimOilField( void )
"",
"" );
completionTemplateCollection = new RimCompletionTemplateCollection;
CAF_PDM_InitFieldNoDefault( &measurement, "Measurement", "Measurement", "", "", "" );
measurement = new RimMeasurement();
measurement.xmlCapability()->disableIO();
analysisModels = new RimEclipseCaseCollection();
wellPathCollection = new RimWellPathCollection();
summaryCaseMainCollection = new RimSummaryCaseMainCollection();
observedDataCollection = new RimObservedDataCollection();
formationNamesCollection = new RimFormationNamesCollection();
annotationCollection = new RimAnnotationCollection();
CAF_PDM_InitFieldNoDefault( &surfaceCollection, "SurfaceCollection", "Surfaces", "", "", "" );
surfaceCollection = new RimSurfaceCollection();
completionTemplateCollection = new RimCompletionTemplateCollection;
analysisModels = new RimEclipseCaseCollection();
wellPathCollection = new RimWellPathCollection();
summaryCaseMainCollection = new RimSummaryCaseMainCollection();
observedDataCollection = new RimObservedDataCollection();
formationNamesCollection = new RimFormationNamesCollection();
annotationCollection = new RimAnnotationCollection();
m_fractureTemplateCollection_OBSOLETE = new RimFractureTemplateCollection;
m_fractureTemplateCollection_OBSOLETE.xmlCapability()->setIOWritable( false );

View File

@ -37,6 +37,7 @@ class RimSummaryCaseMainCollection;
class RimWellPathCollection;
class RimAnnotationCollection;
class RimMeasurement;
class RimSurfaceCollection;
//==================================================================================================
///
@ -67,6 +68,7 @@ public:
caf::PdmChildField<RimFormationNamesCollection*> formationNamesCollection;
caf::PdmChildField<RimAnnotationCollection*> annotationCollection;
caf::PdmChildField<RimMeasurement*> measurement;
caf::PdmChildField<RimSurfaceCollection*> surfaceCollection;
protected:
void initAfterRead() override;

View File

@ -70,6 +70,7 @@
#include "RimSummaryCaseMainCollection.h"
#include "RimSummaryCrossPlotCollection.h"
#include "RimSummaryPlotCollection.h"
#include "RimSurfaceCollection.h"
#include "RimTools.h"
#include "RimUserDefinedPolylinesAnnotation.h"
#include "RimValveTemplate.h"
@ -81,6 +82,7 @@
#include "RimWellLogPlotCollection.h"
#include "RimWellPath.h"
#include "RimWellPathCollection.h"
#include "SsiHubImportCommands/RimWellPathImport.h"
#include "RiuMainWindow.h"
@ -1375,6 +1377,7 @@ void RimProject::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, Q
if ( oilField->analysisModels() ) uiTreeOrdering.add( oilField->analysisModels() );
if ( oilField->geoMechModels() ) uiTreeOrdering.add( oilField->geoMechModels() );
if ( oilField->wellPathCollection() ) uiTreeOrdering.add( oilField->wellPathCollection() );
if ( oilField->surfaceCollection() ) uiTreeOrdering.add( oilField->surfaceCollection() );
if ( oilField->formationNamesCollection() ) uiTreeOrdering.add( oilField->formationNamesCollection() );
if ( oilField->completionTemplateCollection() )
uiTreeOrdering.add( oilField->completionTemplateCollection() );
@ -1396,7 +1399,7 @@ class GlobalPathListMapper
public:
GlobalPathListMapper( const QString& globalPathListTable )
{
m_nextValidIdNumber = 1;
m_maxUsedIdNumber = 0;
QStringList pathPairs = globalPathListTable.split( ";", QString::SkipEmptyParts );
for ( const QString& pathIdPathPair : pathPairs )
@ -1419,7 +1422,7 @@ public:
if ( isOk )
{
m_nextValidIdNumber = std::max( m_nextValidIdNumber, idNumber );
m_maxUsedIdNumber = std::max( m_maxUsedIdNumber, idNumber );
}
}
@ -1513,13 +1516,15 @@ public:
private:
QString createUnusedId()
{
QString numberString = QString( "%1" ).arg( (uint)m_nextValidIdNumber, 3, 10, QChar( '0' ) );
m_maxUsedIdNumber++;
QString numberString = QString( "%1" ).arg( (uint)m_maxUsedIdNumber, 3, 10, QChar( '0' ) );
QString pathIdentifier = PATHIDCHAR + pathIdBaseString + numberString + PATHIDCHAR;
m_nextValidIdNumber++;
return pathIdentifier;
}
size_t m_nextValidIdNumber; // Set when parsing the globalPathListTable. Increment while creating new id's
size_t m_maxUsedIdNumber; // Set when parsing the globalPathListTable. Increment while creating new id's
std::map<QString, QString> m_newPathIdToPathMap;
std::map<QString, QString> m_newPathToPathIdMap;

View File

@ -193,7 +193,7 @@ protected:
private:
template <typename T>
void fieldContentsByType( caf::PdmObjectHandle* object, std::vector<T*>& typedFields );
void fieldContentsByType( caf::PdmObjectHandle* object, std::vector<T*>& fieldContents );
void transferPathsToGlobalPathList();
void distributePathsFromGlobalPathList();
@ -225,7 +225,7 @@ private:
///
//--------------------------------------------------------------------------------------------------
template <typename T>
void RimProject::fieldContentsByType( caf::PdmObjectHandle* object, std::vector<T*>& typedFields )
void RimProject::fieldContentsByType( caf::PdmObjectHandle* object, std::vector<T*>& fieldContents )
{
if ( !object ) return;
@ -237,14 +237,14 @@ void RimProject::fieldContentsByType( caf::PdmObjectHandle* object, std::vector<
for ( const auto& field : allFieldsInObject )
{
caf::PdmField<T>* typedField = dynamic_cast<caf::PdmField<T>*>( field );
if ( typedField ) typedFields.push_back( &typedField->v() );
if ( typedField ) fieldContents.push_back( &typedField->v() );
caf::PdmField<std::vector<T>>* typedFieldInVector = dynamic_cast<caf::PdmField<std::vector<T>>*>( field );
if ( typedFieldInVector )
{
for ( T& typedFieldFromVector : typedFieldInVector->v() )
{
typedFields.push_back( &typedFieldFromVector );
fieldContents.push_back( &typedFieldFromVector );
}
}
@ -253,6 +253,6 @@ void RimProject::fieldContentsByType( caf::PdmObjectHandle* object, std::vector<
for ( const auto& child : children )
{
fieldContentsByType( child, typedFields );
fieldContentsByType( child, fieldContents );
}
}

View File

@ -0,0 +1,24 @@
set (SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RimSurface.h
${CMAKE_CURRENT_LIST_DIR}/RimSurfaceCollection.h
${CMAKE_CURRENT_LIST_DIR}/RimSurfaceInView.h
${CMAKE_CURRENT_LIST_DIR}/RimSurfaceInViewCollection.h
)
set (SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RimSurface.cpp
${CMAKE_CURRENT_LIST_DIR}/RimSurfaceCollection.cpp
${CMAKE_CURRENT_LIST_DIR}/RimSurfaceInView.cpp
${CMAKE_CURRENT_LIST_DIR}/RimSurfaceInViewCollection.cpp
)
list(APPEND CODE_HEADER_FILES
${SOURCE_GROUP_HEADER_FILES}
)
list(APPEND CODE_SOURCE_FILES
${SOURCE_GROUP_SOURCE_FILES}
)
source_group( "ProjectDataModel\\Surface" FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_files.cmake )

View File

@ -0,0 +1,266 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2020- 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 "RimSurface.h"
#include "RimSurfaceCollection.h"
#include "RigSurface.h"
#include <QFileInfo>
#include <fstream>
#include <sstream>
CAF_PDM_SOURCE_INIT( RimSurface, "Surface" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSurface::RimSurface()
{
CAF_PDM_InitObject( "Surface", ":/ReservoirSurface16x16.png", "", "" );
CAF_PDM_InitFieldNoDefault( &m_userDescription, "SurfaceUserDecription", "Name", "", "", "" );
CAF_PDM_InitFieldNoDefault( &m_surfaceDefinitionFilePath, "SurfaceFilePath", "File", "", "", "" );
CAF_PDM_InitField( &m_color, "SurfaceColor", cvf::Color3f( 0.5f, 0.3f, 0.2f ), "Color", "", "", "" );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSurface::~RimSurface() {}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSurface::setSurfaceFilePath( const QString& filePath )
{
m_surfaceDefinitionFilePath = filePath;
if ( m_userDescription().isEmpty() )
{
m_userDescription = QFileInfo( filePath ).fileName();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimSurface::surfaceFilePath()
{
return m_surfaceDefinitionFilePath().path();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSurface::setColor( const cvf::Color3f& color )
{
m_color = color;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::Color3f RimSurface::color() const
{
return m_color();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimSurface::userDescription()
{
return m_userDescription();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigSurface* RimSurface::surfaceData()
{
return m_surfaceData.p();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* RimSurface::userDescriptionField()
{
return &m_userDescription;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSurface::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue )
{
if ( changedField == &m_surfaceDefinitionFilePath )
{
updateSurfaceDataFromFile();
RimSurfaceCollection* surfColl;
this->firstAncestorOrThisOfTypeAsserted( surfColl );
surfColl->updateViews( {this} );
}
else if ( changedField == &m_color )
{
RimSurfaceCollection* surfColl;
this->firstAncestorOrThisOfTypeAsserted( surfColl );
surfColl->updateViews( {this} );
}
}
struct SurfacePointData
{
int i;
int j;
cvf::Vec3d point;
std::vector<double> values;
};
//--------------------------------------------------------------------------------------------------
/// Returns false for fatal failure
//--------------------------------------------------------------------------------------------------
bool RimSurface::updateSurfaceDataFromFile()
{
std::ifstream stream( this->surfaceFilePath().toLatin1().data() );
std::vector<SurfacePointData> surfaceDataPoints;
int minI = std::numeric_limits<int>::max();
int minJ = std::numeric_limits<int>::max();
int maxI = std::numeric_limits<int>::min();
int maxJ = std::numeric_limits<int>::min();
while ( stream.good() )
{
std::string line;
std::getline( stream, line );
std::istringstream lineStream( line );
double x( HUGE_VAL ), y( HUGE_VAL ), z( HUGE_VAL );
int i( -1 ), j( -1 );
std::vector<double> values;
// First check if we can read a number
lineStream >> x;
if ( lineStream.good() ) // If we can, assume this line is a surface point
{
lineStream >> y >> z >> i >> j;
if ( x != HUGE_VAL && y != HUGE_VAL && z != HUGE_VAL && i != -1 && j != -1 )
{
// Check for extra data
while ( lineStream.good() )
{
double d;
lineStream >> d;
if ( lineStream.good() ) values.push_back( d );
}
// Add point
surfaceDataPoints.push_back( {i, j, {x, y, z}, values} );
minI = std::min( minI, i );
minJ = std::min( minJ, j );
maxI = std::max( maxI, i );
maxJ = std::max( maxJ, j );
}
}
else // Probably a comment line, skip
{
}
}
// clang-format off
if ( surfaceDataPoints.empty()
|| minI == std::numeric_limits<int>::max()
|| minJ == std::numeric_limits<int>::max()
|| maxI == std::numeric_limits<int>::min()
|| maxJ == std::numeric_limits<int>::min() )
{
return false;
}
// clang-format on
// Create full size grid matrix
size_t iCount = maxI - minI + 1;
size_t jCount = maxJ - minJ + 1;
if ( iCount < 2 || jCount < 2 )
{
return false;
}
std::vector<std::vector<unsigned>> indexToPointData;
indexToPointData.resize( iCount, std::vector<unsigned>( jCount, -1 ) );
std::vector<cvf::Vec3d> vertices;
for ( unsigned pIdx = 0; pIdx < surfaceDataPoints.size(); ++pIdx )
{
const auto& pointData = surfaceDataPoints[pIdx];
indexToPointData[pointData.i - minI][pointData.j - minJ] = pIdx;
vertices.push_back( pointData.point );
// Todo: Move result values for each point into the
}
std::vector<unsigned> triangleIndices;
if ( indexToPointData.size() < 2 )
{
return false;
}
for ( size_t iIdx = 0; iIdx < indexToPointData.size() - 1; ++iIdx )
{
for ( size_t jIdx = 0; jIdx < indexToPointData[iIdx].size() - 1; ++jIdx )
{
{
unsigned q1 = indexToPointData[iIdx + 0][jIdx + 0];
unsigned q2 = indexToPointData[iIdx + 0][jIdx + 1];
unsigned q3 = indexToPointData[iIdx + 1][jIdx + 0];
unsigned q4 = indexToPointData[iIdx + 1][jIdx + 1];
if ( q1 != -1 && q2 != -1 && q4 != -1 )
{
triangleIndices.push_back( q1 );
triangleIndices.push_back( q2 );
triangleIndices.push_back( q4 );
}
if ( q1 != -1 && q2 != -1 && q3 != -1 )
{
triangleIndices.push_back( q1 );
triangleIndices.push_back( q4 );
triangleIndices.push_back( q3 );
}
}
}
}
m_surfaceData = new RigSurface();
m_surfaceData->setTriangleData( triangleIndices, vertices );
return true;
}

View File

@ -0,0 +1,59 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2020- 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 "cafPdmField.h"
#include "cafPdmObject.h"
#include "cvfObject.h"
#include "cafPdmFieldCvfColor.h"
class RigSurface;
class RimSurface : public caf::PdmObject
{
CAF_PDM_HEADER_INIT;
public:
RimSurface();
~RimSurface() override;
void setSurfaceFilePath( const QString& filePath );
QString surfaceFilePath();
void setColor( const cvf::Color3f& color );
cvf::Color3f color() const;
bool updateSurfaceDataFromFile();
RigSurface* surfaceData();
QString userDescription();
private:
caf::PdmFieldHandle* userDescriptionField() override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue ) override;
caf::PdmField<caf::FilePath> m_surfaceDefinitionFilePath;
caf::PdmField<QString> m_userDescription;
caf::PdmField<cvf::Color3f> m_color;
cvf::ref<RigSurface> m_surfaceData;
};

View File

@ -0,0 +1,209 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2020- 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 "RimSurfaceCollection.h"
#include "QMessageBox"
#include "RiaApplication.h"
#include "RiaColorTables.h"
#include "RimGridView.h"
#include "RimProject.h"
#include "RimSurface.h"
#include "RimSurfaceInView.h"
CAF_PDM_SOURCE_INIT( RimSurfaceCollection, "SurfaceCollection" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSurfaceCollection::RimSurfaceCollection()
{
CAF_PDM_InitObject( "Surfaces", ":/ReservoirSurfaces16x16.png", "", "" );
CAF_PDM_InitFieldNoDefault( &m_surfaces, "SurfacesField", "Surfaces", "", "", "" );
m_surfaces.uiCapability()->setUiTreeHidden( true );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSurfaceCollection::~RimSurfaceCollection() {}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSurfaceCollection::addSurface( RimSurface* surface )
{
m_surfaces.push_back( surface );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSurface* RimSurfaceCollection::importSurfacesFromFiles( const QStringList& fileNames )
{
QStringList newFileNames;
std::vector<RimSurface*> surfacesToReload;
for ( const QString& newFileName : fileNames )
{
bool isFound = false;
for ( RimSurface* surface : m_surfaces() )
{
if ( surface->surfaceFilePath() == newFileName )
{
surfacesToReload.push_back( surface );
isFound = true;
break;
}
}
if ( !isFound )
{
newFileNames.push_back( newFileName );
}
}
size_t newSurfCount = 0;
size_t existingSurfCount = m_surfaces().size();
QString errorMessages;
for ( const QString& newFileName : newFileNames )
{
RimSurface* newSurface = new RimSurface;
auto newColor = RiaColorTables::categoryPaletteColors().cycledColor3f( existingSurfCount + newSurfCount );
newSurface->setSurfaceFilePath( newFileName );
newSurface->setColor( newColor );
if ( !newSurface->updateSurfaceDataFromFile() )
{
delete newSurface;
errorMessages += newFileName + "\n";
}
else
{
this->addSurface( newSurface );
surfacesToReload.push_back( newSurface );
++newSurfCount;
}
}
if ( !errorMessages.isEmpty() )
{
QMessageBox::warning( nullptr, "Import Surfaces:", "Could not import the following files:\n" + errorMessages );
}
this->updateConnectedEditors();
updateViews( surfacesToReload );
if ( !newFileNames.empty() )
{
return m_surfaces[m_surfaces.size() - 1];
}
else
{
return nullptr;
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimSurface*> RimSurfaceCollection::surfaces() const
{
return m_surfaces.childObjects();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSurfaceCollection::loadData()
{
for ( auto surf : m_surfaces )
{
if ( !surf->updateSurfaceDataFromFile() )
{
// Error: could not open the surface file surf->surfaceFilePath();
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSurfaceCollection::updateViews( const std::vector<RimSurface*>& surfsToReload )
{
RimProject* proj = RiaApplication::instance()->project();
std::vector<Rim3dView*> views;
proj->allViews( views );
// Make sure the tree items are syncronized
for ( auto view : views )
{
auto gridView = dynamic_cast<RimGridView*>( view );
if ( gridView ) gridView->updateSurfacesInViewTreeItems();
}
std::set<RimGridView*> viewsNeedingUpdate;
for ( auto surf : surfsToReload )
{
std::vector<RimSurfaceInView*> surfsInView;
surf->objectsWithReferringPtrFieldsOfType( surfsInView );
for ( auto surfInView : surfsInView )
{
RimGridView* gridView;
surfInView->firstAncestorOrThisOfType( gridView );
if ( gridView ) viewsNeedingUpdate.insert( gridView );
}
}
// Update the views:
for ( auto view : viewsNeedingUpdate )
{
view->scheduleCreateDisplayModelAndRedraw();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSurfaceCollection::updateViews()
{
RimProject* proj = RiaApplication::instance()->project();
std::vector<RimGridView*> views;
proj->allVisibleGridViews( views );
// Make sure the tree items are syncronized
for ( auto view : views )
{
view->updateSurfacesInViewTreeItems();
}
for ( auto view : views )
{
view->scheduleCreateDisplayModelAndRedraw();
}
}

View File

@ -0,0 +1,45 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2020- 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 "cafPdmChildArrayField.h"
#include "cafPdmObject.h"
class RimSurface;
class RimSurfaceCollection : public caf::PdmObject
{
CAF_PDM_HEADER_INIT;
public:
RimSurfaceCollection();
~RimSurfaceCollection() override;
void addSurface( RimSurface* surface );
RimSurface* importSurfacesFromFiles( const QStringList& fileNames );
std::vector<RimSurface*> surfaces() const;
void loadData();
void updateViews();
void updateViews( const std::vector<RimSurface*>& surfsToReload );
private:
caf::PdmChildArrayField<RimSurface*> m_surfaces;
};

View File

@ -0,0 +1,136 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2020- 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 "RimSurfaceInView.h"
#include "RimGridView.h"
#include "RimSurface.h"
#include "RivSurfacePartMgr.h"
CAF_PDM_SOURCE_INIT( RimSurfaceInView, "SurfaceInView" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSurfaceInView::RimSurfaceInView()
{
CAF_PDM_InitObject( "Surface", ":/ReservoirSurface16x16.png", "", "" );
CAF_PDM_InitField( &m_isActive, "IsActive", true, "Visible", "", "", "" );
m_isActive.uiCapability()->setUiHidden( true );
CAF_PDM_InitFieldNoDefault( &m_name, "Name", "Name", "", "", "" );
m_name.registerGetMethod( this, &RimSurfaceInView::name );
CAF_PDM_InitFieldNoDefault( &m_surface, "SurfaceRef", "Surface", "", "", "" );
m_surface.uiCapability()->setUiHidden( true );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSurfaceInView::~RimSurfaceInView() {}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimSurfaceInView::name() const
{
if ( m_surface ) return m_surface->userDescription();
return "";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSurfaceInView::loadDataAndUpdate() {}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSurface* RimSurfaceInView::surface() const
{
return m_surface();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSurfaceInView::setSurface( RimSurface* surf )
{
m_surface = surf;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimSurfaceInView::isActive()
{
return m_isActive();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSurfaceInView::clearGeometry()
{
m_surfacePartMgr = nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RivSurfacePartMgr* RimSurfaceInView::surfacePartMgr()
{
if ( m_surfacePartMgr.isNull() ) m_surfacePartMgr = new RivSurfacePartMgr( this );
return m_surfacePartMgr.p();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSurfaceInView::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue )
{
if ( changedField == &m_isActive )
{
RimGridView* ownerView;
this->firstAncestorOrThisOfTypeAsserted( ownerView );
ownerView->scheduleCreateDisplayModelAndRedraw();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* RimSurfaceInView::userDescriptionField()
{
return &m_name;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* RimSurfaceInView::objectToggleField()
{
return &m_isActive;
}

View File

@ -0,0 +1,60 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2020- 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 "cafPdmField.h"
#include "cafPdmObject.h"
#include "cafPdmProxyValueField.h"
#include "cafPdmPtrField.h"
#include "cvfObject.h"
class RimSurface;
class RivSurfacePartMgr;
class RimSurfaceInView : public caf::PdmObject
{
CAF_PDM_HEADER_INIT;
public:
RimSurfaceInView();
~RimSurfaceInView() override;
void loadDataAndUpdate();
QString name() const;
RimSurface* surface() const;
void setSurface( RimSurface* surf );
bool isActive();
void clearGeometry();
RivSurfacePartMgr* surfacePartMgr();
private:
caf::PdmFieldHandle* userDescriptionField() override;
caf::PdmFieldHandle* objectToggleField() override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue ) override;
caf::PdmProxyValueField<QString> m_name;
caf::PdmField<bool> m_isActive;
caf::PdmPtrField<RimSurface*> m_surface;
cvf::ref<RivSurfacePartMgr> m_surfacePartMgr;
};

View File

@ -0,0 +1,149 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2020- 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 "RimSurfaceInViewCollection.h"
#include "RiaApplication.h"
#include "RimGridView.h"
#include "RimOilField.h"
#include "RimProject.h"
#include "RimSurfaceCollection.h"
#include "RimSurfaceInView.h"
#include "RivSurfacePartMgr.h"
#include "cvfModelBasicList.h"
CAF_PDM_SOURCE_INIT( RimSurfaceInViewCollection, "SurfaceInViewCollection" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSurfaceInViewCollection::RimSurfaceInViewCollection()
{
CAF_PDM_InitObject( "Surfaces", ":/ReservoirSurfaces16x16.png", "", "" );
CAF_PDM_InitField( &m_isActive, "isActive", true, "Active", "", "", "" );
m_isActive.uiCapability()->setUiHidden( true );
CAF_PDM_InitFieldNoDefault( &m_surfacesInView, "SurfacesInViewField", "SurfacesInViewField", "", "", "" );
m_surfacesInView.uiCapability()->setUiTreeHidden( true );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSurfaceInViewCollection::~RimSurfaceInViewCollection() {}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSurfaceInViewCollection::updateFromSurfaceCollection()
{
// Delete surfaceInView without any real Surface connection
std::vector<RimSurfaceInView*> surfsInView = m_surfacesInView.childObjects();
for ( auto surf : surfsInView )
{
if ( !surf->surface() )
{
m_surfacesInView.removeChildObject( surf );
delete surf;
}
}
// Create new entries
RimProject* proj = RiaApplication::instance()->project();
RimSurfaceCollection* surfColl = proj->activeOilField()->surfaceCollection();
if ( surfColl )
{
std::vector<RimSurface*> surfs = surfColl->surfaces();
for ( auto surf : surfs )
{
if ( !this->hasSurfaceInViewForSurface( surf ) )
{
RimSurfaceInView* newSurfInView = new RimSurfaceInView();
newSurfInView->setSurface( surf );
m_surfacesInView.push_back( newSurfInView );
}
}
}
this->updateConnectedEditors();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSurfaceInViewCollection::appendPartsToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform )
{
if ( !m_isActive() ) return;
for ( RimSurfaceInView* surf : m_surfacesInView )
{
if ( surf->isActive() )
{
surf->surfacePartMgr()->appendNativeGeometryPartsToModel( model, scaleTransform );
}
}
model->updateBoundingBoxesRecursive();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSurfaceInViewCollection::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue )
{
if ( changedField == &m_isActive )
{
RimGridView* ownerView;
this->firstAncestorOrThisOfTypeAsserted( ownerView );
ownerView->scheduleCreateDisplayModelAndRedraw();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimSurfaceInViewCollection::hasSurfaceInViewForSurface( const RimSurface* surf ) const
{
for ( auto surfInView : m_surfacesInView )
{
if ( surfInView->surface() == surf )
{
return true;
}
}
return false;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* RimSurfaceInViewCollection::objectToggleField()
{
return &m_isActive;
}

View File

@ -0,0 +1,56 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2020- 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 "cafPdmChildArrayField.h"
#include "cafPdmField.h"
#include "cafPdmObject.h"
namespace cvf
{
class ModelBasicList;
class Transform;
class ScalarMapper;
} // namespace cvf
class RimSurfaceInView;
class RimSurface;
class RimSurfaceInViewCollection : public caf::PdmObject
{
CAF_PDM_HEADER_INIT;
public:
RimSurfaceInViewCollection();
~RimSurfaceInViewCollection() override;
void updateFromSurfaceCollection();
void appendPartsToModel( cvf::ModelBasicList* surfaceVizModel, cvf::Transform* scaleTransform );
private:
caf::PdmFieldHandle* objectToggleField() override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue ) override;
bool hasSurfaceInViewForSurface( const RimSurface* surf ) const;
caf::PdmField<bool> m_isActive;
caf::PdmChildArrayField<RimSurfaceInView*> m_surfacesInView;
};

View File

@ -65,6 +65,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RigFractureGrid.h
${CMAKE_CURRENT_LIST_DIR}/RigFractureCell.h
${CMAKE_CURRENT_LIST_DIR}/RigWellResultPoint.h
${CMAKE_CURRENT_LIST_DIR}/RigWellPathGeometryTools.h
${CMAKE_CURRENT_LIST_DIR}/RigSurface.h
${CMAKE_CURRENT_LIST_DIR}/RigCaseRealizationParameters.h
${CMAKE_CURRENT_LIST_DIR}/RigGeoMechBoreHoleStressCalculator.h
${CMAKE_CURRENT_LIST_DIR}/RigPolyLinesData.h
@ -137,6 +138,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RigFractureGrid.cpp
${CMAKE_CURRENT_LIST_DIR}/RigFractureCell.cpp
${CMAKE_CURRENT_LIST_DIR}/RigWellResultPoint.cpp
${CMAKE_CURRENT_LIST_DIR}/RigWellPathGeometryTools.cpp
${CMAKE_CURRENT_LIST_DIR}/RigSurface.cpp
${CMAKE_CURRENT_LIST_DIR}/RigCaseRealizationParameters.cpp
${CMAKE_CURRENT_LIST_DIR}/RigGeoMechBoreHoleStressCalculator.cpp
${CMAKE_CURRENT_LIST_DIR}/RigPolyLinesData.cpp

View File

@ -0,0 +1,53 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2020- 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 "RigSurface.h"
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigSurface::RigSurface() {}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RigSurface::~RigSurface() {}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const std::vector<unsigned>& RigSurface::triangleIndices()
{
return m_triangleIndices;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const std::vector<cvf::Vec3d>& RigSurface::vertices()
{
return m_vertices;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigSurface::setTriangleData( const std::vector<unsigned>& tringleIndices, const std::vector<cvf::Vec3d>& vertices )
{
m_triangleIndices = tringleIndices;
m_vertices = vertices;
}

View File

@ -0,0 +1,44 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2020- 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 "cvfObject.h"
#include "cvfVector3.h"
#include <QString>
#include <map>
#include <vector>
class RigSurface : public cvf::Object
{
public:
RigSurface();
~RigSurface() override;
const std::vector<unsigned>& triangleIndices();
const std::vector<cvf::Vec3d>& vertices();
void setTriangleData( const std::vector<unsigned>& tringleIndices, const std::vector<cvf::Vec3d>& vertices );
void addVerticeResult( const QString resultName, const std::vector<double>& resultValues );
private:
std::vector<unsigned> m_triangleIndices;
std::vector<cvf::Vec3d> m_vertices;
std::map<QString, std::vector<double>> m_verticeResults;
};

View File

@ -1,177 +1,179 @@
<RCC>
<qresource prefix="/">
<file>2DMap16x16.png</file>
<file>2DMapProjection16x16.png</file>
<file>2DMaps16x16.png</file>
<file>3DView16x16.png</file>
<file>3DViewGeoMech16x16.png</file>
<file>3DWindow24x24.png</file>
<file>AICDValve16x16.png</file>
<file>Annotations16x16.png</file>
<file>AppLogo48x48.png</file>
<file>Default.png</file>
<file>NorthViewArrow.png</file>
<file>SouthViewArrow.png</file>
<file>EastViewArrow.png</file>
<file>WestViewArrow.png</file>
<file>UpViewArrow.png</file>
<file>DownViewArrow.png</file>
<file>CellFilter_Values.png</file>
<file>Axes16x16.png</file>
<file>BottomAxis16x16.png</file>
<file>Case48x48.png</file>
<file>Cases16x16.png</file>
<file>CasingDesign16x16.png</file>
<file>CellFilter_Range.png</file>
<file>CellFilter_Values.png</file>
<file>CellResult.png</file>
<file>Columns1.png</file>
<file>Columns2.png</file>
<file>Columns3.png</file>
<file>Columns4.png</file>
<file>ColumnsUnlimited.png</file>
<file>ComparisonView16x16.png</file>
<file>CompletionsSymbol16x16.png</file>
<file>ControlledView16x16.png</file>
<file>Copy.png</file>
<file>CreateGridCaseGroup16x16.png</file>
<file>CrossSection16x16.png</file>
<file>CrossSections16x16.png</file>
<file>Default.png</file>
<file>DownViewArrow.png</file>
<file>EastViewArrow.png</file>
<file>EclipseInput48x48.png</file>
<file>EdgeResult_1.png</file>
<file>EdgeResult_2.png</file>
<file>Legend.png</file>
<file>Plus.png</file>
<file>Minus.png</file>
<file>Save.png</file>
<file>Well.png</file>
<file>EditableWell.png</file>
<file>WellTargets.png</file>
<file>WellCollection.png</file>
<file>octave.png</file>
<file>OctaveScriptFile16x16.png</file>
<file>PythonScriptFile16x16.png</file>
<file>EnsembleCurveSet16x16.png</file>
<file>EnsembleCurveSets16x16.png</file>
<file>Erase.png</file>
<file>ExportCompletionsSymbol16x16.png</file>
<file>FishBoneGroup16x16.png</file>
<file>FishBoneGroupFromFile16x16.png</file>
<file>FishBoneLateralFromFile16x16.png</file>
<file>FishBones16x16.png</file>
<file>FlowCharPlot16x16.png</file>
<file>Folder.png</file>
<file>EclipseInput48x48.png</file>
<file>Cases16x16.png</file>
<file>SummaryCases16x16.png</file>
<file>SummaryEnsemble16x16.png</file>
<file>SummaryEnsemble24x24.png</file>
<file>SummaryGroup16x16.png</file>
<file>CreateGridCaseGroup16x16.png</file>
<file>FormationCollection16x16.png</file>
<file>Formations16x16.png</file>
<file>FractureLayout16x16.png</file>
<file>FractureSymbol16x16.png</file>
<file>FractureTemplate16x16.png</file>
<file>FractureTemplates16x16.png</file>
<file>GeoMechCase24x24.png</file>
<file>GeoMechCase48x48.png</file>
<file>GeoMechCasePropTable24x24.png</file>
<file>GeoMechCaseTime24x24.png</file>
<file>GeoMechCases48x48.png</file>
<file>GridCaseGroup16x16.png</file>
<file>ReplaceCase16x16.png</file>
<file>GridModels.png</file>
<file>Histogram16x16.png</file>
<file>Histograms16x16.png</file>
<file>HoloLensConnect24x24.png</file>
<file>HoloLensDisconnect24x24.png</file>
<file>HoloLensSendContinously24x24.png</file>
<file>HoloLensSendOnce24x24.png</file>
<file>ICDValve16x16.png</file>
<file>ICVValve16x16.png</file>
<file>InfoBox16x16.png</file>
<file>IntersectionBox16x16.png</file>
<file>IntersectionXPlane16x16.png</file>
<file>IntersectionYPlane16x16.png</file>
<file>IntersectionZPlane16x16.png</file>
<file>LGR16x16.png</file>
<file>LasFile16x16.png</file>
<file>LeftAxis16x16.png</file>
<file>Legend.png</file>
<file>LinkView16x16.png</file>
<file>LinkView24x24.png</file>
<file>MainGrid16x16.png</file>
<file>MasterView16x16.png</file>
<file>Minus.png</file>
<file>NorthViewArrow.png</file>
<file>ObservedCSVDataFile16x16.png</file>
<file>ObservedDataFile16x16.png</file>
<file>ObservedRFTDataFile16x16.png</file>
<file>ObservedRSMDataFile16x16.png</file>
<file>OctaveScriptFile16x16.png</file>
<file>Parallel24x24.png</file>
<file>PerforationInterval16x16.png</file>
<file>PerforationIntervals16x16.png</file>
<file>Perspective24x24.png</file>
<file>PlotWindow24x24.png</file>
<file>Plus.png</file>
<file>PolylinesFromFile16x16.png</file>
<file>PythonScriptFile16x16.png</file>
<file>RFTPlot16x16.png</file>
<file>RFTPlots16x16.png</file>
<file>ReachCircle16x16.png</file>
<file>Refresh-32.png</file>
<file>RemoveComparisonView16x16.png</file>
<file>ReplaceCase16x16.png</file>
<file>ReservoirSurface16x16.png</file>
<file>ReservoirSurfaces16x16.png</file>
<file>RightAxis16x16.png</file>
<file>Ruler24x24.png</file>
<file>RulerPoly24x24.png</file>
<file>Save.png</file>
<file>SnapShot.png</file>
<file>SnapShotSave.png</file>
<file>SnapShotSaveViews.png</file>
<file>SouthViewArrow.png</file>
<file>SplitterH.png</file>
<file>SplitterV.png</file>
<file>StepUpDown16x16.png</file>
<file>StepUpDownCorner16x16.png</file>
<file>SummaryCase16x16.png</file>
<file>SummaryCase48x48.png</file>
<file>SummaryCases16x16.png</file>
<file>SummaryCurve16x16.png</file>
<file>SummaryCurveFilter16x16.png</file>
<file>SummaryEnsemble16x16.png</file>
<file>SummaryEnsemble24x24.png</file>
<file>SummaryGroup16x16.png</file>
<file>SummaryPlotLight16x16.png</file>
<file>SummaryPlots16x16.png</file>
<file>SummaryPlotsLight16x16.png</file>
<file>SummaryTemplate16x16.png</file>
<file>SummaryXPlotLight16x16.png</file>
<file>SummaryXPlotsLight16x16.png</file>
<file>Swap.png</file>
<file>TOFAccSatPlot16x16.png</file>
<file>TempLGR16x16.png</file>
<file>TextAnnotation16x16.png</file>
<file>TileWindows24x24.png</file>
<file>ToggleOff16x16.png</file>
<file>ToggleOn16x16.png</file>
<file>ToggleOnOff16x16.png</file>
<file>ToggleOnOthersOff16x16.png</file>
<file>UnLinkView16x16.png</file>
<file>UpViewArrow.png</file>
<file>Well.png</file>
<file>WellAllocLegend16x16.png</file>
<file>WellAllocPie16x16.png</file>
<file>WellAllocPlot16x16.png</file>
<file>WellAllocPlots16x16.png</file>
<file>WellCF16x16.png</file>
<file>WellCollection.png</file>
<file>WellFlowPlot16x16.png</file>
<file>WellLogCurve16x16.png</file>
<file>WellLogPlot16x16.png</file>
<file>WellLogPlots16x16.png</file>
<file>WellLogTrack16x16.png</file>
<file>WellTargetPoint16x16.png</file>
<file>WellTargetPointTangent16x16.png</file>
<file>WellTargets.png</file>
<file>WestViewArrow.png</file>
<file>Window16x16.png</file>
<file>ZoomAll16x16.png</file>
<file>calculator.png</file>
<file>chain.png</file>
<file>clipboard.png</file>
<file>disable_lighting_24x24.png</file>
<file>draw_style_WellCellsToRangeFilter_24x24.png</file>
<file>draw_style_faults_24x24.png</file>
<file>draw_style_faults_label_24x24.png</file>
<file>draw_style_lines_24x24.png</file>
<file>draw_style_meshlines_24x24.png</file>
<file>draw_style_meshoutlines_24x24.png</file>
<file>draw_style_outlines_24x24.png</file>
<file>draw_style_surface_24x24.png</file>
<file>disable_lighting_24x24.png</file>
<file>SnapShot.png</file>
<file>SnapShotSave.png</file>
<file>SnapShotSaveViews.png</file>
<file>draw_style_faults_24x24.png</file>
<file>draw_style_faults_label_24x24.png</file>
<file>Case48x48.png</file>
<file>GridModels.png</file>
<file>draw_style_WellCellsToRangeFilter_24x24.png</file>
<file>draw_style_surface_w_fault_mesh_24x24.png</file>
<file>InfoBox16x16.png</file>
<file>GeoMechCase48x48.png</file>
<file>GeoMechCase24x24.png</file>
<file>GeoMechCaseTime24x24.png</file>
<file>GeoMechCasePropTable24x24.png</file>
<file>GeoMechCases48x48.png</file>
<file>chain.png</file>
<file>UnLinkView16x16.png</file>
<file>LinkView16x16.png</file>
<file>LinkView24x24.png</file>
<file>ComparisonView16x16.png</file>
<file>RemoveComparisonView16x16.png</file>
<file>MasterView16x16.png</file>
<file>ControlledView16x16.png</file>
<file>TileWindows24x24.png</file>
<file>Window16x16.png</file>
<file>LasFile16x16.png</file>
<file>WellLogTrack16x16.png</file>
<file>WellLogPlot16x16.png</file>
<file>WellLogPlots16x16.png</file>
<file>WellLogCurve16x16.png</file>
<file>WellCF16x16.png</file>
<file>CrossSection16x16.png</file>
<file>CrossSections16x16.png</file>
<file>Refresh-32.png</file>
<file>SummaryPlotLight16x16.png</file>
<file>SummaryPlots16x16.png</file>
<file>SummaryPlotsLight16x16.png</file>
<file>SummaryCurve16x16.png</file>
<file>SummaryCurveFilter16x16.png</file>
<file>EnsembleCurveSet16x16.png</file>
<file>EnsembleCurveSets16x16.png</file>
<file>SummaryXPlotLight16x16.png</file>
<file>SummaryXPlotsLight16x16.png</file>
<file>ObservedDataFile16x16.png</file>
<file>ObservedRSMDataFile16x16.png</file>
<file>ObservedRFTDataFile16x16.png</file>
<file>ObservedCSVDataFile16x16.png</file>
<file>FormationCollection16x16.png</file>
<file>Formations16x16.png</file>
<file>Parallel24x24.png</file>
<file>Perspective24x24.png</file>
<file>IntersectionBox16x16.png</file>
<file>IntersectionXPlane16x16.png</file>
<file>IntersectionYPlane16x16.png</file>
<file>IntersectionZPlane16x16.png</file>
<file>PlotWindow24x24.png</file>
<file>3DWindow24x24.png</file>
<file>3DView16x16.png</file>
<file>3DViewGeoMech16x16.png</file>
<file>SummaryCase48x48.png</file>
<file>SummaryCase16x16.png</file>
<file>octave.png</file>
<file>openFolder24x24.png</file>
<file>clipboard.png</file>
<file>Copy.png</file>
<file>Erase.png</file>
<file>LeftAxis16x16.png</file>
<file>RightAxis16x16.png</file>
<file>BottomAxis16x16.png</file>
<file>Axes16x16.png</file>
<file>FishBones16x16.png</file>
<file>FishBoneGroup16x16.png</file>
<file>FishBoneGroupFromFile16x16.png</file>
<file>FishBoneLateralFromFile16x16.png</file>
<file>PerforationInterval16x16.png</file>
<file>PerforationIntervals16x16.png</file>
<file>CompletionsSymbol16x16.png</file>
<file>WellAllocPlots16x16.png</file>
<file>WellAllocPlot16x16.png</file>
<file>WellFlowPlot16x16.png</file>
<file>WellAllocPie16x16.png</file>
<file>WellAllocLegend16x16.png</file>
<file>RFTPlot16x16.png</file>
<file>RFTPlots16x16.png</file>
<file>FractureLayout16x16.png</file>
<file>FractureSymbol16x16.png</file>
<file>FractureTemplate16x16.png</file>
<file>FractureTemplates16x16.png</file>
<file>TOFAccSatPlot16x16.png</file>
<file>FlowCharPlot16x16.png</file>
<file>SplitterH.png</file>
<file>SplitterV.png</file>
<file>calculator.png</file>
<file>statistics.png</file>
<file>WellTargetPoint16x16.png</file>
<file>WellTargetPointTangent16x16.png</file>
<file>HoloLensConnect24x24.png</file>
<file>HoloLensDisconnect24x24.png</file>
<file>HoloLensSendContinously24x24.png</file>
<file>HoloLensSendOnce24x24.png</file>
<file>2DMap16x16.png</file>
<file>2DMaps16x16.png</file>
<file>AICDValve16x16.png</file>
<file>ICDValve16x16.png</file>
<file>ICVValve16x16.png</file>
<file>CasingDesign16x16.png</file>
<file>LGR16x16.png</file>
<file>MainGrid16x16.png</file>
<file>TempLGR16x16.png</file>
<file>ToggleOff16x16.png</file>
<file>ToggleOn16x16.png</file>
<file>ToggleOnOff16x16.png</file>
<file>ToggleOnOthersOff16x16.png</file>
<file>ExportCompletionsSymbol16x16.png</file>
<file>StepUpDown16x16.png</file>
<file>StepUpDownCorner16x16.png</file>
<file>TextAnnotation16x16.png</file>
<file>Annotations16x16.png</file>
<file>PolylinesFromFile16x16.png</file>
<file>ReachCircle16x16.png</file>
<file>2DMapProjection16x16.png</file>
<file>Ruler24x24.png</file>
<file>RulerPoly24x24.png</file>
<file>Swap.png</file>
<file>SummaryTemplate16x16.png</file>
<file>Columns1.png</file>
<file>Columns2.png</file>
<file>Columns3.png</file>
<file>Columns4.png</file>
<file>ColumnsUnlimited.png</file>
</qresource>
<qresource prefix="/Shader/">
<file>fs_CellFace.glsl</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 712 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 939 B

View File

@ -456,6 +456,7 @@ void RiuMainWindow::createMenus()
importMenu->addAction( cmdFeatureMgr->action( "RicImportObservedDataInMenuFeature" ) );
importMenu->addAction( cmdFeatureMgr->action( "RicImportObservedFmuDataInMenuFeature" ) );
importMenu->addAction( cmdFeatureMgr->action( "RicImportFormationNamesFeature" ) );
importMenu->addAction( cmdFeatureMgr->action( "RicImportSurfacesFeature" ) );
QMenu* exportMenu = fileMenu->addMenu( "&Export" );
exportMenu->addAction( cmdFeatureMgr->action( "RicSnapshotViewToFileFeature" ) );