mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Release 2023.06
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigSimWellData.h"
|
||||
#include "RigWellResultPoint.h"
|
||||
#include "RigWellResultFrame.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
@@ -110,7 +110,7 @@ void RivWellHeadPartMgr::buildWellHeadParts( size_t frameIndex, const caf::Displ
|
||||
double pipeRadius = m_rimWell->pipeRadius();
|
||||
int pipeCrossSectionVxCount = m_rimWell->pipeCrossSectionVertexCount();
|
||||
|
||||
if ( wellResultFrame->m_isOpen )
|
||||
if ( wellResultFrame->isOpen() )
|
||||
{
|
||||
// Use slightly larger well head arrow when well is open
|
||||
pipeRadius *= 1.1;
|
||||
@@ -178,7 +178,7 @@ void RivWellHeadPartMgr::buildWellHeadParts( size_t frameIndex, const caf::Displ
|
||||
|
||||
double arrowLength = characteristicCellSize * simWellInViewCollection()->wellHeadScaleFactor() * m_rimWell->wellHeadScaleFactor();
|
||||
|
||||
if ( wellResultFrame->m_isOpen )
|
||||
if ( wellResultFrame->isOpen() )
|
||||
{
|
||||
// Use slightly larger well head arrow when well is open
|
||||
arrowLength = 1.1 * arrowLength;
|
||||
@@ -188,13 +188,13 @@ void RivWellHeadPartMgr::buildWellHeadParts( size_t frameIndex, const caf::Displ
|
||||
textPosition.z() += 1.2 * arrowLength;
|
||||
|
||||
cvf::Mat4f matr;
|
||||
if ( wellResultFrame->m_productionType != RiaDefines::WellProductionType::PRODUCER )
|
||||
if ( wellResultFrame->productionType() != RiaDefines::WellProductionType::PRODUCER )
|
||||
{
|
||||
matr = cvf::Mat4f::fromRotation( cvf::Vec3f( 1.0f, 0.0f, 0.0f ), cvf::Math::toRadians( 180.0f ) );
|
||||
}
|
||||
|
||||
double ijScaleFactor = arrowLength / 6;
|
||||
if ( wellResultFrame->m_isOpen )
|
||||
if ( wellResultFrame->isOpen() )
|
||||
{
|
||||
ijScaleFactor *= 1.1;
|
||||
}
|
||||
@@ -202,7 +202,7 @@ void RivWellHeadPartMgr::buildWellHeadParts( size_t frameIndex, const caf::Displ
|
||||
matr( 1, 1 ) *= ijScaleFactor;
|
||||
matr( 2, 2 ) *= arrowLength;
|
||||
|
||||
if ( wellResultFrame->m_productionType != RiaDefines::WellProductionType::PRODUCER )
|
||||
if ( wellResultFrame->productionType() != RiaDefines::WellProductionType::PRODUCER )
|
||||
{
|
||||
arrowPosition.z() += arrowLength;
|
||||
}
|
||||
@@ -243,26 +243,26 @@ void RivWellHeadPartMgr::buildWellHeadParts( size_t frameIndex, const caf::Displ
|
||||
RimSimWellInViewCollection* wellColl = nullptr;
|
||||
if ( m_rimWell )
|
||||
{
|
||||
m_rimWell->firstAncestorOrThisOfType( wellColl );
|
||||
wellColl = m_rimWell->firstAncestorOrThisOfType<RimSimWellInViewCollection>();
|
||||
}
|
||||
|
||||
if ( wellColl && wellColl->showConnectionStatusColors() )
|
||||
{
|
||||
if ( wellResultFrame->m_isOpen )
|
||||
if ( wellResultFrame->isOpen() )
|
||||
{
|
||||
if ( wellResultFrame->m_productionType == RiaDefines::WellProductionType::PRODUCER )
|
||||
if ( wellResultFrame->productionType() == RiaDefines::WellProductionType::PRODUCER )
|
||||
{
|
||||
headColor = cvf::Color4f( cvf::Color3::GREEN );
|
||||
}
|
||||
else if ( wellResultFrame->m_productionType == RiaDefines::WellProductionType::OIL_INJECTOR )
|
||||
else if ( wellResultFrame->productionType() == RiaDefines::WellProductionType::OIL_INJECTOR )
|
||||
{
|
||||
headColor = cvf::Color4f( cvf::Color3::ORANGE );
|
||||
}
|
||||
else if ( wellResultFrame->m_productionType == RiaDefines::WellProductionType::GAS_INJECTOR )
|
||||
else if ( wellResultFrame->productionType() == RiaDefines::WellProductionType::GAS_INJECTOR )
|
||||
{
|
||||
headColor = cvf::Color4f( cvf::Color3::RED );
|
||||
}
|
||||
else if ( wellResultFrame->m_productionType == RiaDefines::WellProductionType::WATER_INJECTOR )
|
||||
else if ( wellResultFrame->productionType() == RiaDefines::WellProductionType::WATER_INJECTOR )
|
||||
{
|
||||
headColor = cvf::Color4f( cvf::Color3::BLUE );
|
||||
}
|
||||
@@ -395,10 +395,9 @@ void RivWellHeadPartMgr::appendFlattenedDynamicGeometryPartsToModel( cvf::ModelB
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
Rim3dView* RivWellHeadPartMgr::viewWithSettings()
|
||||
{
|
||||
Rim3dView* view = nullptr;
|
||||
if ( m_rimWell ) m_rimWell->firstAncestorOrThisOfType( view );
|
||||
if ( m_rimWell ) return m_rimWell->firstAncestorOrThisOfType<Rim3dView>();
|
||||
|
||||
return view;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -406,8 +405,7 @@ Rim3dView* RivWellHeadPartMgr::viewWithSettings()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSimWellInViewCollection* RivWellHeadPartMgr::simWellInViewCollection()
|
||||
{
|
||||
RimSimWellInViewCollection* wellCollection = nullptr;
|
||||
if ( m_rimWell ) m_rimWell->firstAncestorOrThisOfType( wellCollection );
|
||||
if ( m_rimWell ) return m_rimWell->firstAncestorOrThisOfType<RimSimWellInViewCollection>();
|
||||
|
||||
return wellCollection;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user