mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6517 Apply fudge factor to maximum contour level in Contour maps
* This is already done to the minimum level. * Probably only a real issue for results with a [0..1] range because these results have a lot of cells with values near the top part of the interval.
This commit is contained in:
parent
440767d876
commit
f967cfcb65
@ -976,11 +976,11 @@ void RimContourMapProjection::generateTrianglesWithVertexValues()
|
||||
std::vector<cvf::Vec3d> clippedTriangle;
|
||||
if ( v == clippedPolygon.size() - 1 )
|
||||
{
|
||||
clippedTriangle = {clippedPolygon[v], clippedPolygon[0], baryCenter};
|
||||
clippedTriangle = { clippedPolygon[v], clippedPolygon[0], baryCenter };
|
||||
}
|
||||
else
|
||||
{
|
||||
clippedTriangle = {clippedPolygon[v], clippedPolygon[v + 1], baryCenter};
|
||||
clippedTriangle = { clippedPolygon[v], clippedPolygon[v + 1], baryCenter };
|
||||
}
|
||||
polygonTriangles.push_back( clippedTriangle );
|
||||
}
|
||||
@ -1106,7 +1106,10 @@ void RimContourMapProjection::generateContourPolygons()
|
||||
if ( legendConfig()->mappingMode() == RimRegularLegendConfig::MappingType::LINEAR_DISCRETE ||
|
||||
legendConfig()->mappingMode() == RimRegularLegendConfig::MappingType::LINEAR_CONTINUOUS )
|
||||
{
|
||||
contourLevels.front() -= 0.01 * ( contourLevels.back() - contourLevels.front() );
|
||||
const int fudgeFactor = 0.01;
|
||||
// Adjust contour levels slightly to avoid weird visual artifacts due to numerical error.
|
||||
contourLevels.front() -= fudgeFactor * ( contourLevels.back() - contourLevels.front() );
|
||||
contourLevels.back() += fudgeFactor * ( contourLevels.back() - contourLevels.front() );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user