20#include <nlohmann/json.hpp>
32 std::vector<std::pair<model::NetId, model::NetId>>
pair_nets;
54 std::vector<geom::Point>
path;
89 std::vector<ReturnEnd>
ends;
91 std::vector<std::pair<int, std::vector<geom::Point>>>
signal;
92 std::vector<std::pair<int, std::vector<geom::Point>>>
ret;
97 std::vector<NetReturn>
nets;
The board model (design doc 02 §3): every object TraceMaker reads from a .kicad_pcb,...
std::string return_path_message(const model::Board &b, const NetReturn &n)
nlohmann::json return_path_json(const model::Board &b, const ReturnPathReport &r)
The report as JSON (nanometres converted to millimetres), and one return_path viewer message per net ...
ReturnPathReport analyse_return_paths(const model::Board &b, const model::DesignRules &rules, const ReturnPathOptions &opt)
Analyses the nets the options select on b as it stands (routed copper included). Deterministic.
std::vector< std::string > return_path_lines(const model::Board &b, const ReturnPathReport &r)
A one-line text form per net and the lines under it that explain a warning.
std::int32_t NetId
0 = no net
Integer-nanometre points and KiCad-compatible rotation.
Design rules as KiCad defines them (design doc 08 §3–4): board minimums and net classes from the ....
std::vector< int > layers
signal layers
int split_count
voids with no return path
double detour_mm
summed over the voids
std::vector< ReturnLayerChange > changes
std::vector< std::pair< int, std::vector< geom::Point > > > ret
std::vector< ReturnEnd > ends
std::vector< std::pair< int, std::vector< geom::Point > > > signal
For the viewer: the signal as polylines per layer, and the return along it (mirror over copper,...
std::vector< int > reference_layers
the reference layer of each signal layer, same order (-1 = none)
std::vector< ReturnVoid > voids
std::vector< std::string > warnings
double uncovered_mm
trace length with no reference layer at all
geom::Point at
< a trace end at a pad: the assumed return pad
std::string ref_pad
nearest pad of the reference net, "" = none within the radius
geom::Point at
the signal via
std::string ref_to
reference net names ("" = no reference copper under the via)
std::string closure
"stitch via", "capacitor", "none", "no reference"
double distance_mm
to the closure
double warn_separation_mm
double min_void_mm
a stretch without copper shorter than this is a sampling artefact, not a void
double warn_detour_mm
thresholds: warnings, not DRC errors
bool refill_always
refill every zone: the fills in the file predate copper that was just routed
double sample_mm
spacing of the samples along a trace
std::vector< std::string > name_patterns
Which nets: a signal is analysed if it matches any selector (default: none, the pass is off)....
double stitch_radius_mm
how far a stitching via or a capacitor may be from a layer change
std::vector< std::string > net_classes
std::vector< std::pair< model::NetId, model::NetId > > pair_nets
differential pairs, resolved by the caller (route::named_pairs)
bool refill
zones without fills are refilled first (the engine's refill, not KiCad's)
std::vector< std::pair< std::string, std::string > > reference_layers
"PATTERN=LAYER": the reference layer of the nets that match, instead of the adjacent layer with the m...
bool diff_pairs
analyse the halves of pair_nets
std::vector< std::string > notes
what the run could not do (arcs skipped, zones refilled, a net without a reference ....
ReturnPathOptions options
std::vector< NetReturn > nets
double return_mm
the return path between them (the shortest path on the reference copper)
geom::Point farthest
where
std::vector< geom::Point > path
the return path, entry to exit
int layer
signal layer (copper index)
double detour_mm
return - signal, at least 0
bool no_path
the reference copper does not connect the two ends (a split plane): no return on this layer
double signal_mm
the trace between them
double max_separation_mm
the farthest the return gets from the trace
geom::Point exit
where the trace leaves and regains copper under it