26#include <nlohmann/json_fwd.hpp>
A color representation with 4 components: red, green, blue, alpha.
Represent a set of closed polygons.
DIFF_UNITS
Units for diff result formatting.
GERBER_DIFF_RESULT CalculateGerberDiff(const SHAPE_POLY_SET &aReference, const SHAPE_POLY_SET &aComparison)
Calculate the geometric differences between two poly sets.
nlohmann::json FormatDiffResultJson(const GERBER_DIFF_RESULT &aResult, const wxString &aFile1, const wxString &aFile2, DIFF_UNITS aUnits=DIFF_UNITS::MM, double aMaxDiffPercent=0.0)
Format a diff result as JSON.
wxString FormatDiffResultText(const GERBER_DIFF_RESULT &aResult, const wxString &aFile1, const wxString &aFile2, DIFF_UNITS aUnits=DIFF_UNITS::MM)
Format a diff result as human-readable text.
VECTOR2I CalculateAlignment(const SHAPE_POLY_SET &aReference, const SHAPE_POLY_SET &aComparison)
Calculate the alignment offset to make a comparison poly set align with a reference.
bool RenderDiffToPng(const GERBER_DIFF_RESULT &aResult, const wxString &aOutputPath, const DIFF_RENDER_OPTIONS &aOptions)
Render a diff result to PNG with colored regions.
Options for diff PNG rendering.
KIGFX::COLOR4D colorRemovals
Red.
KIGFX::COLOR4D colorAdditions
Green.
int height
0 = calculate from DPI
KIGFX::COLOR4D colorOverlap
Gray.
KIGFX::COLOR4D colorBackground
White.
int width
0 = calculate from DPI
Result of a Gerber diff calculation containing the geometric differences and area statistics.
SHAPE_POLY_SET removals
Areas in file1 but not file2 (file1 AND NOT file2)
double removalsPercent
Removals as percent of reference area.
double additionsArea
Area of additions in mm^2.
SHAPE_POLY_SET overlap
Areas present in both files (file1 AND file2)
double referenceArea
Total area of file1 in mm^2.
double overlapArea
Area of overlap in mm^2.
double comparisonArea
Total area of file2 in mm^2.
double netChangePercent
Net change as percent of reference area.
double removalsArea
Area of removals in mm^2.
double additionsPercent
Additions as percent of reference area.
SHAPE_POLY_SET additions
Areas in file2 but not file1 (file2 AND NOT file1)
VECTOR2< int32_t > VECTOR2I