Commit Graph

105 Commits

Author SHA1 Message Date
Jeff Young 015bde8cb0 Test pad:hole violations in footprints as long as not same pad number.
Fixes https://gitlab.com/kicad/code/kicad/issues/12124
2022-08-07 19:49:39 +01:00
Jeff Young 96f01d33c8 Performance improvements.
1) Move a bunch of std::map's to std::unordered_map to get constant-time
look-ups
2) Lengthen progress-reporting intervals to spend more time doing work
and less time talking about it
3) Reverse order of SHAPE_LINE_CHAINs in thermal intersection checks to
make (much) better use of bbox caches
4) Don't re-generate bboxes we already have
5) Fix some autos that weren't by reference (and were therefore copying
large datasets)
6) Rename delta progressDelta so it's easier to search for in future
7) Get rid of a few more autos (because I don't like them)
8) Pass large items to lambdas by reference

Fixes https://gitlab.com/kicad/code/kicad/issues/12130
2022-08-03 11:59:42 +01:00
Jeff Young f41af10007 Clean up hole shapes for safety (smart pointer) and consistency. 2022-07-22 23:06:07 +01:00
Jeff Young 97b0005780 More caching for DRC.
Also fixes a bug where some physical clearance tests would be run even
if the clearance was 0 (or if the rule was set to IGNORE).
2022-06-17 23:58:31 +01:00
Seth Hillbrand 5327b10064 Remove shared wxString instance in DRC
Threaded DRC access will write to this string, re-allocating the memory
without any synchronization between threads using the string.  Comment
adding this listed performance as a reason for using shared strings.
Measured performance does not seem noticeably different in either case,
even with high-error count boards.  If there is a case where the
performance is limiting, we can replace these wxStrings with
std::wstring and utilize fmt

Fixes https://gitlab.com/kicad/code/kicad/issues/9888
2022-06-15 16:46:03 -07:00
Jeff Young f590dcf513 Fix a couple of typos. 2022-05-06 00:06:00 +01:00
Jeff Young 82820d4b1c Cleanup. 2022-04-09 20:39:35 +01:00
Jeff Young a118249093 NPTHs obey HOLE_CLEARANCE, not CLEARANCE.
Also, plating thickness appears on both walls, so diameter is drill
plus 2X plating thickness.
2022-04-04 20:43:08 +01:00
Jeff Young 6f555b6258 wxT() and some cleanup in DRC. 2022-03-11 23:19:16 +00:00
Jeff Young ae307e1b34 Parallelize DRC triangulation, keepout processing, and sliver checking.
Also fixes issue with adding fractured polygons in sliver checking which
slowed the board from hell down to less than a crawl.
2022-03-11 20:52:11 +00:00
Jeff Young 663edcf665 Better progress indication for board from hell. 2022-03-09 14:30:21 +00:00
Jeff Young 843a56c4e4 Implement two-staged zone priority: assigned priority followed by UUID. 2022-03-01 14:53:35 +00:00
Jeff Young 50a4d610a6 Be cognizant of flashed layers when generating pad shapes. 2022-02-11 13:10:52 +00:00
Marek Roszko 193dee11e8 Add missing null check PVS V595 2022-02-05 11:25:09 -05:00
Marek Roszko 7d671cff1e Scoop up some more wxPoints 2022-01-01 21:06:40 -05:00
Jeff Young ab583a32f9 Better layer handling for DRC markers.
Fixes https://gitlab.com/kicad/code/kicad/issues/10126
2021-12-26 15:06:12 +00:00
Jeff Young fa908e1f98 Dimensions for footprints.
Fixes https://gitlab.com/kicad/code/kicad/issues/8441
2021-12-24 21:10:28 +00:00
Jeff Young 5f37c2b247 Custom rule severities.
ADDED severity token to custom rule syntax.  Each rule can now define
its own severity.

Fixes https://gitlab.com/kicad/code/kicad/issues/6148
2021-12-24 15:42:22 +00:00
Jeff Young 4b6f2f0658 Add mechanical copper clearance testing for shapes.
Also includes going from distance-based neighbor exclusion to angle-
based.  (Distance doesn't work when very short segments are followed
by very long ones.)

Fixes https://gitlab.com/kicad/code/kicad/issues/2512
2021-12-24 11:40:10 +00:00
Jeff Young 4b6bf3095a Radial dimensions.
ADDED radial type dimensions.

Fixes https://gitlab.com/kicad/code/kicad/issues/2056
2021-12-23 19:34:54 +00:00
Jeff Young 0a609dd48d Add footprint library checking to DRC.
Fixes https://gitlab.com/kicad/code/kicad/issues/6821
2021-12-23 19:18:45 +00: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
Wayne Stambaugh 3b16c38756 Coverity issue fixes.
Fix Coverity issues 157138, 338547, and 338716.
2021-09-08 14:51:27 -04: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 d34e9e8946 Code safety. 2021-08-13 21:28:11 +01:00
jean-pierre charras f4a7565b9c fix a compil warning 2021-08-11 08:16:26 +02:00
Jeff Young a208dac8d8 Convert hole clearance tests from NPTH holes to all holes. 2021-08-09 22:26:00 +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
Marek Roszko 10e60acf34 Clean up including of board_design_settings.h 2021-06-06 15:03:42 -04:00
Ian McInerney 4f05262705 Cleanup includes in board.h and footprint.h 2021-06-03 20:19:52 +01: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
Marek Roszko 03cf2b517f Enum class PAD_ATTR_T
Renamed such that python stays the same
2021-05-01 10:51:54 -04:00
Jeff Young b65b1f8e9c Revert NPTH commit, and add some comments. 2021-04-26 17:33:49 +01:00
Jeff Young e3eacafbcb Run hole clearance tests on NPTH pads, but not copper clearance.
Fixes https://gitlab.com/kicad/code/kicad/issues/8295
2021-04-25 17:55:43 +01:00
Jeff Young 2cde76a191 Don't do any hole clearance testing within a single footprint.
Fixes https://gitlab.com/kicad/code/kicad/issues/8141
2021-04-11 16:03:16 +01:00
Jeff Young 3450610977 Add ability to allow thermal vias to be implemented as pads.
This is mostly just for CADSTAR.  Since we don't (yet) have general
purpose footprint attributes, this reuses the "net tie" hack.

Fixes https://gitlab.com/kicad/code/kicad/issues/8141
2021-04-09 14:02:13 +01:00
Jeff Young 6d6765cdaf Improve DRC status reporting.
1) Don't report on tests not run.
2) Don't cancel subsequent tests because the current test didn't
have any constraints
3) Exit a little bit quicker when cancelled

Fixes https://gitlab.com/kicad/code/kicad/issues/7724
2021-02-27 13:44:45 +00:00
Jeff Young 4ede4e061e More DRC performance work.
Push DRC zone RTrees into BOARD so that they can also be used by
insideArea.

All these caches are a bit of an encapsulation leak, but they make a
significant impact on performance.

Fixes https://gitlab.com/kicad/code/kicad/issues/7720
2021-02-27 11:45:04 +00:00
Jeff Young d523129929 Minor performance improvements.
Fixes https://gitlab.com/kicad/code/kicad/issues/7720
2021-02-26 17:58:08 +00:00
Jeff Young 6272b48481 Make sure layer gets passed in to rules evaluation. 2021-02-08 14:53:49 +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
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
Jeff Young 33aa6edb01 Don't run clearance tests on unflashed NPTH pad layers. 2021-01-04 00:03:21 +00:00
Jeff Young 018c17399d SNR. 2021-01-01 23:17:49 +00: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