Commit Graph

52 Commits

Author SHA1 Message Date
Jeff Young 6927e75eae Handle keepout areas with holes.
Fixes https://gitlab.com/kicad/code/kicad/issues/12581
2022-10-06 15:08:56 +01:00
Jeff Young e49de68a59 Implement a more durable zone bounding box caching strategy.
Fixes https://gitlab.com/kicad/code/kicad/issues/10821
2022-10-01 22:10:43 +01:00
Seth Hillbrand 26a1114e3c Avoid Yields when the results are ready
We always need to check for calculation results before yielding the
system otherwise we will delay outcomes

Fixes https://gitlab.com/kicad/code/kicad/issues/12228
2022-09-14 13:30:04 -07:00
Jeff Young b4492e0bd2 More EDA_RECE yeetage. 2022-08-31 17:19:50 +01:00
Jeff Young 667a54ad86 Retire insideArea in favour of intersectsArea and enclosedByArea. 2022-08-28 18:02:41 +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 7556d7152f Fix errant return and improve progress reporting. 2022-08-01 13:09:51 +01:00
Jeff Young 2de10080cd Add edge and margin clearances to message panel. 2022-07-15 16:14:32 +01:00
Seth Hillbrand 03c279ffd4 ADDED: Threadpool
Thread pools are long-lasting executors that have close to zero overhead
when launching new jobs.  This is advantageous over creating new threads
as we can use this for threading smalling jobs and smaller quanta.  It
also avoids the heuristics needed to determine the optimal number of
threads to spawn
2022-06-24 22:59:24 +00: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 5e80e2a421 58f553a9ca requires that cache be layer-sensitive.
Fixes https://gitlab.com/kicad/code/kicad/issues/11814
2022-06-15 00:30:11 +01:00
Wayne Stambaugh 150859c973 Try Coverity fixes that don't break unit tests. 2022-03-25 16:49:29 -04:00
Wayne Stambaugh 7da7864f5e Fix some Coverity issues. 2022-03-25 15:51:05 -04:00
Jeff Young cf611f1742 Better safety around layersets. 2022-03-21 18:19:00 +00:00
Jeff Young 65185f53a1 Rotate fp zones before comparing with library versions.
Also includes some performance fixes to not copy around triangulation
data when it's not needed.

Fixes https://gitlab.com/kicad/code/kicad/issues/10143
2022-03-14 15:53:24 +00:00
Jeff Young 6f555b6258 wxT() and some cleanup in DRC. 2022-03-11 23:19:16 +00:00
Wayne Stambaugh eec528ae48 Fix GCC build error on Linux. 2022-03-11 17:03:01 -05: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 1fc99dd2c0 Don't call GetLayer() on a multi-layer object. 2022-03-05 23:07:43 +00:00
Jeff Young e09ecd8380 Don't ask for layer of multi-layer objects. 2022-02-18 13:20:36 +00:00
Jeff Young 5739505aa3 TextBoxes for PCBNew. 2022-01-31 20:00:47 +00: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 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
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
Jeff Young 5f22025611 Don't drop text on Edge.Cuts when plotting.
While -our- user model is that Edge.Cuts is just for edges, it's best
not to dictate a particular model to users.

ADDED a DRC error when text (or a dimension) appears on the Edge.Cuts
layer.

Fixes https://gitlab.com/kicad/code/kicad/issues/8470
2021-05-24 19:54:52 +01:00
Jeff Young 47145d349b Don't run insideArea on ruleAreas.
Fixes https://gitlab.com/kicad/code/kicad/issues/7826
2021-03-07 17:55:30 +00: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 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 018c17399d SNR. 2021-01-01 23:17:49 +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 4634802a58 Formatting. 2020-12-04 19:29:04 +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 ae9afdd169 SNR. (Mostly for progammers, but a little for user messages.) 2020-11-02 16:20:00 +00:00
Jeff Young 9ff49277e1 Add implicit rule generation for keepout areas.
Also implements collision detection for SHAPE_POLY_SET.

Fixes https://gitlab.com/kicad/code/kicad/issues/6105
2020-10-22 10:41:21 +01:00
Seth Hillbrand 4085757aeb Remove beginning/ending spaces in translations
Adding space padding makes translations more difficult by increasing
string counts
2020-10-20 12:08:04 -07:00
Jeff Young 67b5d24995 Support ESC & Cancel for DRC.
Fixes https://gitlab.com/kicad/code/kicad/issues/5698
2020-09-18 22:14:00 +01:00
Jeff Young a3d65a2b43 Smoother progress reporting for DRC checks.
Also moves Messages tab out to an overlay, and restores the longer
messages now that messages are no longer a textbox in the upper right.
2020-09-17 20:13:39 +01:00
Jeff Young e2e229da96 Finish exorcising the old DRC system.
This moves the various BOARD_ITEM calls to the new system, and make
the DRC_ENGINE long-lived so that it can field those queries.
2020-09-15 20:15:46 +01:00
Jeff Young 665212341d Cleanup (consistent naming, 100-char line width, message precision). 2020-09-15 12:07:31 +01:00
Jeff Young 514da2f886 Move DRC dialog to new DRC engine. 2020-09-14 22:39:36 +01:00
Jeff Young 748bee1bc7 Hook up netclasses and board minimums to new DRC engine.
Improves implicit rule reporting.
Makes some internal names more consistent.
Moves DRC_REPORT to the test framework.
Removes priority (which isn't supported in the grammar)
2020-09-13 17:08:24 +01:00