65 std::vector<std::pair<std::string, std::string>>
patterns;
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.
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
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 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
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::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
bool has_diff_pair_gap
set explicitly in the project (not inherited)
int priority
lower value = higher priority (KiCad 9+); Default has INT_MAX