Skip to content

Commit

Permalink
Janitor: Remove unnecessary scoping.
Browse files Browse the repository at this point in the history
  • Loading branch information
kriben committed Nov 17, 2023
1 parent d2d1929 commit b4c7eb2
Showing 1 changed file with 33 additions and 37 deletions.
70 changes: 33 additions & 37 deletions ApplicationLibCode/ProjectDataModel/Rim2dIntersectionView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
}

Expand All @@ -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 );

m_flatWellpathPartMgr->appendFlattenedDynamicGeometryPartsToModel( dynWellPathModel.p(),
m_currentTimeStep,
displayCoordTransform().p(),
ownerCase()->characteristicCellSize(),
ownerCase()->activeCellsBoundingBox() );
dynWellPathModel->updateBoundingBoxesRecursive();
frameScene->addModel( dynWellPathModel.p() );
}
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() );
}
}

Expand Down

0 comments on commit b4c7eb2

Please sign in to comment.