43 Commits

Author SHA1 Message Date
Jeff Young
9d6928043f Don't format strings if we're not going to report them. 2025-06-09 20:09:24 +01:00
JamesJCode
eb17ebee4e Implement time-domain length tuning
- Adds time and delay units
- Adds time domain tuning parameters entry and storage
- Adds pad-to-die delay property
- Adds time domain parameter interface for length / delay calculations
- Adds unit tracking for numerical constants through LIBEVAL
   - Will need future work to truly propagate through binary expressions
- Adds time domain tuning to meander placers
- Adds time delay display to net inspector panel
- Modifies DRC to handle time domain constraints
2025-04-17 21:46:56 +01:00
Jeff Young
0a4533703c Performance. 2025-03-24 10:28:41 +00:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
JamesJCode
3800bae281 Enforce thread safety in clearance and creepage checks
Previously, these checks injected a custom handler to add graphic
objects to a DRC marker. This was not thread-safe and was causing
non-deterministic crashes. The DRC reporting methods now accept
a customer handler which is called on the newly created
PCB_MARKER within the commit context. This defaults to nullptr
for DRC checks which do not require graphics or other additional
processing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19282
2024-12-23 18:10:47 +00:00
Daniel Treffenstädt
5e3c9334cc ADDED: DRC Checks for connected track angles
This MR adds a new DRC Test provider for the angle between two connected Track segments.

Rule example:

(rule test_track_angle (constraint track_angle (min 135)) (severity error) )
2024-10-16 19:16:42 +00:00
Fabien Corona
f258cc5164 DRC creepage 2024-10-15 18:04:51 +00:00
Jeff Young
aa4107ce2d Code cleanup (and Coverity quieting). 2024-01-04 14:35:08 +00:00
Jeff Young
c1f01877a8 Improve length calculation for vias.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10690
2023-10-28 13:14:21 +01:00
Seth Hillbrand
f4afd7e363 Thread testTrackClearances
We are frequently testing thousands of track segments.  They can each be
uniquely tested in parallel with reporting and marking guarded by
mutexes.  This speeds up the DRC tests substantially

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15466
2023-09-20 19:51:33 -07:00
jean-pierre charras
d4cf063e40 Fix a few more doxygen errors (no actual code change) 2023-04-19 20:24:42 +02:00
jean-pierre charras
7545097d7f Fix a compil issue on msys2/gcc12.2, due to changes in commit dd1c58dc 2023-04-16 15:28:34 +02:00
Marek Roszko
dd1c58dcf5 Fix MSVC C4840 warning
va_start requires trivially copy able classes.

wxString is not trivial. The correct thing to do is to use wxChar*
2023-04-16 07:36:41 -04:00
Jeff Young
11dc5424cb Pull interactive courtyard checker out of move tool to share with router.
Fixes https://gitlab.com/kicad/code/kicad/issues/12594
2022-10-14 00:48:37 +01:00
Jeff Young
098e96f1c7 Use more precise formatting in DRC messages when less precise values are identical.
Fixes https://gitlab.com/kicad/code/kicad/issues/12587
2022-10-06 22:18:53 +01: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
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
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
89e61ff73b More performance enhancements for DRC. 2022-03-12 14:17:52 +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
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
4ba3937f8a Cleanup. 2021-12-24 15:43:24 +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
0a609dd48d Add footprint library checking to DRC.
Fixes https://gitlab.com/kicad/code/kicad/issues/6821
2021-12-23 19:18:45 +00:00
Wayne Stambaugh
8fd83cbb95 Pass wxPoint objects by reference instead of on the stack. 2021-07-26 15:35:33 -04: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
Jeff Young
7bd31d5237 Naming conventions. 2020-11-14 18:26:03 +00:00
Jeff Young
84dd5108ba Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
Jeff Young
d5addb692c Move a bunch of DRC tests to RTrees. 2020-10-31 15:45:41 +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
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
Tomasz Wlostowski
5ef1dc17ad drc: ignore silk2pad/silk2silk violations for hidden text objects 2020-10-02 21:06:52 +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
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
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
5d9301d394 Adjust isErrorLimitExceeded so it can be used for severity==IGNORE. 2020-09-13 17:08:24 +01:00
Jeff Young
ce2937a399 Move rest of DRC tests to kicad. 2020-09-11 23:14:12 +01:00
Jeff Young
cc86630f11 Start pulling new DRC engine into Kicad. 2020-09-11 16:04:11 +01:00
Jeff Young
6b4a6f4d3e Restore min seg limit for rounded-corner pads.
It suffered from a cacophony of errors, starting with an errant
comment that made it later look like a bug.  Sigh.
2020-09-11 14:41:45 +01:00