Commit Graph

58 Commits

Author SHA1 Message Date
Jeff Young d9a77e6a64 Add DRCEpsilon to net-tie-exclusion testing.
Fixes https://gitlab.com/kicad/code/kicad/issues/14008
2023-02-24 12:44:55 +00:00
Jeff Young 295ef6588d Fix uninitialized variable. 2022-12-05 14:42:05 +00:00
Jeff Young 64a6fc0fd4 Push UNITS_PROVIDER down into a low-level mixin.
This allows us to also construct cheap UNIT_PROVIDERs for specific
tasks when necessary.
2022-09-19 17:10:59 +01:00
Marek Roszko 3d5913c825 Remove convert_to_biu.h, merge contents to base_units.h 2022-09-16 21:09:28 -04:00
Seth Hillbrand 06786c34d7 Blacklist hashes for 2d integer elements
The hash table for integer hashes is extremely limited and places most
elements in the same buckets.  This leads to a linear search time for
structures built on this.

This blocks hashes, directing the coder to utilize std::set or std::map
structures instead of hash tables for implementing integer-based
lookups.
2022-08-26 08:43:37 -07:00
Jeff Young 46df421064 ADDED defined pad groups for net-tie footprints
Each pad group is allowed to short nets with other pads in its group.

Legacy footprints with the "net tie" keyword hack will get a single
group auto-created with all the footprint's pads in it.

DRC and the router now allow a track to collide with copper graphic items
while entering a net-tie pad as long as the closest point in the collision
is within the pad.

DRC (and the footprint checker) now check for copper items in the
footprint shorting pads which are not in the same pad group.

Fixes https://gitlab.com/kicad/code/kicad/issues/2265
2022-08-19 18:54:20 +01:00
Jeff Young 1f347582f8 Introduce new marker type so we can track DRC errors on the drawing sheet.
Fixes https://gitlab.com/kicad/code/kicad/issues/12221
2022-08-15 18:03:03 +01:00
Jeff Young 0304ad4494 Move connection width testing to rule system.
Also copies connection width progress reporting architecture over to
the sliver checker.
2022-08-01 13:09:51 +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
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 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 50a4d610a6 Be cognizant of flashed layers when generating pad shapes. 2022-02-11 13:10:52 +00:00
Jeff Young 21790fcab7 Fix a pair of dereference-freed-pointers in DRC.
Fixes https://gitlab.com/kicad/code/kicad/issues/10335
2022-01-10 21:06:03 +00:00
Marek Roszko c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -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 b7e196b710 ADDED assertion constraints for user-defined DRC checks. 2021-12-24 16:13:18 +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 32721755bf Hook up zone-pad connections to custom rules.
ADDED zone_connection constraint.
ADDED thermal_relief_gap and thermal_spoke_width constraints.

ADDED angle override for thermal relief spokes in Pad Properties.

Fixes https://gitlab.com/kicad/code/kicad/issues/4067
2021-12-23 22:30:26 +00: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
Wayne Stambaugh 8fd83cbb95 Pass wxPoint objects by reference instead of on the stack. 2021-07-26 15:35:33 -04:00
Jon Evans 65531accf6 DRC: allow testing against particular diff pair membership 2021-02-27 19:54:55 -05:00
Jeff Young a3b9e8ddb4 Round 2 of Worksheet -> Drawing Sheet. 2021-02-23 11:57:44 +00:00
Jeff Young cad5198ab7 Worksheet -> (industry standard) Drawing Sheet. 2021-02-22 17:35:46 +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
Marek Roszko 9d0b16e814 bool/int type safety 2021-01-31 19:54:32 -05:00
Jeff Young 3fd128a75b Performance enhancements. 2021-01-08 00:46:55 +00:00
Jeff Young 018c17399d SNR. 2021-01-01 23:17:49 +00:00
Jeff Young 7bd31d5237 Naming conventions. 2020-11-14 18:26:03 +00:00
Jeff Young f7333ad64a Update some classnames including archaic zone names. 2020-11-12 10:31:25 +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 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
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
Jeff Young eea7957e16 Inform user of bad DRC rules when filling zones.
ADDED: facility for hypertext links in infobar.

Also made use of this for via constraint errors when routing.

Fixes https://gitlab.com/kicad/code/kicad/issues/5800
2020-10-16 12:44:20 +01:00
Jeff Young fdeb340d21 Defensive code against missing nets.
Also adds net re-parenting code to Repair Board.

Fixes https://gitlab.com/kicad/code/kicad/issues/5935
2020-10-10 16:54:19 +01:00
Tomasz Wlostowski 5c2c66dd07 drc: sane default rules for via diameters/diff pair widths/diff pair gaps (required by the P&S) 2020-10-09 00:01:26 +02:00
Tomasz Wlostowski 8a7fc7e970 drc: more robust segment pair detection, still issues with approximated arc corners though... 2020-10-07 16:36:37 +02:00
Tomasz Wlostowski b215361b30 drc: default constraints for silk2pad, silk2silk 2020-09-27 16:45:46 +02:00
Tomasz Wlostowski 6578a76b72 drc: first R-tree based test (silk to pad clearance) 2020-09-27 16:45:46 +02:00
Jeff Young 6dae769944 Progress reporting for connectivity tests.
Also makes via annulus terminology more consistent.
2020-09-23 16:28:00 +01: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 7b2a111a1c Implicit rules go first so that other rules will take priority.
Fixes https://gitlab.com/kicad/code/kicad/issues/5687
2020-09-17 20:13:39 +01:00
Jeff Young 2b43ffd12d Better error reporting; better nullptr safety.
Also clears the marker lists before running a DRC, and sets
the drcRun flags afterwards so that the notebook tab counts
get updated.

Fixes https://gitlab.com/kicad/code/kicad/issues/5659
2020-09-16 22:14:41 +01:00
Jeff Young ce3819abf8 Remove redundant clearances from DRC dialog. Fold progress bar in. 2020-09-16 16:06:29 +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
Jeff Young d47d119d5f Compile layer test into CONSTRAINT_WITH_CONDITIONS.
Also processes constraints in correct order for priority (reversed)
and removes multiple-expression-conditions for a single constraint
(which is not supported in the grammar).
2020-09-13 17:08:24 +01:00