There are some headers which don't need to include pad.h (which brings
padstack.h) - they just need forward defines.
While pad.h is not an especially heavy include on the scale of things,
footprint is quite heavy. And both reduce inclusion load and
reduce the number of files needlessly sensitive to changes in headers.
The geometry-dependent function set in CreateFuncCall was a
hardcoded copy of names that had to be manually synchronized
with RegisterAllFunctions. Adding a new geometry-dependent
function without updating both lists would silently skip
per-segment DRC evaluation for rules using that function.
Add an isGeometryDependent flag to RegisterFunc and query it
from CreateFuncCall so there is a single source of truth.
Commit 77499b92c6 added segment-by-segment DRC evaluation
for multi-segment PNS LINEs in QueryConstraint(). This runs
the full LIBEVAL VM per segment per collision pair, which is
catastrophically slow on boards with custom clearance rules.
The per-segment path only produces different results from
anchor-based evaluation when a rule condition calls a
geometry-dependent function (intersectsArea, etc.). For
property-based conditions like NetClass or Type, all segments
of a LINE share the same values, so a single evaluation at
the anchor is correct.
Tag geometry-dependent functions at compile time in
PCBEXPR_UCODE::CreateFuncCall(). Propagate the flag through
DRC_RULE_CONDITION to DRC_ENGINE::m_hasGeometryDependentRules
during compileRules(). Gate the segment-by-segment path in
QueryConstraint() on this flag so the fast anchor-based path
runs when no rules use geometry functions.
This breaks the view_item.h -> inspectable.h -> property.h chain that
pulled wx/propgrid/property.h into 150-200 TUs. The lean inspectable.h
now includes only wx/any.h, wx/string.h, wx/variant.h.
Headers using DECLARE_ENUM_TO_WXANY (board_item.h, sch_item.h) retain
their property.h include since the macro requires it.
Replace searchAreas zone iteration with a direct cache lookup.
The board's item-by-ID cache already contains all zones, both
board-level and footprint-level, so we can retrieve the target
zone by UUID in constant time instead of scanning all zones.
Optimize performance of area-based DRC clearance rules by caching
zone name lookups and deflated outlines. This avoids repeated
expensive operations during trace moves. Caches are cleared when
the board is modified and use thread-safe locking for concurrent
access.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21444
Following changes to the `A.NetClass == '<netclass>'` semantics to
match on exact netclass name OR any constituent netclass names, we
can have conditions where constituent netclass constraints match
before the composite netclass constraints in the DRC engine. This
adds the functionality to match on the exact full netclass name, and
modifies the implicit netclass DRC rules to use this function in
their rule condition.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20797
(cherry picked from commit c25264528c)
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo. Avoids needing to
repeatly update.
Also updates AUTHORS.txt from current repo with contributor names
- Moves functionality to FOOTPRINT class from BOARD_ITEM
- Renames DRC property from ComponentClass to Component_Class
- Adds DRC checks QA for A.Component_Class and a.hasComponentClass('x')
- Adds Component Class field to SCH_DIRECTIVE_LABEL
- Adds SCH_SYMBOLs to SCH_RULE_AREA item lists
- SCH_SYMBOLs resolve Component Class directives
- Netlist exporter / importer handles Component Class names
- Adds DRC expressions and functions
- Adds QA check for component class netlist export