Commit Graph

481 Commits

Author SHA1 Message Date
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
Wayne Stambaugh 6c3ba1c20b Coverity issue fixes.
Issues #332032, #332086, #332157, and #332171.
2021-07-09 10:56:35 -04:00
Jeff Young 4aa8318dc2 More error message regularization. 2021-06-27 14:24:02 +01:00
Jeff Young 81fc710a5d Use consistent terminology.
Fixes https://gitlab.com/kicad/code/kicad/issues/8681
2021-06-26 10:11:41 +01:00
Jeff Young 232ffe97be Diff pair gap only overrides netclass clearance when it's smaller.
Fixes https://gitlab.com/kicad/code/kicad/issues/8676
2021-06-24 16:56:53 +01:00
Jeff Young 096e342386 Prefix TRACK, ARC and VIA. 2021-06-11 22:07:02 +01:00
Jeff Young 16b0147af8 Prefix DIMENSION types. 2021-06-11 17:59:44 +01:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Marek Roszko 10e60acf34 Clean up including of board_design_settings.h 2021-06-06 15:03:42 -04:00
Marek Roszko b610b905fc Cleanup track.h includes 2021-06-06 09:06:55 -04:00
Ian McInerney 4f05262705 Cleanup includes in board.h and footprint.h 2021-06-03 20:19:52 +01:00
Seth Hillbrand f40f696c37 Don't extract dp segment info from minimal-length
segments with 1IU of length are approximately parallel to everything and
the distance projections break down into rounding errors

Fixes https://gitlab.com/kicad/code/kicad/issues/8541
2021-06-03 08:44:17 -07:00
Seth Hillbrand 7f56ff4d42 Minor performance improvement
Don't keep searching the DRC RTree for collisions after we detect a true
(not clearance-based) collision
2021-06-02 08:15:37 -07:00
Jeff Young 00ed75b891 Fix DRC performance with multi-layer keepout zones.
The main issue was a parameter mismatch which caused On^2 behaviour
for zone layers.

But there are several other performance optimizations here, along
with status bar updating for zones while running the dissallow test.

Fixes https://gitlab.com/kicad/code/kicad/issues/8521
2021-06-02 14:11:43 +01:00