15#include <nlohmann/json.hpp>
53 std::vector<EffectiveRule>
rules;
61 std::vector<std::pair<int, int>>
pairs;
105 std::vector<std::string>* not_generated =
nullptr);
121 std::vector<model::NetId>
nets;
The board model (design doc 02 §3): every object TraceMaker reads from a .kicad_pcb,...
Component-rule catalogue (design doc 15 §6.1): categories of components with their detectors,...
Category detection and role binding (design doc 15 §3): each footprint is scored against every catego...
Impedance and current rules on a real board (design doc 15 §5.3-5.4, P4): the board stackup gives,...
std::vector< PlacementAffinity > placement_affinities(const model::Board &b, const Catalogue &cat, const Detection &det, Mode mode)
nlohmann::json report_json(const model::Board &b, const Catalogue &cat, const Detection &det, const Evaluation &ev)
std::vector< GeneratedKeepout > generate_keepouts(const model::Board &b, const Catalogue &cat, const Detection &det, std::vector< std::string > *not_generated=nullptr)
std::vector< SyntheticClass > synthetic_net_classes(const model::Board &b, const model::DesignRules &rules, const Catalogue &cat, const Detection &det, const Evaluation &ev)
std::string report_text(const model::Board &b, const Catalogue &cat, const Detection &det, const Evaluation &ev)
Report (doc 15 §7).
std::vector< EdgeAttraction > edge_attractions(const model::Board &b, const Catalogue &cat, const Detection &det, Mode mode)
std::vector< std::pair< model::NetId, model::NetId > > usb_pairs(const model::Board &b, const Catalogue &cat, const Detection &det)
USB 2.0 D+/D- pairs to route coupled first (USB2-02, doc 15 P3): one (dp, dm) per usb2 instance whose...
Evaluation evaluate(const model::Board &b, const model::DesignRules *rules, const Catalogue &cat, const Detection &det, Mode mode)
std::vector< ProximityPairs > proximity_pairs(const model::Board &b, const Catalogue &cat, const Detection &det)
Mode
–component-rules (doc 15 §3.5): off = nothing; report = detect and check only; soft = rules as costs,...
Mode parse_mode(std::string_view s)
throws std::invalid_argument
const char * mode_name(Mode m)
model::DesignRules with_synthetic_classes(const model::Board &b, model::DesignRules rules, const std::vector< SyntheticClass > &sc)
rules with the synthetic classes added and their nets assigned to them (in memory only,...
const char * status_name(Status s)
std::string dru_sidecar(const model::Board &b, const Catalogue &cat, const Detection &det)
The same intent as KiCad custom rules with net exemptions (which rule areas cannot express),...
Design rules as KiCad defines them (design doc 08 §3–4): board minimums and net classes from the ....
Connector edge pull for the placer (doc 15 §5.2 edge; CONN-01, USB2-11, DISP-02), opt-in (tracemaker-...
double max_mm
the rule's limit (report only)
std::vector< Point > body
std::string name
"CONN-01", "~CONN-01 J3 edge"
int weight
2 x signal weight, like ESD-01 (doc 15 §5.2)
Severity severity
after confidence demotion (doc 15 §3.2)
std::optional< ImpedancePlan > impedance
impedance rules: widths/gaps from the stackup (P4, report only)
std::optional< Measure > measure
std::optional< CurrentPlan > current
width_for_current rules that name a current (IPC-2221, report only)
std::string detail
what was applied, or why not
int instance
index into Detection::instances
std::vector< EffectiveRule > rules
Keep-out rule areas (doc 15 §5.5, P2) for instances at confidence >= apply: crystal + load caps (XTAL...
std::string what
how it was measured
Placement pseudo-nets for every applicable proximity rule (mode soft or on; confidence >= suggest).
A proximity rule bound to pads (doc 15 §4 proximity): each pair is (pad of the part that should move ...
int weight
placement pseudo-net weight (kSignalWeight; x2 for ESD to connector, doc 15 §5.2)
std::string unbound
non-empty: a role it needs is missing
std::vector< std::pair< int, int > > pairs
Net classes from rules (doc 15 §5.3-5.4 and §16, P5): impedance rules with a computed width/gap,...
model::NetClass cls
name "tmk_<RULE>_<anchor reference>"
std::vector< model::NetId > nets