Skip to content

API reference -- geometry result types

The result types returned by compute_geometry_diff. Unit conventions: centroids in inches, areas in mm^2, displacements in mm (see the schema documentation).

One attributed change on a layer.

centroid_* and area_mm2 describe the after-state object when one exists (added/moved/resized) and the before-state object otherwise (removed). before_geom / after_geom carry the shapely polygons for programmatic/SVG use; they are excluded from repr and JSON.

Geometry diff result for one matched/added/removed layer pair.

count

count(kind: ChangeKind) -> int

Number of changes of the given kind.

Full geometry diff across all matched layers.

Core IR and shared result types

The complete output of parsing one Gerber or Excellon file.

has_changes property

has_changes: bool

True when any layer was added, removed, or has changed pixels.

A contiguous changed area. Coordinates in inches.