mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#657) Added support for creation of cross section from simulation well context menu
This commit is contained in:
parent
dc894928b5
commit
69e30dc8bc
@ -35,6 +35,7 @@ ${CEE_CURRENT_LIST_DIR}RivScalarMapperUtils.h
|
||||
${CEE_CURRENT_LIST_DIR}RivCellEdgeGeometryUtils.h
|
||||
${CEE_CURRENT_LIST_DIR}RivPipeQuadToSegmentMapper.h
|
||||
${CEE_CURRENT_LIST_DIR}RivSingleCellPartGenerator.h
|
||||
${CEE_CURRENT_LIST_DIR}RivWellPipeSourceInfo.h
|
||||
)
|
||||
|
||||
set (SOURCE_GROUP_SOURCE_FILES
|
||||
@ -66,7 +67,7 @@ ${CEE_CURRENT_LIST_DIR}RivScalarMapperUtils.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RivCellEdgeGeometryUtils.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RivPipeQuadToSegmentMapper.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RivSingleCellPartGenerator.cpp
|
||||
|
||||
${CEE_CURRENT_LIST_DIR}RivWellPipeSourceInfo.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_HEADER_FILES
|
||||
|
39
ApplicationCode/ModelVisualization/RivWellPipeSourceInfo.cpp
Normal file
39
ApplicationCode/ModelVisualization/RivWellPipeSourceInfo.cpp
Normal file
@ -0,0 +1,39 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2015- Statoil ASA
|
||||
// Copyright (C) 2015- Ceetron Solutions AS
|
||||
//
|
||||
// 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 "RivWellPipeSourceInfo.h"
|
||||
|
||||
#include "RimEclipseWell.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivEclipseWellSourceInfo::RivEclipseWellSourceInfo(RimEclipseWell* eclipseWell)
|
||||
: m_eclipseWell(eclipseWell)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseWell* RivEclipseWellSourceInfo::well() const
|
||||
{
|
||||
return m_eclipseWell.p();
|
||||
}
|
37
ApplicationCode/ModelVisualization/RivWellPipeSourceInfo.h
Normal file
37
ApplicationCode/ModelVisualization/RivWellPipeSourceInfo.h
Normal file
@ -0,0 +1,37 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2015- Statoil ASA
|
||||
// Copyright (C) 2015- Ceetron Solutions AS
|
||||
//
|
||||
// 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 "cvfBase.h"
|
||||
#include "cvfObject.h"
|
||||
#include "cafPdmPointer.h"
|
||||
|
||||
class RimEclipseWell;
|
||||
|
||||
class RivEclipseWellSourceInfo : public cvf::Object
|
||||
{
|
||||
public:
|
||||
RivEclipseWellSourceInfo(RimEclipseWell* eclipseWell);
|
||||
|
||||
RimEclipseWell* well() const;
|
||||
|
||||
private:
|
||||
caf::PdmPointer<RimEclipseWell> m_eclipseWell;
|
||||
};
|
@ -20,34 +20,35 @@
|
||||
|
||||
#include "RivWellPipesPartMgr.h"
|
||||
|
||||
#include "cvfLibCore.h"
|
||||
#include "cvfModelBasicList.h"
|
||||
#include "cvfTransform.h"
|
||||
#include "cvfPart.h"
|
||||
#include "cvfScalarMapperDiscreteLinear.h"
|
||||
#include "cvfDrawableGeo.h"
|
||||
#include "cvfRay.h"
|
||||
|
||||
#include "cafEffectGenerator.h"
|
||||
#include "cafPdmFieldCvfColor.h"
|
||||
#include "cafPdmFieldCvfMat4d.h"
|
||||
|
||||
#include "RigCaseData.h"
|
||||
#include "RigCell.h"
|
||||
#include "RivPipeGeometryGenerator.h"
|
||||
|
||||
#include "Rim3dOverlayInfoConfig.h"
|
||||
#include "RimCellEdgeColors.h"
|
||||
#include "RimCellRangeFilterCollection.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
#include "RimEclipsePropertyFilterCollection.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEclipseWell.h"
|
||||
#include "RimEclipseWellCollection.h"
|
||||
#include "RimReservoirCellResultsStorage.h"
|
||||
|
||||
#include "RimEclipseCellColors.h"
|
||||
#include "RimCellEdgeColors.h"
|
||||
#include "RimCellRangeFilterCollection.h"
|
||||
#include "RimEclipsePropertyFilterCollection.h"
|
||||
#include "Rim3dOverlayInfoConfig.h"
|
||||
#include "RivPipeGeometryGenerator.h"
|
||||
#include "RivWellPathSourceInfo.h"
|
||||
#include "RivWellPipeSourceInfo.h"
|
||||
|
||||
#include "cafEffectGenerator.h"
|
||||
#include "cafPdmFieldCvfColor.h"
|
||||
#include "cafPdmFieldCvfMat4d.h"
|
||||
|
||||
#include "cvfDrawableGeo.h"
|
||||
#include "cvfLibCore.h"
|
||||
#include "cvfModelBasicList.h"
|
||||
#include "cvfPart.h"
|
||||
#include "cvfRay.h"
|
||||
#include "cvfScalarMapperDiscreteLinear.h"
|
||||
#include "cvfTransform.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -105,6 +106,8 @@ void RivWellPipesPartMgr::buildWellPipeParts()
|
||||
double characteristicCellSize = m_rimReservoirView->eclipseCase()->reservoirData()->mainGrid()->characteristicIJCellSize();
|
||||
double pipeRadius = m_rimReservoirView->wellCollection()->pipeRadiusScaleFactor() *m_rimWell->pipeRadiusScaleFactor() * characteristicCellSize;
|
||||
|
||||
cvf::ref<RivEclipseWellSourceInfo> sourceInfo = new RivEclipseWellSourceInfo(m_rimWell);
|
||||
|
||||
for (size_t brIdx = 0; brIdx < pipeBranchesCellIds.size(); ++brIdx)
|
||||
{
|
||||
m_wellBranches.push_back(RivPipeBranchData());
|
||||
@ -145,6 +148,8 @@ void RivWellPipesPartMgr::buildWellPipeParts()
|
||||
cvf::ref<cvf::Effect> eff = surfaceGen.generateCachedEffect();
|
||||
|
||||
pbd.m_surfacePart->setEffect(eff.p());
|
||||
|
||||
pbd.m_surfacePart->setSourceInfo(sourceInfo.p());
|
||||
}
|
||||
|
||||
if (pbd.m_centerLineDrawable.notNull())
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "RicGeoMechPropertyFilterNewExec.h"
|
||||
#include "RicRangeFilterNewExec.h"
|
||||
|
||||
#include "CrossSectionCommands/RicNewSimWellCrossSectionFeature.h"
|
||||
#include "CrossSectionCommands/RicNewWellPathCrossSectionFeature.h"
|
||||
#include "WellLogCommands/RicNewWellLogCurveExtractionFeature.h"
|
||||
#include "WellLogCommands/RicNewWellLogFileCurveFeature.h"
|
||||
@ -40,6 +41,7 @@
|
||||
#include "RimEclipsePropertyFilter.h"
|
||||
#include "RimEclipsePropertyFilterCollection.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEclipseWell.h"
|
||||
#include "RimFaultCollection.h"
|
||||
#include "RimGeoMechCase.h"
|
||||
#include "RimGeoMechCellColors.h"
|
||||
@ -63,11 +65,13 @@
|
||||
#include "RivFemPickSourceInfo.h"
|
||||
#include "RivSourceInfo.h"
|
||||
#include "RivWellPathSourceInfo.h"
|
||||
#include "RivWellPipeSourceInfo.h"
|
||||
|
||||
#include "cafCmdExecCommandManager.h"
|
||||
#include "cafCmdFeature.h"
|
||||
#include "cafCmdFeatureManager.h"
|
||||
#include "cafPdmUiTreeView.h"
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
#include "cvfDrawableGeo.h"
|
||||
#include "cvfHitItemCollection.h"
|
||||
@ -221,13 +225,14 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event)
|
||||
// Well log curve creation commands
|
||||
if (firstHitPart && firstHitPart->sourceInfo())
|
||||
{
|
||||
caf::CmdFeatureManager* commandManager = caf::CmdFeatureManager::instance();
|
||||
|
||||
const RivWellPathSourceInfo* wellPathSourceInfo = dynamic_cast<const RivWellPathSourceInfo*>(firstHitPart->sourceInfo());
|
||||
if (wellPathSourceInfo)
|
||||
{
|
||||
RimWellPath* wellPath = wellPathSourceInfo->wellPath();
|
||||
if (wellPath)
|
||||
{
|
||||
caf::CmdFeatureManager* commandManager = caf::CmdFeatureManager::instance();
|
||||
|
||||
RicNewWellLogFileCurveFeature* newWellLogFileCurveFeature = dynamic_cast<RicNewWellLogFileCurveFeature*>(commandManager->getCommandFeature("RicNewWellLogFileCurveFeature"));
|
||||
if (newWellLogFileCurveFeature && newWellLogFileCurveFeature->canFeatureBeExecuted())
|
||||
@ -250,6 +255,22 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const RivEclipseWellSourceInfo* eclipseWellSourceInfo = dynamic_cast<const RivEclipseWellSourceInfo*>(firstHitPart->sourceInfo());
|
||||
if (eclipseWellSourceInfo)
|
||||
{
|
||||
RimEclipseWell* well = eclipseWellSourceInfo->well();
|
||||
if (well)
|
||||
{
|
||||
caf::SelectionManager::instance()->setSelectedItem(well);
|
||||
|
||||
RicNewSimWellCrossSectionFeature* newSimWellCrossSectionFeature = dynamic_cast<RicNewSimWellCrossSectionFeature*>(commandManager->getCommandFeature("RicNewSimWellCrossSectionFeature"));
|
||||
if (newSimWellCrossSectionFeature && newSimWellCrossSectionFeature->canFeatureBeExecuted())
|
||||
{
|
||||
menu.addAction(newSimWellCrossSectionFeature->action());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// View Link commands
|
||||
|
Loading…
Reference in New Issue
Block a user