#5576 Simulation wells: Add Fly to Object

This commit is contained in:
Magne Sjaastad
2020-03-07 16:15:03 +01:00
parent 49d74ce0e7
commit 587478cbd1
3 changed files with 47 additions and 2 deletions

View File

@@ -745,6 +745,37 @@ void RimSimWellInView::scaleDisk( double minValue, double maxValue )
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::BoundingBox RimSimWellInView::boundingBoxInDomainCoords() const
{
std::vector<std::vector<cvf::Vec3d>> pipeBranchesCLCoords;
std::vector<std::vector<RigWellResultPoint>> pipeBranchesCellIds;
auto noConst = const_cast<RimSimWellInView*>( this );
RigSimulationWellCenterLineCalculator::calculateWellPipeStaticCenterline( noConst,
pipeBranchesCLCoords,
pipeBranchesCellIds );
cvf::BoundingBox bb;
for ( auto branch : pipeBranchesCLCoords )
{
if ( !branch.empty() )
{
// Estimate the bounding box based on first, middle and last coordinate of branches
bb.add( branch.front() );
size_t mid = branch.size() / 2;
bb.add( branch[mid] );
bb.add( branch.back() );
}
}
return bb;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------