63 if (o.signal_from == sf && o.signal_to == st && o.via_from == vf && o.via_to == vt)
return &o;
68 for (
const auto& l :
layers)
69 if (l.layer == layer)
return l.width;
113 std::vector<std::pair<std::string, std::string>>
patterns;
129 std::vector<std::string>
classes_of(
const std::string& net_name)
const;
bool pattern_match(const std::string &pattern, const std::string &text)
Net-class pattern: wildcard match or full regular-expression match (KiCad accepts both).
bool wildcard_match(std::string_view pattern, std::string_view text)
KiCad net-class pattern match: shell-style wildcards (* and ?), case-sensitive.
std::int64_t Coord
Engine coordinate: signed 64-bit nanometres.
int min_resolved_spokes
thermal spokes a pad needs into its zone (KiCad starved_thermal; project rules.min_resolved_spokes)
Coord copper_edge_clearance
Coord through_hole_diameter
minimum drill
Coord solder_mask_to_copper_clearance
bool allow_blind_buried_vias
Coord solder_mask_min_width
minimum mask web between openings (KiCad solder_mask_bridge test)
One constraint inside a custom rule, e.g. (constraint clearance (min 0.2mm)).
std::optional< Coord > min
std::vector< std::string > items
disallow item types, or other bare words
std::optional< Coord > opt
bool time
length or skew given in ps or fs: min/opt/max are attoseconds (KiCad's time domain)
std::string type
clearance, track_width, disallow, …
std::optional< Coord > max
lengths in nm (angles/counts are stored ×1e6 as well)
std::string layer
"", "outer", "inner", or a layer name
std::string condition
raw expression text, compiled by the rule engine
std::vector< Constraint > constraints
bool implicit
one of the rules KiCad compiles itself (tuning profiles, doc 05 §58), not from the ....
bool use_height_for_length
KiCad's "Include stackup height in track length calculations" (on unless the project turns it off): v...
const NetClass * find_class(const std::string &name) const
std::vector< CustomRule > custom
std::map< std::string, std::string > severities
KiCad violation type -> error | warning | ignore.
const NetClass & default_class() const
std::vector< NetClass > classes
classes[0] is "Default"
std::vector< std::string > warnings
anything that could not be interpreted
std::vector< TuningProfile > tuning_profiles
KiCad 10 tuning profiles, as the project lists them.
const NetClass & class_for(const std::string &net_name) const
Effective net class for a net name (explicit assignment, then the first matching pattern,...
std::vector< std::string > classes_of(const std::string &net_name) const
Names of every class that applies to a net (explicit assignments, then matching patterns),...
std::vector< std::pair< std::string, std::string > > patterns
(net-name pattern, class name), in file order
std::map< std::string, std::vector< std::string > > assignments
explicit net → class names
const TuningProfile * profile_of(const NetClass &c) const
The tuning profile a class names, if the project has one of that name.
bool has_diff_pair_gap
set explicitly in the project (not inherited)
Coord tuning_pair_gap
Set by the route job for a differential tuning profile (doc 05 §58): the pair gap its pairs are route...
std::uint16_t fields
Which of the ten parameters KiCad 10.0.6 fills from Default when unset (NET_SETTINGS::addMissingDefau...
bool profile_from_default
tuning_profile is Default's: the class names none (KiCad's addMissingDefaults)
std::string tuning_profile
KiCad 10: the name of the class's tuning profile ("" = none).
int priority
lower value = higher priority (KiCad 9+); Default has INT_MAX
static constexpr std::uint16_t kAllFields
A KiCad 10 tuning profile (.kicad_pro tuning_profiles, doc 05 §58): per signal layer the track width ...
std::string layer
signal layer name, e.g. "F.Cu"
Coord width_on(const std::string &layer) const
The width set for layer, 0 if none.
std::vector< TuningViaOverride > via_overrides
bool differential
KiCad's PROFILE_TYPE DIFFERENTIAL (1); SINGLE (0) otherwise.
const TuningViaOverride * via_override(const std::string &sf, const std::string &st, const std::string &vf, const std::string &vt) const
std::int64_t via_delay
attoseconds per mm of via height
std::vector< TuningLayer > layers
A via's delay for one signal-layer and via-layer span, instead of the profile's delay per mm (layer n...
std::int64_t delay
attoseconds