mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Intersection depthfilter (#8408)
* Implement a simple depth filter to cut all geometry below a certain level for intersections * Add option to override all curve intersection cut depths from collection. * Add support for showing intersection above or below threshold. Update label texts.
This commit is contained in:
@@ -428,6 +428,29 @@ String BoundingBox::debugString() const
|
||||
return str;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Cuts the box at the given depth, to never go below the given depth
|
||||
///
|
||||
/// Note: cutting is a one time operation, adding new points to the box might extend the box below the cut depth
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void BoundingBox::cutBelow(double depth)
|
||||
{
|
||||
if (m_min.z() < depth) m_min.z() = depth;
|
||||
if (m_max.z() < depth) m_max.z() = depth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Cuts the box at the given depth, to never go above the given depth
|
||||
///
|
||||
/// Note: cutting is a one time operation, adding new points to the box might extend the box below the cut depth
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void BoundingBox::cutAbove(double depth)
|
||||
{
|
||||
if (m_min.z() > depth) m_min.z() = depth;
|
||||
if (m_max.z() > depth) m_max.z() = depth;
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace cvf
|
||||
|
||||
|
@@ -86,6 +86,9 @@ public:
|
||||
void transform(const Mat4d& matrix);
|
||||
const BoundingBox getTransformed(const Mat4d& matrix) const;
|
||||
|
||||
void cutBelow(double depth);
|
||||
void cutAbove(double depth);
|
||||
|
||||
String debugString() const;
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user