#11109 Improve visualization of MSW with valve branches

Increase default segment threshold to 4
Add an optional setting to override the default value
Use this threshold to merge short branches into parent branch
This commit is contained in:
Magne Sjaastad
2024-01-25 18:17:10 +01:00
parent 85672f5ef5
commit 7d601ac067
11 changed files with 87 additions and 39 deletions

View File

@@ -166,23 +166,7 @@ void RivSimWellPipesPartMgr::buildWellPipeParts( const caf::DisplayCoordTransfor
m_wellBranches.clear();
m_flattenedBranchWellHeadOffsets.clear();
auto createSimWells = []( RimSimWellInView* simWellInView ) -> std::vector<SimulationWellCellBranch>
{
std::vector<SimulationWellCellBranch> simWellBranches;
const RigSimWellData* simWellData = simWellInView->simWellData();
if ( simWellData && simWellData->isMultiSegmentWell() )
{
simWellBranches = RigMswCenterLineCalculator::calculateMswWellPipeGeometry( simWellInView );
}
else
{
simWellBranches = RigSimulationWellCenterLineCalculator::calculateWellPipeStaticCenterline( simWellInView );
}
return simWellBranches;
};
auto simWells = createSimWells( m_simWellInView );
auto simWells = m_simWellInView->wellBranchesForVisualization();
const auto& [coords, wellCells] = RigSimulationWellCenterLineCalculator::extractBranchData( simWells );
auto pipeBranchesCLCoords = coords;