7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-02 00:26:45 +00:00
Commit Graph

1025 Commits

Author SHA1 Message Date
Jeff Young
9066ad3620 Report global physical_clearance issues before moving on to layers.
Also fixes a bug in reading m_LayerSource.

Also simplifies Edge_Cuts handling to better match
actual DRC checks.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20498
2025-03-30 14:22:56 +01:00
JamesJCode
906c24bc6d Unify length calculation between router, board / frame, and DRC 2025-03-30 09:18:41 +01:00
Jeff Young
6e2914b990 Update terminology. 2025-03-25 12:05:54 +00:00
Jeff Young
0a4533703c Performance. 2025-03-24 10:28:41 +00:00
JamesJCode
ede5faee72 Implement dynamic assignment of component classes 2025-03-15 14:33:47 +00:00
Seth Hillbrand
26c331a837 Adjust git handling
- Utilize scoped deletion for individual git_*_free() calls
- Protect against multiple usage when updating icons
- Reduce frequency of git update calls
2025-03-14 17:01:03 -07:00
Seth Hillbrand
1c245ad01e Be sure to clear hit cache
When re-running the DRC creepage check, we need to ensure that the
element-element hittest set is cleared to report the same errors again

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20048
2025-03-12 11:48:21 -07:00
Jeff Young
6df9c90440 Add textOnEdgeCuts to global DRC items list.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20308
2025-03-12 11:30:48 +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
567da3de91 Tables support for router.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20295
2025-03-10 15:45:42 +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
a468c486eb DRC for tables. (And some fixes for dimensions.) 2025-03-09 17:59:32 +00:00
Jeff Young
2ed2d733c3 Revert 1f620e9cca.
(A group member is still a child of the board; it's just
also a member of the group.)
2025-03-09 16:01:08 +00:00
Jeff Young
1f620e9cca forAllGeometryItems must account for PCB_GROUP descendants. 2025-03-09 11:47:31 +00:00
Seth Hillbrand
641e06e67c Removed shared_ptr circular references
When A references B and B references A, the shared pointer reference
count will never go to zero by just removing the parent container.  We
need to explicitly clear the shared pointer references when we are done

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20272
2025-03-07 17:31:02 -08:00
Wayne Stambaugh
a1b78d170d Use case insensitive comparison in symbol footprint filter match DRC.
This keeps the DRC test in line with the ERC test which is also case
insensitive.
2025-03-06 15:12:57 -05:00
Wayne Stambaugh
001d3dfd88 Test full LIB_ID in symbol footprint filter match DRC.
Apparently newer symbol libraries are using the library nickname in the
footprint filter string.  The symbol footprint filter match DRC was only
checking the footprint name against the new filter which would always
fail.  A test against the full LIB_ID string is now performed when the
filter string contains the library separator character ':'.  The ERC test
already performed this check.
2025-03-04 07:59:45 -05:00
Jeff Young
f951497a4f Code brevity. 2025-03-01 21:58:31 +00:00
Daniel Treffenstädt
5e467a969d Added check for custom thermal spoke count
When using custom thermal spoke templates, the user can create templates with fewer, or more, thermal spokes than 4.
2025-02-27 22:40:40 +00:00
Jeff Young
fde4aac075 Don't exit DRC when one test passes.
Also adds handling for table cells.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20049
2025-02-26 12:50:57 +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
Jeff Young
6ccacd232e Formatting. 2025-02-26 12:16:51 +00:00
Jeff Young
3f15b0d75b ADDED: hatched fills for shapes. 2025-02-24 11:08:29 +00:00
Jeff Young
e7652685f0 Always report all track keepout violations.
(Regardless of report-all-errors-per-track setting.
There's no clear rule here, but to do otherwise just
feels wrong.  Keepout areas are distinct, it's not
like tracks too close together reporting lots of
clearance errors.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13219
2025-02-24 11:08:29 +00:00
Jeff Young
5edae8250d Finish eradication of visibility flag on text items.
Import/read previously-hidden symbol/footprint
text items as hidden fields.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19875
2025-02-19 23:43:52 +00:00
Jeff Young
2a1b93a254 Fix bugs in library existence checking, and add for symbol libs. 2025-02-19 23:43:52 +00:00
Seth Hillbrand
9781da51e1 Speed up the time it takes to GeneratePaths
The loop processes nodes but skips those nodes that share the same
parent.  Because of this, we can get strong performance improvement from
caching gains by sorting the vector first by the parents so that the
inner loop is able to skip ahead without invalidating its cache
2025-02-19 18:05:07 +00:00
Alex Shvartzkop
83fc5ff793 Allow severity specifiers to be translated in ERC/DRC items. 2025-02-16 16:36:04 +03: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 bff819edb0)
2025-02-13 14:45:40 -08:00
Alex Shvartzkop
421a76c4f7 Translate "Padstack is questionable". 2025-02-07 00:30:23 +03:00
Jeff Young
8bdc7f108b Report errors when library is missing. 2025-01-29 20:54:33 +00:00
Jeff Young
e530bab396 Don't report "shorting nets" when one pad has no net.
(Fall back to clearance violation instead.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19752
2025-01-27 19:08:35 +00:00
jean-pierre charras
8528151a2b Fix incorrect format for a message 2025-01-17 11:54:14 +01:00
Jeff Young
5f45c2c0d1 Nullptr fixes. 2025-01-16 13:12:25 +00:00
Seth Hillbrand
c7c1748920 Keep the scoped copy of LSET
Attempting to fix an unknown windows crash

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19488
2025-01-14 15:27:42 -08:00
Seth Hillbrand
a77c9463e4 Fix memory leak in DRC_TEST_PROVIDER_CLEARANCE_BASE
We really shouldn't be getting the colors here (they need to be when
drawn) but if we do, we shouldn't allocate a whole new palette for each
object.
2025-01-14 15:27:42 -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
Jeff Young
21fb208d52 Fix a bad format stmt argument type. 2025-01-14 17:38:24 +00:00
Seth Hillbrand
3e8791b88d Fixup multiple issues with DP checks
Handle arcs properly even when not exactly concentric.  Properly check
for interfering elements that would prevent coupling.  Avoiding those
that are directly connected

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17967
2025-01-13 16:11:16 -08:00
Seth Hillbrand
8ccf8c1138 Speed up creepage
Make sure of sets where possible
Don't do checks in nested loops -- prune first
Thread when possible
Ensure we are updating the dialog as we go
Fix some coding convention issues

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19488
2025-01-11 13:18:29 -08: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
Jeff Young
dd7c076bc9 Use std::optional for pad connection overrides.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19555
2025-01-09 17:32:05 +00: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
Jeff Young
37a948fa69 Make sure we open all outlines before running distance test.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19521
2025-01-07 17:25:39 +00:00
Jeff Young
a41a9ea51f Simplify testing of multiple pads with same number.
We now test each hole against the combined copper of all pads
with the same number minus the other holes.

Also fixes a bug with "handled" flag not getting reset between
layers of padstacks.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19521
2025-01-07 14:50:16 +00:00
Seth Hillbrand
074e6df3bc Revert "Move thread pool to singleton class"
This reverts commit 361f61a023.
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
Seth Hillbrand
9c0890302e Migrate DRC Exclusion names
Changing names like was done in
https://gitlab.com/kicad/code/kicad/-/issues/18040 breaks old project
files unless the DRCE names are migrated.
2024-12-23 19:30:44 -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