228 Commits

Author SHA1 Message Date
Jeff Young
89fcd3134e ADDED: text variable processing in DRC rules.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11231
2025-06-23 09:02:51 -06:00
Jeff Young
9d6928043f Don't format strings if we're not going to report them. 2025-06-09 20:09:24 +01:00
Jeff Young
c994b96509 ADDED: custom rules for solder mask & paste margins.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15622
2025-06-03 11:41:27 +01:00
Jeff Young
6b08407bd5 Formatting. 2025-05-06 13:11:07 +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
JamesJCode
eb17ebee4e Implement time-domain length tuning
- Adds time and delay units
- Adds time domain tuning parameters entry and storage
- Adds pad-to-die delay property
- Adds time domain parameter interface for length / delay calculations
- Adds unit tracking for numerical constants through LIBEVAL
   - Will need future work to truly propagate through binary expressions
- Adds time domain tuning to meander placers
- Adds time delay display to net inspector panel
- Modifies DRC to handle time domain constraints
2025-04-17 21:46:56 +01:00
Jeff Young
6e2914b990 Update terminology. 2025-03-25 12:05:54 +00:00
JamesJCode
ede5faee72 Implement dynamic assignment of component classes 2025-03-15 14:33:47 +00:00
Jeff Young
31b788c04f Add a bit of protection from integer overflows.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19660
2025-03-11 15:11:31 +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
Jeff Young
f951497a4f Code brevity. 2025-03-01 21:58:31 +00:00
Jeff Young
956875e2f4 DRC_LAST is the last index, not the size.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20049
2025-02-26 12:50:49 +00:00
Seth Hillbrand
9e4204340f Fixup net-tie caching and add QA for netties
When building a net tie, all elements in the footprint that belong to
the net tie can be arbitrarily close to one another.  outside of the
footprint, connected items can be arbitrarily close to the tie element
but must respect the clearance values for elements that have nets
assigned to them

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19933

(cherry picked from commit bff819edb08e3d303c695b79f990374d259e4d0a)
2025-02-13 14:45:40 -08:00
JamesJCode
c80a71f64a Make netclass name methods clearer, and improve doc strings
There are two netclass name methods, which previously were not
obvious in their uses. These have been renamed to now have:

GetName() : Used for internal or tooling (e.g. netlist export) usage
GetHumanReadableName() : Used for display to users (e.g. in infobars)

Fixing the previous unclear naming will result in fewer bugs
when users start using the multiple netclass functionality, as
the incorrect usage had started creeping in to new code. Also this
will help authors of new code select the correct name method.
2025-01-14 20:44:09 +00:00
Seth Hillbrand
ae4ef7c062 Allow display of each new phase
KeepRefreshing is gated so if we get a bunch of phases in a row, they
won't be shown until you get past a slower phase.  By yielding here, we
ensure that the dialog is updated and the user knows which phase of DRC
they are on.
2025-01-11 13:18:29 -08:00
Seth Hillbrand
452e69de85 Move thread pool into true singleton
Thread pool needs to be stored in a single location for all of KiCad
otherwise each kiface will spin up its own pool of persistent threads
2025-01-09 09:03:08 -08:00
Seth Hillbrand
074e6df3bc Revert "Move thread pool to singleton class"
This reverts commit 361f61a02380881efb59b1cebfdc3e73322b3d3c.
2025-01-03 21:22:44 -08:00
Seth Hillbrand
361f61a023 Move thread pool to singleton class
Having thread pool as its own singleton in the library meant that each
kiface had its own threadpool, leading to many multiples of the threads
being started.  Placing a singleton class in PGM_BASE ensures that all
kifaces use the same thread pool.

The singleton class can be extended to provide single instance
guarantee for any element across kifaces
2025-01-03 13:51:11 -08: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
JamesJCode
3800bae281 Enforce thread safety in clearance and creepage checks
Previously, these checks injected a custom handler to add graphic
objects to a DRC marker. This was not thread-safe and was causing
non-deterministic crashes. The DRC reporting methods now accept
a customer handler which is called on the newly created
PCB_MARKER within the commit context. This defaults to nullptr
for DRC checks which do not require graphics or other additional
processing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19282
2024-12-23 18:10:47 +00:00
Wayne Stambaugh
425958d754 Add simple timer profiling to DRC engine.
Remove the PROFILE definitions from the incremental connectivity
profiling so a special build isn't required.  If the starting and
stopping the profile timer is excessive, we can add this back.

(cherry picked from commit 8a09e5f3c3ab185671a5944625e5f8b3ef4fb5c5)
2024-12-20 15:57:41 -05:00
Seth Hillbrand
41d4a8caab Adjust DRC clearance for net ties
Items that are part of net ties (pads and copper shapes that connect to
them) should allow connections from any net in the tie.  This prevents
clearance errors from being generated for matched nets

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14008
2024-12-10 15:54:47 -08:00
Jeff Young
7074c31374 Must check for implicit min separately from opt/max.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19012
2024-10-29 16:32:34 +00:00
Fabien Corona
b709245f17 Change graphics handler init 2024-10-24 01:09:25 +02:00
Fabien Corona
5e263c9eec Add a graphics handler to DRC Engine
The handler can be used to set graphical shapes to a DRC marker
2024-10-24 00:49:51 +02:00
Fabien Corona
f258cc5164 DRC creepage 2024-10-15 18:04:51 +00:00
JamesJCode
37a3e55bd3 Allow pcb rule areas to handle keepout and placement concurrently
- Implements component classes for placement rule areas and multichannel tool
- Implements property inspector properties for rule areas
- Fixes some zone member default initialisation issues
- Gates all multichannel-related imlpementation with existing adv config flag
- Removes rule area type enum, replaces with inference from keepout and
  placement settings
2024-10-10 23:29:02 +01:00
Tomasz Wlostowski
60ba72ad5c pcbnew: distinguish between KEEPOUT and PLACEMENT rule areas in the DRC (ignore PLACEMENT for the moment) 2024-08-13 22:50:26 +02:00
James J
7ce00e511b Multi-netclass support 2024-07-26 20:49:29 +00:00
Seth Hillbrand
e0453d9bcc Further cleanup of LSET
Remove duplicative functions.  Standardize on C++ stdlib formatting
2024-07-08 22:00:53 -07:00
Jeff Young
16340e6cf4 Support both short and long item descriptions. 2024-06-28 22:10:22 +01:00
Jeff Young
18e33a0957 Check drilled holes against other holes, even if laser burned.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18142
2024-06-03 21:53:37 +01:00
Jeff Young
bc14a841cb Check for drilled hole errors in Footprint Checker.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18093
2024-05-27 13:51:21 +01:00
Jeff Young
e445249720 ADDED: PCB tables. 2024-02-24 20:05:51 +00:00
Jeff Young
ee3be0802c Move PCBNew overrides to nullable properties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5562
2024-02-24 20:05:51 +00:00
Jeff Young
d51e058e24 Move diff-pair netname resolution to BOARD.
Also adds reporting of dp gap constaints and max uncoupled to track
selections, and max uncoupled during routing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13748
2023-10-15 22:46:23 +01:00
Jeff Young
9805aca5a0 Handle backslash-escaped quotes in libeval.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15786
2023-09-30 17:38:44 +01:00
Marek Roszko
4d77fd48ef Shove thread_pool to core 2023-09-06 17:50:12 -04:00
Mike Williams
37837dc392 PCB: introduce PCB_FIELD_T 2023-06-20 18:34:52 +00:00
Jeff Young
251161dbeb Bring inspection reporting in line with zone filler
1) "clearance" rules don't apply to NPTH holes with no copper
2) local zone clearance applies even if other item has no copper

Fixes https://gitlab.com/kicad/code/kicad/issues/14575
2023-04-28 22:15:10 +01:00
Jeff Young
bbd6c80507 Collapse FP_* down into their PCB_* equivalents. 2023-03-31 22:57:46 +01:00
Jeff Young
a214ac0310 Better reporting of copper <--> keepout area clearances.
(Keepout areas can keep-out copper, but they don't have a clearance
to copper.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14375
2023-03-26 20:57:59 +01:00
Seth Hillbrand
597ef81e53 Allow micro/buried via holes to be considered
hole_to_hole clearance should account for all holes in the board.
Previously, we had excluded non through holes from this test but that
omits via holes that can still foul a future drill hit.

Designers wanting the old behavior can explicitly set the hole_to_hole
clearance to 0mm for specific ViaType pairs
2023-03-03 00:42:44 +01:00
Jeff Young
7bb2cdd658 Better error reporting for constraints (and a bug fix for no constraints).
Fixes https://gitlab.com/kicad/code/kicad/issues/14070
2023-02-28 18:07:29 +00:00
Jeff Young
d9a77e6a64 Add DRCEpsilon to net-tie-exclusion testing.
Fixes https://gitlab.com/kicad/code/kicad/issues/14008
2023-02-24 12:44:55 +00:00
Jeff Young
5b0f1376c0 Simplify code now that we no longer drop out on first rule fired. 2023-02-16 17:55:33 +00:00
Jeff Young
978c2b074e Negative clearance means test will be ignored, not rule. 2023-02-16 17:39:47 +00:00
Jeff Young
407cdd63fb Translatable strings. 2023-02-16 17:28:06 +00:00
Jeff Young
235925d62c Clearer reporting of negative clearances. 2023-02-03 15:08:31 +00:00
Jon Evans
c530bdb5a1 Rename GetSelectMenuText to GetItemDescription
This descriptive text is used for many more things than
just the select menu these days.
2023-01-11 22:27:44 -05:00