diff --git a/ApplicationLibCode/ModelVisualization/Intersections/RivExtrudedCurveIntersectionPartMgr.cpp b/ApplicationLibCode/ModelVisualization/Intersections/RivExtrudedCurveIntersectionPartMgr.cpp index a3126df53e..cd65d860c6 100644 --- a/ApplicationLibCode/ModelVisualization/Intersections/RivExtrudedCurveIntersectionPartMgr.cpp +++ b/ApplicationLibCode/ModelVisualization/Intersections/RivExtrudedCurveIntersectionPartMgr.cpp @@ -236,6 +236,10 @@ void RivExtrudedCurveIntersectionPartMgr::generatePartGeometry() { if ( m_intersectionGenerator.isNull() ) return; + if ( m_rimIntersection->depthFilterType() == RimIntersectionFilterEnum::INTERSECT_FILTER_BETWEEN && + ( m_rimIntersection->lowerFilterDepth( 1.0 ) <= m_rimIntersection->upperFilterDepth( 1.0 ) ) ) + return; + bool useBufferObjects = true; // Surface geometry { diff --git a/ApplicationLibCode/ProjectDataModel/Intersections/RimExtrudedCurveIntersection.cpp b/ApplicationLibCode/ProjectDataModel/Intersections/RimExtrudedCurveIntersection.cpp index fc9fc36464..25760249b8 100644 --- a/ApplicationLibCode/ProjectDataModel/Intersections/RimExtrudedCurveIntersection.cpp +++ b/ApplicationLibCode/ProjectDataModel/Intersections/RimExtrudedCurveIntersection.cpp @@ -343,6 +343,18 @@ double RimExtrudedCurveIntersection::upperFilterDepth( double sceneRadius ) cons } } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RimIntersectionFilterEnum RimExtrudedCurveIntersection::depthFilterType() const +{ + if ( m_depthThresholdOverridden ) + { + return m_collectionDepthFilterType(); + } + return m_depthFilterType(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/Intersections/RimExtrudedCurveIntersection.h b/ApplicationLibCode/ProjectDataModel/Intersections/RimExtrudedCurveIntersection.h index c58febbef6..d1a0a78393 100644 --- a/ApplicationLibCode/ProjectDataModel/Intersections/RimExtrudedCurveIntersection.h +++ b/ApplicationLibCode/ProjectDataModel/Intersections/RimExtrudedCurveIntersection.h @@ -78,8 +78,9 @@ public: QString name() const override; void setName( const QString& newName ); - double upperFilterDepth( double sceneRadius ) const; - double lowerFilterDepth( double sceneRadius ) const; + double upperFilterDepth( double sceneRadius ) const; + double lowerFilterDepth( double sceneRadius ) const; + RimIntersectionFilterEnum depthFilterType() const; void setDepthOverride( bool collectionOverride ); void setDepthOverrideParameters( double upperThreshold, double lowerThreshold, RimIntersectionFilterEnum filterType );