Skip to content

D80 — Custom-rule conditions follow observed KiCad item sets

Decision

Custom-rule conditions follow the observed KiCad 10.0.3 item sets: numeric comparisons in internal units without literal rounding, whole-rule dropping for unknown symbols and a lone unitless numeric literal, typed disallow priority including ignore, own item layers, absolute pad/via positions, exact rounded-core area enclosure and prepared courtyard polygons on the footprint's own front and back sides, with KiCad's reference or library-id footprint selectors. New item-dependent predicates stay DRC-only, with the existing router warning. Rules that use one of the 17 KiCad functions TraceMaker does not evaluate are kept and warned about, the call taken as false as before; \|\| binds tighter than &&; Width exists on tracks only; numeric equality is exact (review with KiCad 10.0.6).

Alternatives

Port the fork's conservative match on unknown conditions; compare bounding-box corners; substitute the DRC iteration layer; add Clipper2

Reason

The original 61-case corpus had 26 item-set mismatches. Invalid conditions must really be dropped, and geometric equality of counts can hide different items. Existing integer geometry handles concavity, holes and full copper containment without a dependency. Frozen KiCad item/pair multisets live in tests/integration/rule_parity/, exercised by the KiCad-independent rule_parity ctest; deciding cases and regression results are in doc 05 §33.