Jeff Young
6f9ebcfdb5
Make sure a pad has a hole before running hole test on it.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7567
2021-02-17 14:08:53 +00:00
Jeff Young
015c4d5779
Don't force disallow tests to a particular layer.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7552
2021-02-16 16:24:37 +00:00
Jeff Young
6272b48481
Make sure layer gets passed in to rules evaluation.
2021-02-08 14:53:49 +00:00
Jeff Young
78ba87be8f
More explicit error message for unconnected items.
2021-02-04 22:47:37 +00:00
Jeff Young
da8d0472f5
Layer must be between 0 and PCB_LAYER_ID_COUNT.
2021-02-04 01:00:20 +00:00
Jeff Young
8571687f51
Upgrade place via tool to new DRC.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7358
2021-02-01 23:00:13 +00:00
Seth Hillbrand
23c6dbff38
Need to check track/track clearance
...
The misplaced else prevented non-track/track intersection clearances
from being reported
Fixes https://gitlab.com/kicad/code/kicad/issues/7376
2021-02-01 10:08:27 -08:00
Marek Roszko
9d0b16e814
bool/int type safety
2021-01-31 19:54:32 -05:00
Jeff Young
56ea55ae9c
Make sure that NPTH pads still get handled in copper clearance checker.
...
... because that's where we do hole-to-copper clearance testing.
Also augments the Clearance Resolution reporter to report on said
hole clearances.
And changes the interpretation of HOLE_CLEARANCE_CONSTRAINT to include
local pad clearance overrides.
Fixes https://gitlab.com/kicad/code/kicad/issues/7325
2021-01-31 00:33:35 +00:00
Jeff Young
09eb4b35c6
Make sure footprint edges get checked.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7267
2021-01-25 13:20:16 +00:00
Jeff Young
2d8cac658e
Allow negative clearances to signal supression of DRC test.
2021-01-23 00:10:01 +00:00
Jeff Young
da4b269783
Make sure pad local clearances get in to m_worstClearance.
2021-01-13 12:37:20 +00:00
jean-pierre charras
067b94c410
DRC: Fix a incorrect message and marker position when testing dangling vias.
...
Commit 6ffb721
detects vias connected on only one layer.
But the DRC diag (marker position and error message) were not correctly initialized
for this new test.
2021-01-10 10:21:24 +01:00
Jeff Young
3fd128a75b
Performance enhancements.
2021-01-08 00:46:55 +00:00
Jeff Young
a48f0d21f7
More consistency in clearance resolution messages.
2021-01-05 16:54:52 +00:00
Jeff Young
33aa6edb01
Don't run clearance tests on unflashed NPTH pad layers.
2021-01-04 00:03:21 +00:00
Jeff Young
7378c2c3b3
Implement max hole size DRC checks.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6893
2021-01-04 00:03:21 +00:00
Jeff Young
b5e7611696
Don't cross-pollute CONSTRAINTs.
...
If you want the HOLE_CLEARANCE, then ask for it.
2021-01-02 16:33:51 +00:00
Jeff Young
018c17399d
SNR.
2021-01-01 23:17:49 +00:00
Jon Evans
241823647b
DRC: Fix a minor memory leak
2020-12-29 14:58:45 -05:00
Jon Evans
bc712a7383
Remove some stray printfs
2020-12-29 14:58:45 -05:00
Jeff Young
8300e17b69
Fix botched attempt to report hole violations between no-net items.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6851
2020-12-26 16:24:51 +00:00
Jeff Young
af2219ba7f
Finish implementation of hole clearance checking.
...
It appears we never did via hole testing, and pad hole testing didn't
appear to get much testing.
2020-12-25 22:32:19 +00:00
Jeff Young
9c4d3add15
Fix typo.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6845
2020-12-25 12:07:26 +00:00
Jeff Young
ef25c78a04
Separate polygonization error from chaining error.
...
This way we can report anything that doesn't exactly chain while still
applying a fudge factor for our own stuff.
Fixes https://gitlab.com/kicad/code/kicad/issues/1795
2020-12-24 21:02:14 +00:00
Jeff Young
38b8bc89ac
Fix a pair of typos.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6839
2020-12-24 19:32:24 +00:00
Jeff Young
17800b926f
Honour couryard_clearance rules when checking for courtyard overlaps.
2020-12-23 17:34:21 +00:00
Wayne Stambaugh
f311831c27
Coverity fixes.
...
280252, 314742, 314745, 314747, 314755, 314756, 314757, 314758,
314935, 314936
2020-12-20 13:24:47 -05:00
Jeff Young
b68b1692ec
Clean up some more user messages.
...
Mostly component -> symbol but also some I18N cleanup.
2020-12-18 12:49:20 +00:00
Jeff Young
3b35bfc0a5
Don't write out synthetic severities (they're headings).
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6726
2020-12-14 13:34:53 +00:00
Jeff Young
bc484784fc
Make sure zones are triangulated for DRC.
...
Normally this happens as a side-effect of rendering them but if done
from a script (or test case) this won't happen.
Fixes https://gitlab.com/kicad/code/kicad/issues/6635
2020-12-12 15:27:46 +00:00
Wayne Stambaugh
dd4298bb94
Coverity fixes: 280374, 313611, 313648, 313649, and 314720.
2020-12-11 13:29:52 -05:00
Ian McInerney
be4b6ec06a
Cleanup compiler warnings
2020-12-09 23:13:33 +00:00
Jeff Young
b1f0bf7334
More consistent naming.
2020-12-08 13:05:39 +00:00
Jeff Young
d0f9503ee0
Add grouping for violation severities.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6616
2020-12-06 19:14:48 +00:00
Jeff Young
b10aa230f7
Remove no-longer-used DRC violation code.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6616
2020-12-06 15:19:33 +00:00
Jeff Young
dbf273d5ec
Don't leave HOLE_PROXY set; it messes subsequent tests.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6584
2020-12-05 19:44:02 +00:00
Jeff Young
4c5567a627
Allow colliding pads in netties as well as graphic shapes.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6584
2020-12-05 19:44:02 +00:00
Jeff Young
4634802a58
Formatting.
2020-12-04 19:29:04 +00:00
Jeff Young
09bfb76545
Make sure dissallow constraints get added to rule.
...
Also improves some error reporting.
Fixes https://gitlab.com/kicad/code/kicad/issues/6566
2020-12-03 23:08:51 +00:00
Jeff Young
dadfe03804
Reinstate 5.1 net-tie hack since "real" net-ties got pushed to 7.0.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6556
2020-11-30 16:11:15 +00:00
Jeff Young
3a9a6e22bc
Fix issues in reporting netclasses.
...
1) make sure we get the default netclass when we want it
2) escape for HTML (particularly important for "<invalid>", but also
for reporting user rule names, netclass names, etc.)
2020-11-30 14:38:06 +00:00
Jeff Young
3989c19c41
Don't test pad:track clearances in pad tester.
...
They've already been tested in the track tester.
Fixes https://gitlab.com/kicad/code/kicad/issues/6554
2020-11-30 14:38:06 +00:00
Jeff Young
e09271ca0e
Fixes for hole clearance and hole-to-hole tests.
...
1) Separate out CONSTRAINT types
2) Filter both source and dest pads/vias for drilled holes when doing
hole-to-hole checks. We were checking the items being put into the
DRC RTree, but not the items we were scanning.
3) Add hole clearance to Board Setup Constraints panel.
Fixes https://gitlab.com/kicad/code/kicad/issues/6546
Fixes https://gitlab.com/kicad/code/kicad/issues/4683
2020-11-29 23:35:23 +00:00
Jeff Young
e4d0ffd607
Retire old SKIP_STRUCT filtering.
...
We already added the checkedPairs stuff which deals with a:b vs b:a
better, and the SKIP_STRUCT version had side-effects between the two
tests.
Fixes https://gitlab.com/kicad/code/kicad/issues/6539
2020-11-29 00:08:23 +00:00
Jeff Young
1cae0b6c08
Make sure board edges have 0 width.
...
When we divide up a rectangle or polygon (for better RTree usage)
we need to make sure the individual segments also have their widths
zeroed out.
Fixes https://gitlab.com/kicad/code/kicad/issues/6482
2020-11-24 23:49:28 +00:00
Jeff Young
9c7c05c161
Mostly formatting cleanup but a few type-casting cleanups too.
2020-11-24 22:16:41 +00:00
Jeff Young
2f3f4c209e
Make sure DRC reports a missing board outline.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6481
2020-11-24 14:22:27 +00:00
Jeff Young
1391774f64
Re-factor boundary/courtyard checker error handling.
...
ADDED Footprint Checker dialog to display the results in.
Fixes https://gitlab.com/kicad/code/kicad/issues/6446
2020-11-21 20:57:35 +00:00
Jeff Young
ff3bd7e72a
Fix a crash bug in DRC, and equate Margin to Edge.Cuts.
2020-11-20 21:22:27 +00:00
Jeff Young
b123318cf6
Encourage use of full DRC for board & footprint malformed outlines.
...
It shows much more detail. Removes some nag dialogs and places
hypertext links in others.
Also fixes the auto-layer-showing to correctly show Edge.Cuts or
F.CrtYd or B.CrtYd for errors relating to them.
Fixes https://gitlab.com/kicad/code/kicad/issues/6446
2020-11-20 17:24:52 +00:00
Jeff Young
533d344e3f
Honour pad falshing when colliding with DRC RTree.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6443
2020-11-19 23:55:14 +00:00
Jeff Young
0d850f98cd
Cleanup.
2020-11-19 22:48:18 +00:00
Jeff Young
6e0c58adec
Include local clearances even if no implicit rule was found.
...
The real test should be to apply it any time an explicit rule is
*not* found.
Fixes https://gitlab.com/kicad/code/kicad/issues/6426
2020-11-19 22:48:18 +00:00
Jeff Young
bfc4afc506
Restore the 5.1 NetTie hack.
...
We really need to do first-class net ties....
Fixes https://gitlab.com/kicad/code/kicad/issues/6416
2020-11-17 20:07:21 +00:00
Jeff Young
795e45836d
Fix assert in DRC.
2020-11-17 17:41:57 +00:00
Jeff Young
b2d86ec7c9
Don't double-check DRC clearances (a:b and b:a).
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6417
2020-11-17 16:58:39 +00:00
Ian McInerney
8c08b861ab
Cleanup some compiler and Coverity warnings
2020-11-15 21:41:38 +00:00
Jeff Young
1ce1e493d6
A rule zone is not really a BOARD_CONNECTED_ITEM.
...
Or at least it shouldn't always be treated as one.
Fixes https://gitlab.com/kicad/code/kicad/issues/6382
2020-11-15 20:23:15 +00:00
Jeff Young
7bd31d5237
Naming conventions.
2020-11-14 18:26:03 +00:00
Jeff Young
2eb71447e4
DRC RTree fixes.
...
1) Don't collide against hidden text
2) Don't collide in both directions (a:b & b:a)
2020-11-14 16:59:34 +00:00
Jeff Young
bdbb68f813
MODULE -> FOOTPRINT.
2020-11-13 16:04:03 +00:00
Jeff Young
3451ac3088
PCB_MODULE_T -> PCB_FOOTPRINT_T
2020-11-13 15:16:24 +00:00
Jeff Young
63a54d003e
More module -> footprint.
2020-11-13 15:16:24 +00:00
Jeff Young
9106cc19bf
Yet another tranche of module -> footprint.
2020-11-13 15:16:24 +00:00
Jeff Young
52a46341db
More module -> footprint.
2020-11-13 15:16:24 +00:00
Jeff Young
f5443de7f9
D_PAD -> PAD.
2020-11-13 15:16:24 +00:00
Jeff Young
84dd5108ba
Remove some "class_" prefixes from files.
2020-11-13 15:16:23 +00:00
Jeff Young
f7333ad64a
Update some classnames including archaic zone names.
2020-11-12 10:31:25 +00:00
Ian McInerney
d88eaaf477
Fix various compiler and Coverity warnings
2020-11-11 00:41:02 +00:00
Jeff Young
81ea71fb80
More safety when fetching via sizes.
2020-11-07 18:50:30 +00:00
Jeff Young
ae9afdd169
SNR. (Mostly for progammers, but a little for user messages.)
2020-11-02 16:20:00 +00:00
Jeff Young
c351b3c31f
Naming conventions.
2020-11-01 14:12:35 +00:00
Jeff Young
f600450ee6
DRC_TEST_PROVIDER_COPPER_CLEARANCES is for copper only.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6248
2020-11-01 14:12:35 +00:00
Jeff Young
d2befca5af
Clear subshapes before using again on a different layer.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6248
2020-11-01 14:12:35 +00:00
Jeff Young
7676ba6f5d
Coverity warning.
2020-11-01 14:12:35 +00:00
Jeff Young
a9bf4bc6a6
Fix freed-memory crasher.
...
While the DRC_ENGINE is not long-lived, it's test providers are,
and must be cleared for each use.
2020-10-31 15:45:41 +00:00
Jeff Young
115fd1d7f3
Move track-to-zone testing to RTrees.
...
Also implemente pad-to-zone testing and removes the control in the
GUI (now that it's fast).
2020-10-31 15:45:41 +00:00
Jeff Young
1a1aef756e
Reporting "actual" incompatible with exiting after first hit.
...
But we're currently using this only as a rough collision check
anyway as it doesn't know the specific item-to-item clearance.
2020-10-31 15:45:41 +00:00
Jeff Young
788a1e3bce
Handle footprint zones in zone collision checks.
...
Also fixes issue with progress reporter.
2020-10-31 15:45:41 +00:00
Jeff Young
cd93dbd324
Naming cleanup.
2020-10-31 15:45:41 +00:00
Jeff Young
8d4c9aeaac
Fix Mac-style include.
2020-10-31 15:45:41 +00:00
Jeff Young
d5addb692c
Move a bunch of DRC tests to RTrees.
2020-10-31 15:45:41 +00:00
Jeff Young
776ea35040
Fix copy/paste error and some formatting issues.
2020-10-27 22:46:19 +00:00
Werni
a7d5d1f091
Add more consts all over the place
2020-10-27 11:03:35 +00:00
Jeff Young
2e94be0855
Move geometric parts of Cleanup Tracks and Vias to RTree.
...
Removes two separate O(n^2) traverses over the tracks.
Fixes https://gitlab.com/kicad/code/kicad/issues/6077
2020-10-26 18:37:59 +00:00
jean-pierre charras
c092e3f8b7
Fix a few minor Coverity warnings
2020-10-26 10:46:08 +01:00
Marek Roszko
1984581c46
Remove common.h from more headers
2020-10-25 22:29:53 -04:00
Jeff Young
45113f983b
Fix test case.
...
Silk tests were processing MODULE_Ts when they shouldn't have been.
2020-10-25 23:19:39 +00:00
Jeff Young
2ee61f52ca
Implement correct layer handling for keepout constraints.
2020-10-25 22:47:47 +00:00
Jeff Young
8c93fc76ae
Don't require keepout zones to be named.
...
insideArea() now takes A, B, a UUID or a zone name. (Only the UUID
is new.)
2020-10-25 21:08:09 +00:00
Jeff Young
5b1e1075a9
Allow an easy way for DRC tests to specify compound objects or not.
2020-10-25 20:24:47 +00:00
Jeff Young
386cefbe84
Do footprint keepouts by courtyard.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6162
2020-10-25 18:17:58 +00:00
jean-pierre charras
d6f91c810f
Fix a few compil and Coverity warnings.
2020-10-25 10:02:07 +01:00
Marek Roszko
e928b2d8fd
Split EDA_UNITS out from common.
2020-10-25 00:02:52 -04:00
Jeff Young
7674d2ba91
Free allocated DRC structures when re-initializing.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6147
2020-10-24 22:39:53 +01:00
David Shah
66bcfb3ffc
drc_engine: Fix via type names
...
There was a mismatch between the via type names used in the DRC engine
and the via type names defined in the class_track.cpp ENUM_MAP for
VIATYPE.
This fixes the discrepancy; which was breaking microvias altogether as
the route tool also uses the DRC code to determine the correct
diameter/drill (without this patch it was incorrectly using regular
dimensions for microvias.)
2020-10-24 15:46:47 +00:00
Jeff Young
59f3fefd17
When polygonizing arcs don't use synthesized center and angle.
...
Start, mid and end are the "real" properties and come with less
error.
Also collapses two arc polygonization routines into one.
Also fixes DRC checks to be cognizant of arc approximation error.
Fixes https://gitlab.com/kicad/code/kicad/issues/6039
2020-10-23 23:55:45 +01:00
Seth Hillbrand
19bf594aa0
Remove unused point in polygon test
...
There can be only one.
2020-10-23 12:13:09 -07:00
Jeff Young
01ce881340
Honour NOT_IN_SCHEMATIC setting.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6137
2020-10-23 17:27:18 +01:00