Jeff Young
9e5e46514d
More wide-string declarations.
2022-02-05 13:29:00 +00:00
Seth Hillbrand
c2707f3cc0
Fix large memory leak in DRC
...
All elements get effective shapes, many of which get triangulated. This
memory needs to be freed when destroying the tree
2022-01-28 17:07:11 -08:00
Jeff Young
c02cadec2a
Exclude rules which match no enabled layers.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10227
(cherry picked from commit 0967cc82e2
)
2022-01-21 15:06:18 +00:00
Erwan Rouault
11c967b259
pcbnew: Add via height support in drc length
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10135
2021-12-30 14:34:44 +00:00
Seth Hillbrand
24fe5bc2a8
Fix DRC thread locking
2021-12-15 06:05:40 -08:00
Seth Hillbrand
40d44c94cd
Fix single-threaded loads/connectivity
...
We cannot set thread counts to hardware_concurrency()-1 without
considering that single core machines will get a thread count of 0.
2021-12-14 17:18:46 -08:00
Jeff Young
0dcbfa2b69
Always use UUIDs for implicit keepout rules.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/9580
2021-11-09 17:57:47 +00:00
Jeff Young
6af031be05
Use double-quotes for rule expressions.
...
The Mac double-quote bug is now fixed and strings inside expressions
are single quoted making single-quoting the entire expression pretty
hard to visually parse.
2021-11-08 20:53:59 +00:00
Jeff Young
ffd1139cfe
Make sure a pad is at least as big as its hole in the RTree.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/9516
2021-11-03 18:53:26 +00:00
jean-pierre charras
40e6a9a926
Fp editor: add DRC test for through hole pads without hole.
2021-10-19 14:47:29 +02:00
Jeff Young
856cc26d4c
Allow vias the same same-net waiver that pads have for hole clearance
...
Note that in 7.0 we have physical_hole_clearance rules to give a bit
more expressivity here.
Fixes https://gitlab.com/kicad/code/kicad/issues/9420
2021-10-18 18:09:40 +01:00
Jeff Young
b52529521e
Replace individual LIB_* shapes with LIB_SHAPE (based on EDA_SHAPE).
...
Also moves to more capable FILL_T model that can be shared.
2021-10-15 12:45:43 +01:00
Seth Hillbrand
fce054319c
Update DRC MatchDPSuffix routine
...
This matches the router matchDPSuffix routine until we merge the two
into a common utility
2021-10-11 10:33:50 -07:00
Jeff Young
dfe4997664
Fix nullptr crash.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/9250
2021-09-27 10:27:25 +01:00
Seth Hillbrand
3e7310a219
Move FP type check to FP DRC
...
Checks for validity are better centrally located where they don't
interrupt user actions
2021-09-25 08:56:27 -07:00
Jeff Young
c38de1dcaf
Pull back some 7.0 fixes to Custom Rules code completion.
2021-09-23 13:08:31 +01:00
Jon Evans
814b6b8e86
Fix disabled layer error text
2021-09-12 17:14:24 -04:00
Jeff Young
0ac765c5bb
Special case footprint zones which can be on "inner layers".
...
Also improves the reporting so that it reports the actual conflict
layer rather than just the first layer the object is on.
Fixes https://gitlab.com/kicad/code/kicad/issues/9144
2021-09-12 13:53:12 +01:00
Jeff Young
1a43515128
Repair multi-layer disabled layer tests.
2021-09-09 16:43:47 +01:00
Jeff Young
bb2efa0649
Improve disabled layer test.
...
1) handle graphic items on copper layers
2) handle items on multiple layers
2021-09-09 15:20:48 +01:00
Wayne Stambaugh
3b16c38756
Coverity issue fixes.
...
Fix Coverity issues 157138, 338547, and 338716.
2021-09-08 14:51:27 -04:00
Jeff Young
a397e85589
Implement PTH/NPTH/courtyard collision tests.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/9081
2021-09-04 00:16:26 +01:00
Jeff Young
436ad0ede7
Add missing token to DRC rule parser.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/9041
2021-08-27 12:49:07 +01:00
Jeff Young
f4905cb1ae
Cherry-pick fix from 7.0 branch back to master.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/9005
2021-08-25 20:14:11 +01:00
Jeff Young
e6ca9837a2
Clear numbers from non-numberable pads and don't run DRC on them.
...
This was also the last straw on the misnamed PAD::GetName() and
PAD::SetName(), which are now PAD::GetNumber() and PAD::SetNumber().
Fixes https://gitlab.com/kicad/code/kicad/issues/9017
2021-08-24 01:03:06 +01:00
Jeff Young
fec34e8dd8
Get rid of an extraneous layer parameter.
...
Also adds a bit of nullptr safety.
2021-08-23 20:00:17 +01:00
Jeff Young
9770962ab4
Fix logic bug in rule processing.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/9011
2021-08-22 20:16:58 +01:00
Jeff Young
1fa5e43597
Fix some dodgy logic in clearance overrides.
2021-08-22 03:24:51 +01:00
Jeff Young
3e57700b21
Process rules in "natural" order using overrides.
...
(We used to process in reverse order with first-match-wins, but
that doesn't allow min, max and opt to come from different rules.)
Fixes https://gitlab.com/kicad/code/kicad/issues/9004
2021-08-21 16:43:11 +01:00
Jeff Young
1e23ce1c95
Pull some fixes back from 7.0.
...
1) An earlier 6.0 fix to apply pad clearance overrides to NPTH pads
got broken, so this replaces it.
2) Allow min/max/opt to be set by different rules.
3) Fixes a bug where board minimum enforcement over a local override
didn't get the right message text.
2021-08-21 16:43:11 +01:00
Jeff Young
8b5f393804
DRC bug fixes and debugging improvements.
...
1) Don't wait for UpdateUserInterface to build the (global) list of
layer names.
2) Report clearance resolution between a silk layer and a mask layer.
3) When writing DRC reports, include info about the violating rule.
4) Report "no relevant layers" if we fail to find anything to write
a clearance resolution report about.
Fixes https://gitlab.com/kicad/code/kicad/issues/8963
2021-08-17 15:41:12 +01:00
Jeff Young
1a252b4f96
Add a compile error for ill-defined rules, and more performance.
...
Also adds const-safety to GetBoard().
2021-08-16 12:14:17 +01:00
Jeff Young
eaccbce48b
Fix logic errors in progress reporting in a couple of DRC providers.
2021-08-15 22:24:44 +01:00
Jeff Young
1ec70d30af
Cherry-pick some 7.0 Clearance Resolution improvements.
...
6.0 will be in the field for a long time, and the better the debugging
tools we have available the less costly it will be to maintain.
Fixes https://gitlab.com/kicad/code/kicad/issues/8961
2021-08-15 19:03:58 +01:00
Jeff Young
41619ebbe2
Decouple PROGRESS_REPORTER interface from implementations.
2021-08-14 21:05:49 +01:00
Jeff Young
e5586fb974
Accept legacy hole token as well as new hole_size.
2021-08-13 21:28:11 +01:00
Jeff Young
d34e9e8946
Code safety.
2021-08-13 21:28:11 +01:00
Jeff Young
4c3954aea8
Clearer DRC rule token name for hole_size.
2021-08-13 16:18:56 +01:00
jean-pierre charras
f4a7565b9c
fix a compil warning
2021-08-11 08:16:26 +02:00
Jeff Young
13fc16b03f
Fix uninitialized variable.
2021-08-10 16:51:30 +01:00
Jeff Young
a208dac8d8
Convert hole clearance tests from NPTH holes to all holes.
2021-08-09 22:26:00 +01:00
Jeff Young
bafa105ed0
Enforce hole clearance on NPTHs in zones.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8924
2021-08-06 18:16:38 +01:00
Jeff Young
faa1ff4ec6
Add false-negative DRC tests (and fix first bug found by them).
2021-07-31 16:41:44 +01:00
Jeff Young
8c69a856fc
Add zone filler tests.
...
One test has pads of a bunch of different shapes and provokes some
errors to make sure they're caught.
The others are all past issues with the zone filler to make sure we
don't suffer any regressions. (They should all just pass with no DRC
errors.)
2021-07-30 17:09:24 +01:00
Jeff Young
6aaf4413b3
Fix kicad_string.h / string.cpp mismatch.
...
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Jeff Young
f221220fe2
Rename layer ids file.
...
It hasn't had anything to do with colors or visibility for some time
now.
2021-07-29 16:03:25 +01:00
Jeff Young
46338403e7
Unwrap some std::library typedefs.
2021-07-28 22:16:38 +01:00
Wayne Stambaugh
8fd83cbb95
Pass wxPoint objects by reference instead of on the stack.
2021-07-26 15:35:33 -04:00
Jeff Young
0fb864d596
Pull some name changes back from 7.0 to ease merging.
2021-07-21 20:58:59 +01:00
Wayne Stambaugh
cf00319c85
More NULL expunging.
2021-07-20 07:27:18 -04:00