12#include <nlohmann/json.hpp>
60 const std::vector<model::Via>& vias,
const StyleOptions& opt = {});
The board model (design doc 02 §3): every object TraceMaker reads from a .kicad_pcb,...
std::int32_t NetId
0 = no net
nlohmann::json style_json(const model::Board &b, const StyleReport &r, bool per_connection=false)
The style object of the route summary and of tracemaker style --json.
StyleReport measure_style(const model::Board &b, const std::vector< model::Track > &tracks, const std::vector< model::ArcTrack > &arcs, const std::vector< model::Via > &vias, const StyleOptions &opt={})
Measures tracks, arcs and vias (any subset of a board's copper, e.g.
std::int64_t Coord
Engine coordinate: signed 64-bit nanometres.
One connection: copper of one net from one end to the next.
int arcs
arc tracks (not judged for bends or angles)
int stair_steps
runs, see StyleOptions
model::Point b
the two ends
Coord length
nm, each piece rounded to the nanometre
Coord octile
shortest octilinear distance between the ends, nm (0 for a closed loop)
int short_segments
segments shorter than their own width
int off_angle
segments more than 0.1 degree off the eight octilinear directions
int bends
direction changes between consecutive segments on one layer
int acute
bends sharper than 90 degrees (the two segments enclose less than 90 degrees)
int vias
layer changes passed through
int segments
after joining collinear pieces
int long_detour_pc
A connection is a long detour when its copper is longer than this many per cent of the shortest octil...
int stair_widths
A stair-step is a run of at least stair_min_segments consecutive segments on one layer,...
double detour_ratio() const
std::vector< ConnectionStyle > connections
sorted by net, then end points
Coord detour_octile
summed over the connections with distinct ends
double bends_per_connection() const