mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix intersection crash by making sure we do nothing when top limit is below bottom limit
This commit is contained in:
parent
fd7821a10b
commit
89773da26e
@ -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
|
||||
{
|
||||
|
@ -343,6 +343,18 @@ double RimExtrudedCurveIntersection::upperFilterDepth( double sceneRadius ) cons
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimIntersectionFilterEnum RimExtrudedCurveIntersection::depthFilterType() const
|
||||
{
|
||||
if ( m_depthThresholdOverridden )
|
||||
{
|
||||
return m_collectionDepthFilterType();
|
||||
}
|
||||
return m_depthFilterType();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user