Skip to content

D72 — Router enforces net- and layer-only custom disallow rules

Decision

The router enforces custom disallow track/via rules whose conditions depend only on net, net class, type and layer, as a per-net layer mask and a per-net via switch, and physical_hole_clearance between holes and any other item's copper (new tracks and vias against existing holes, new via holes against fixed and routed copper, any net; a net gets no vias when the rule holds between its vias and its own tracks); keepout areas block tracks and vias by their own flags (D65). The DRC reports disallow as items_not_allowed and physical_hole_clearance as hole_clearance, as KiCad does. Disallow rules and net-independent physical_hole_clearance rules keep the per-class obstacle cache.

Alternatives

Leave these rules to KiCad's DRC after routing; evaluate every rule per probe on the exact path (any custom rule disabled the cache and cost-to-go fields); block nets on layers by rule areas

Reason

Users write these rules to shape the layout (inner layers for planes, no via in pad); a router that ignores them produces boards KiCad rejects (a private 4-layer board: 119 inner tracks, 64 vias in pads, a via in a footprint keepout). Pre-evaluated masks cost nothing in the search; keeping the cache avoids a several-fold slowdown. Position-dependent disallow conditions are warned, not guessed (CLAUDE.md rule 6). Doc 05 §27.

D65