mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-05 21:56:46 -06:00
#12190 Make sure polyline parts are included when dynamic intersection geometry is added
This commit is contained in:
1 parent
e2c0279f08
commit
3c79f3cbff
3 files changed
+10
-16
No files matched your search
@@ -472,7 +472,6 @@ void RimGeoMechView::onUpdateDisplayModelForCurrentTimeStep()
|
||||
// Intersections
|
||||
if ( intersectionCollection()->shouldApplyCellFiltersToIntersections() && propertyFilterCollection()->hasActiveDynamicFilters() )
|
||||
{
|
||||
m_intersectionCollection->clearGeometry();
|
||||
appendIntersectionsForCurrentTimeStep();
|
||||
}
|
||||
|
||||
|
||||
@@ -873,7 +873,6 @@ void RimEclipseView::onUpdateDisplayModelForCurrentTimeStep()
|
||||
|
||||
if ( intersectionCollection()->shouldApplyCellFiltersToIntersections() && eclipsePropertyFilterCollection()->hasActiveFilters() )
|
||||
{
|
||||
m_intersectionCollection->clearGeometry();
|
||||
appendIntersectionsForCurrentTimeStep();
|
||||
}
|
||||
|
||||
|
||||
@@ -538,6 +538,12 @@ void RimGridView::updateViewTreeItems( RiaDefines::ItemIn3dView itemType )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGridView::appendIntersectionsForCurrentTimeStep()
|
||||
{
|
||||
// Remove previous intersection parts for static geometry. This is required to avoid the static parts to be rendered
|
||||
// in front of the dynamic geometry added in this function. Note that a new model is created for the dynamic geometry
|
||||
m_intersectionVizModel->removeAllParts();
|
||||
|
||||
m_intersectionCollection->clearGeometry();
|
||||
|
||||
if ( nativeOrOverrideViewer() )
|
||||
{
|
||||
cvf::Scene* frameScene = nativeOrOverrideViewer()->frame( m_currentTimeStep, isUsingOverrideViewer() );
|
||||
@@ -555,6 +561,9 @@ void RimGridView::appendIntersectionsForCurrentTimeStep()
|
||||
|
||||
m_intersectionCollection->appendDynamicPartsToModel( frameParts.p(), scaleTransform(), m_currentTimeStep, &visibility );
|
||||
|
||||
// Static parts for polygon lines and 3D handles
|
||||
m_intersectionCollection->appendPartsToModel( *this, frameParts.p(), scaleTransform() );
|
||||
|
||||
frameParts->updateBoundingBoxesRecursive();
|
||||
|
||||
frameScene->addModel( frameParts.p() );
|
||||
@@ -572,8 +581,6 @@ void RimGridView::appendIntersectionsToModel( bool cellFiltersActive, bool prope
|
||||
{
|
||||
m_intersectionCollection->clearGeometry();
|
||||
|
||||
bool addStaticModel = true;
|
||||
|
||||
if ( m_intersectionCollection->shouldApplyCellFiltersToIntersections() && ( cellFiltersActive || propertyFiltersActive ) )
|
||||
{
|
||||
if ( propertyFiltersActive )
|
||||
@@ -581,10 +588,6 @@ void RimGridView::appendIntersectionsToModel( bool cellFiltersActive, bool prope
|
||||
cvf::UByteArray visibleCells;
|
||||
calculateCellVisibility( &visibleCells, { PROPERTY_FILTERED, PROPERTY_FILTERED_WELL_CELLS } );
|
||||
m_intersectionCollection->appendDynamicPartsToModel( m_intersectionVizModel.p(), scaleTransform(), currentTimeStep(), &visibleCells );
|
||||
|
||||
// If property filters are active, we do not want to add the static model as the static parts can cover the dynamic parts in
|
||||
// some cases
|
||||
addStaticModel = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -606,14 +609,7 @@ void RimGridView::appendIntersectionsToModel( bool cellFiltersActive, bool prope
|
||||
m_intersectionCollection->appendPartsToModel( *this, m_intersectionVizModel.p(), scaleTransform() );
|
||||
}
|
||||
|
||||
if ( addStaticModel )
|
||||
{
|
||||
nativeOrOverrideViewer()->addStaticModelOnce( m_intersectionVizModel.p(), isUsingOverrideViewer() );
|
||||
}
|
||||
else
|
||||
{
|
||||
nativeOrOverrideViewer()->removeStaticModel( m_intersectionVizModel.p() );
|
||||
}
|
||||
nativeOrOverrideViewer()->addStaticModelOnce( m_intersectionVizModel.p(), isUsingOverrideViewer() );
|
||||
|
||||
m_intersectionVizModel->updateBoundingBoxesRecursive();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user