33 Commits

Author SHA1 Message Date
Jeff Young
ea8b0c0e8a Don't expect a B item when evaling DIFF_PAIR_GAP_CONSTRAINT.
The checker first builds a map with only the
A items.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19825
2025-05-06 14:15:03 +01:00
JamesJCode
1400eb7902 Add hasExactNetclass function to DRC condition language
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 c25264528c1caae08fb111c8a3bfd2e66283e11e)
2025-04-27 22:40:46 +01:00
Mike Williams
05e9772d54 groups: extract common class methods into EDA_GROUP base class 2025-04-01 14:34:20 -04:00
JamesJCode
4a99a3060d Add new DRC expression function isMemberOfSheetOrChildren
This allows the multichannel tool to search for footprints that are in nested
hierarchical sheets.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20339
2025-03-17 15:55:59 +00:00
JamesJCode
ede5faee72 Implement dynamic assignment of component classes 2025-03-15 14:33:47 +00:00
Jeff Young
6ac64d290b Check parent footprint as well for component class.
Also output more descriptive text when checking inherited
rules on parent footprint.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20281
2025-03-10 13:34:01 +00:00
JamesJCode
54540f9e82 Don't dereference null COMPONENT_CLASS in testFootprintSelector
This can happen when running standalone, where component classes
have not been resolved.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20235
2025-03-06 21:43:52 +00:00
Jeff Young
c5bb59468d Get rid of assumptions about field order. 2025-02-24 11:08:29 +00:00
Jon Evans
d74744596e Fix application of component class to memberOfFootprint
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19663
2025-01-18 09:14:28 -05:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
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
2025-01-01 14:12:04 -08:00
Seth Hillbrand
e9bc8cfe9d Give Clipper1 a Viking funeral
Clears out the last spot where we were only using Clipper1 (how'd I
miss that?) and remove all calls to the Clipper1 structures
2024-12-23 17:12:09 -08:00
Jeff Young
610d497600 Fix enclosedByArea for footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19137
2024-12-03 12:43:59 +00:00
Jon Evans
683ce4c904 Support component class in footprint custom rules 2024-11-11 18:34:27 -05:00
JamesJCode
db072a524c Consolidation of Component Class implementation
- 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')
2024-10-24 20:11:35 +01:00
JamesJCode
d64a112971 Implement Component Classes
- 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
2024-10-01 22:36:18 +01:00
Tomasz Wlostowski
64afa302c9 pcbnew: improve handling of trailing '/' in hierarchical sheet paths in DRC memberOfSheet() function 2024-08-13 22:50:25 +02:00
James J
7ce00e511b Multi-netclass support 2024-07-26 20:49:29 +00:00
Seth Hillbrand
cc850d0da0 Split out LSEQ/LSET from LAYER_ID
Separate the layer grouping classes for easier modification
2024-07-08 20:59:46 -07:00
Jeff Young
5ba2896968 enclosedByArea test for zone needs to be outline-based.
(Otherwise it's order-specific when filling, which
is pretty unpredictable.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18202
2024-06-15 17:52:15 +01:00
Jeff Young
694a7db457 Performance improvements.
Don't construct a wxString or a LSEQ when you don't
have to.  They're both more expensive than you might
think.
2024-06-12 11:06:10 +01:00
Jeff Young
560f6f87e5 Silkscreen clearance tests are run across layer pairs.
(So any rule areas must pretend they're on all the
given side's layers to get expected results.)
2024-05-22 01:16:06 +01:00
Jeff Young
ab2fdfb9cc Formatting. 2024-05-22 01:16:06 +01:00
Jon Evans
7f03666f96 Support LIB_ID queries in searchFootprints too
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18039


(cherry picked from commit fee0028ee978dc68d007307e0c58b41b77ac234b)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-17 17:57:42 +00:00
Seth Hillbrand
9648fafe11 Handle memberOfSheet for full footprints
Previously, we handled clearance for just components in the eval
function.  We also checked the incorrect root sheetname.
2024-03-11 16:32:24 -07:00
Jeff Young
06a8517818 Further improvements to cache locking.
In particular, don't hold cache lock while doing computations.
2024-03-07 13:20:20 +00:00
Armin Schoisswohl
4dcec60bf4 add include <mutex> to fix compilation under linux 2024-03-07 13:20:16 +00:00
Armin Schoisswohl
bb9448edcb change m_CachesMutex to shared_mutex and do shared locking for read access in zone BBox calculations 2024-03-07 13:20:13 +00:00
Armin Schoisswohl
991ff71f33 fix deadlock in DRC "Checking keeopouts & disallow constraints" 2024-03-07 13:20:10 +00:00
Jeff Young
43c45f3ee8 Fix copy pasta. 2024-02-26 12:39:01 +00:00
Jeff Young
236123c487 Allow FPID to be matched against in memberOfFootprint().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16662
2024-01-22 14:03:45 +00:00
Alex Shvartzkop
d7863b09c5 Move CORNER_STRATEGY out of SHAPE_POLY_SET. 2023-10-06 15:42:50 +03:00
Seth Hillbrand
cb3c712a9c ADDED: memberOfSheet() design rule function
Footprints that are a member of a specific sheet may be assigned
distinct rules, allowing users to group their rules based on sheet
layout
2023-09-06 19:14:00 +00:00
Jeff Young
55a7b9e6bf More consistent naming.
(Also better differentiates the PCBEXPR_ classes from PCB_
objects.)
2023-08-21 15:26:33 +01:00