#3970 Contour Maps: improve edge look

* Remove excess tiny triangles around edges
* Remove labels from contour lines that overlap inner contour lines
This commit is contained in:
Gaute Lindkvist
2019-01-17 19:27:49 +01:00
parent 5d9ef00067
commit b1ad93f4b9
11 changed files with 216 additions and 121 deletions

View File

@@ -49,6 +49,7 @@ public:
{
std::vector<cvf::Vec3d> vertices;
double value;
double area;
cvf::BoundingBox bbox;
};
@@ -146,6 +147,8 @@ protected:
std::vector<cvf::Vec3d> generateVertices() const;
void generateContourPolygons();
void smoothContourPolygons(ContourPolygons* contourPolygons, const ContourPolygons* clipBy, bool favourExpansion);
static double sumPolygonArea(const ContourPolygons& contourPolygons);
static double sumTriangleAreas(const std::vector<cvf::Vec4d>& triangles);
std::vector<CellIndexAndResult> cellOverlapVolumesAndResults(const cvf::Vec2d& globalPos2d,
const std::vector<double>& weightingResultValues) const;
@@ -208,6 +211,7 @@ protected:
cvf::BoundingBox m_gridBoundingBox;
double m_sampleSpacing;
std::vector<ContourPolygons> m_contourPolygons;
std::vector<double> m_contourLevelCumulativeAreas;
std::vector<cvf::Vec4d> m_trianglesWithVertexValues;
int m_currentResultTimestep;