Janitor: Remove unnecessary scoping.

This commit is contained in:
Kristian Bendiksen
2023-11-17 10:10:47 +01:00
parent d2d1929f18
commit b4c7eb2c4f

View File

@@ -598,31 +598,29 @@ void Rim2dIntersectionView::onUpdateDisplayModelForCurrentTimeStep()
cvf::Scene* frameScene = nativeOrOverrideViewer()->frame( m_currentTimeStep, isUsingOverrideViewer() );
if ( frameScene )
{
cvf::String name = "SimWellPipeMod";
Rim3dView::removeModelByName( frameScene, name );
cvf::ref<cvf::ModelBasicList> simWellModelBasicList = new cvf::ModelBasicList;
simWellModelBasicList->setName( name );
m_flatSimWellPipePartMgr->appendFlattenedDynamicGeometryPartsToModel( simWellModelBasicList.p(),
m_currentTimeStep,
displayCoordTransform().p(),
m_intersection->extentLength(),
m_intersection->branchIndex() );
for ( double offset : m_flatSimWellPipePartMgr->flattenedBranchWellHeadOffsets() )
{
cvf::String name = "SimWellPipeMod";
Rim3dView::removeModelByName( frameScene, name );
cvf::ref<cvf::ModelBasicList> simWellModelBasicList = new cvf::ModelBasicList;
simWellModelBasicList->setName( name );
m_flatSimWellPipePartMgr->appendFlattenedDynamicGeometryPartsToModel( simWellModelBasicList.p(),
m_currentTimeStep,
displayCoordTransform().p(),
m_intersection->extentLength(),
m_intersection->branchIndex() );
for ( double offset : m_flatSimWellPipePartMgr->flattenedBranchWellHeadOffsets() )
{
m_flatWellHeadPartMgr->appendFlattenedDynamicGeometryPartsToModel( simWellModelBasicList.p(),
m_currentTimeStep,
displayCoordTransform().p(),
offset );
}
simWellModelBasicList->updateBoundingBoxesRecursive();
frameScene->addModel( simWellModelBasicList.p() );
m_flatSimWellPipePartMgr->updatePipeResultColor( m_currentTimeStep );
m_flatWellHeadPartMgr->appendFlattenedDynamicGeometryPartsToModel( simWellModelBasicList.p(),
m_currentTimeStep,
displayCoordTransform().p(),
offset );
}
simWellModelBasicList->updateBoundingBoxesRecursive();
frameScene->addModel( simWellModelBasicList.p() );
m_flatSimWellPipePartMgr->updatePipeResultColor( m_currentTimeStep );
}
}
@@ -631,20 +629,18 @@ void Rim2dIntersectionView::onUpdateDisplayModelForCurrentTimeStep()
cvf::Scene* frameScene = nativeOrOverrideViewer()->frame( m_currentTimeStep, isUsingOverrideViewer() );
if ( frameScene )
{
{
cvf::String name = "WellPipeDynMod";
Rim3dView::removeModelByName( frameScene, name );
cvf::ref<cvf::ModelBasicList> dynWellPathModel = new cvf::ModelBasicList;
dynWellPathModel->setName( name );
cvf::String name = "WellPipeDynMod";
Rim3dView::removeModelByName( frameScene, name );
cvf::ref<cvf::ModelBasicList> dynWellPathModel = new cvf::ModelBasicList;
dynWellPathModel->setName( name );
m_flatWellpathPartMgr->appendFlattenedDynamicGeometryPartsToModel( dynWellPathModel.p(),
m_currentTimeStep,
displayCoordTransform().p(),
ownerCase()->characteristicCellSize(),
ownerCase()->activeCellsBoundingBox() );
dynWellPathModel->updateBoundingBoxesRecursive();
frameScene->addModel( dynWellPathModel.p() );
}
m_flatWellpathPartMgr->appendFlattenedDynamicGeometryPartsToModel( dynWellPathModel.p(),
m_currentTimeStep,
displayCoordTransform().p(),
ownerCase()->characteristicCellSize(),
ownerCase()->activeCellsBoundingBox() );
dynWellPathModel->updateBoundingBoxesRecursive();
frameScene->addModel( dynWellPathModel.p() );
}
}