#10495 Add scale factor to the position of well head

This commit is contained in:
Magne Sjaastad 2023-08-11 16:27:27 +02:00
parent 0d8cf73677
commit 07e830eab6
3 changed files with 12 additions and 6 deletions

View File

@ -254,11 +254,13 @@ void RimSimWellInView::wellHeadTopBottomPosition( int frameIndex, cvf::Vec3d* to
}
else
{
// Position well head at top of active cells bounding box
// Position well head above top of active cells bounding box
cvf::Vec3d activeCellsBoundingBoxMax = rimReservoirView->currentActiveCellInfo()->geometryBoundingBox().max();
const auto boundingBox = rimReservoirView->currentActiveCellInfo()->geometryBoundingBox();
const auto maxZ = boundingBox.max().z();
const auto extentZ = boundingBox.extent().z();
top->z() = activeCellsBoundingBoxMax.z();
top->z() = maxZ + extentZ * rimReservoirView->wellCollection()->wellHeadPositionScaleFactor();
}
}

View File

@ -171,6 +171,7 @@ RimSimWellInViewCollection::RimSimWellInViewCollection()
// Scaling
CAF_PDM_InitField( &wellHeadScaleFactor, "WellHeadScale", 1.0, "Well Head Scale" );
CAF_PDM_InitField( &wellHeadPositionScaleFactor, "WellHeadPositionScaleFactor", 0.1, "Well Head Position Scale" );
CAF_PDM_InitField( &pipeScaleFactor, "WellPipeRadiusScale", 0.1, "Pipe Radius Scale " );
CAF_PDM_InitField( &spheresScaleFactor, "CellCenterSphereScale", 0.2, "Sphere Radius Scale" );
@ -440,9 +441,10 @@ void RimSimWellInViewCollection::fieldChangedByUi( const caf::PdmFieldHandle* ch
m_reservoirView->scheduleSimWellGeometryRegen();
m_reservoirView->scheduleCreateDisplayModelAndRedraw();
}
else if ( &pipeCrossSectionVertexCount == changedField || &pipeScaleFactor == changedField || &wellHeadScaleFactor == changedField ||
&m_showWellHead == changedField || &isAutoDetectingBranches == changedField || &wellHeadPosition == changedField ||
&wellLabelColor == changedField || &wellPipeCoordType == changedField || &m_showWellPipe == changedField )
else if ( &pipeCrossSectionVertexCount == changedField || &pipeScaleFactor == changedField ||
&wellHeadScaleFactor == changedField || &wellHeadPositionScaleFactor == changedField || &m_showWellHead == changedField ||
&isAutoDetectingBranches == changedField || &wellHeadPosition == changedField || &wellLabelColor == changedField ||
&wellPipeCoordType == changedField || &m_showWellPipe == changedField )
{
m_reservoirView->scheduleSimWellGeometryRegen();
m_reservoirView->scheduleCreateDisplayModelAndRedraw();
@ -651,6 +653,7 @@ void RimSimWellInViewCollection::defineUiOrdering( QString uiConfigName, caf::Pd
caf::PdmUiGroup* sizeScalingGroup = uiOrdering.addNewGroup( "Size Scaling" );
sizeScalingGroup->add( &wellHeadScaleFactor );
sizeScalingGroup->add( &wellHeadPositionScaleFactor );
sizeScalingGroup->add( &pipeScaleFactor );
sizeScalingGroup->add( &spheresScaleFactor );

View File

@ -116,6 +116,7 @@ public:
caf::PdmField<bool> showWellsIntersectingVisibleCells;
caf::PdmField<double> wellHeadScaleFactor;
caf::PdmField<double> wellHeadPositionScaleFactor;
caf::PdmField<double> pipeScaleFactor;
caf::PdmField<double> spheresScaleFactor;