1774 Commits

Author SHA1 Message Date
Mark Roszko
5895c27f4a Rename Prj() on schematic to avoid conflict with global function 2025-08-07 23:21:41 -04:00
Seth Hillbrand
d8a99ea38f ADDED: New ERC test for mis-match GND pins
If you have a pin with a label containing the letters "GND" in it and it
is not connected to a net with a label also containing "GND" AND there
is another pin on your symbol that _is_ connected to a net containing
"GND", then there is a likelihood that you have accidentally mixed up
your connections to the GND pin
2025-08-07 15:42:56 -07:00
Seth Hillbrand
1a8dac9296 Have Find dialog update its cache on board mod
We don't want to find stale references

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21445
2025-08-06 16:37:03 -07:00
Andrzej Wolski
c73d555fe2 ADDED: Lasso selection in pcbnew
Adds a lasso or freeform selection tool to KiCad in addition to standard
rectangular selection.  Adds supporting HitTest routines

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/1977
2025-08-06 16:06:40 -07:00
JamesJCode
b87a050bd8 Use full start / end copper layer heights in length calculations
Previously we halved the start / end copper layer heights, which is
not in line with how other EDA tools behave. This was also inconsistent
with adding pad-to-die lengths as we did not add back in the missing
half.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21365
2025-08-06 20:30:13 +01:00
jean-pierre charras
d7cf008397 Try to fix a QA test. 2025-08-06 16:20:55 +02:00
Seth Hillbrand
29eee9f126 Refactor grid_helper to allow testing
Make view and tool manager optional so that we can implement QA on the
actual snapping
2025-08-05 16:10:17 -07:00
Seth Hillbrand
dd889ddac9 Add Tesselation QA tests 2025-08-04 22:20:42 -07:00
Seth Hillbrand
321b5793a2 Add some QA tests
Created basic tests for:
- Notification Manager
- Clipboard
- File history
- Filename Resolver
- Hotkey store
- Collector
- Reporters
2025-08-04 11:36:43 -07:00
Seth Hillbrand
43a9c760b1 Add some QA tests for FILE_HISTORY, SEARCH_PATH and FILENAME_RESOLVER 2025-08-04 09:59:30 -07:00
Seth Hillbrand
50c7aff3ff Simplify KiROUND using std::llround/clamp
Removes the bespoke rounding in favor of std::llround and std::clamp
routines
2025-08-04 09:26:25 -07:00
Seth Hillbrand
4aa2047f45 Replace alg::delete and alg::delete_if with std c++20 2025-08-04 09:03:16 -07:00
Seth Hillbrand
bf16dcfbe8 Make all windows remember their preferences
Hook into DIALOG_SHIM to remember stylistic preferences for windows such
as position, size, sash position, notebook selection, etc.

Dialogs and controls can opt out of this by setting a client data user
property "persist" to false.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19992

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10756

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21108
2025-08-03 20:22:30 -07:00
Seth Hillbrand
11d0bb466b ADDED: PROPERTY_HOLDER class
Useful for attaching arbitrary properties to userdata
2025-08-03 20:22:30 -07:00
Seth Hillbrand
52f8bf83f6 Remove threading from connection vec update
At most, we will have 4 items.  Or maybe a few more with stacked pins.
But not enough to thread.  The overhead of starting threads and using
mutexes is greater than any savings
2025-08-03 09:18:54 -07:00
jean-pierre charras
82ea895ed9 Fix qa test compil issue due to my previous (e1c56c71) commit 2025-08-03 17:10:29 +02:00
Seth Hillbrand
b21e3e45d9 Extract generic item connectivity update and add QA 2025-08-03 08:09:01 -07:00
Seth Hillbrand
15ca4b1ba2 Extract symbol connectivity routine and add QA 2025-08-03 08:09:01 -07:00
Seth Hillbrand
7102b2d5e5 Clarify some driver sorting logic and add addl QA 2025-08-03 06:46:28 -07:00
Seth Hillbrand
1a25f07c76 Add QA for connection graph resolve drivers 2025-08-02 20:38:54 -07:00
Mark Roszko
4b70e20250 Add support for check zones before plot to plot jobsets 2025-07-30 20:49:07 -04:00
Seth Hillbrand
66f37beff7 Move canvas selection to common
Makes all canvases obey the same rendering parameter.  Also keeps the
canvas selection with the anti-alias selection, which makes logical
sense.  Reduce the antialias selection to a single choice rather than
two different choices for different canvases
2025-07-27 20:22:59 -07:00
Seth Hillbrand
6b44c4cbae update qa config to new data 2025-07-26 15:58:08 -07:00
Seth Hillbrand
15166a9f14 Refactor REFDES_TRACKER
Keep state for reuse in the class.  This allows us to properly pick the
value when fully reannotating

Don't annotate when placing new units.  Just step ahead in the unit
value while keeping the refdes number constant.  This eliminates the
jumping around to unplaced units when placing new multi-unit symbols

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21378
2025-07-25 16:16:09 -07:00
Seth Hillbrand
094870e7a4 String fixes
- Clarify wording in a couple places
- Fix missing 'not' and remove non-standard dashes
- Standardize on single-quote for strings in strings
2025-07-23 17:36:51 -07:00
Seth Hillbrand
e387953490 ADDED refdes tracker
Provide an option to track ever reference designator ever used in the
project to prevent its reuse even if the component has been removed

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13052
2025-07-23 14:28:33 -07:00
Seth Hillbrand
2aeecec9bd Remove Creepage generation from reporting
Recalculating creepeage every time we reported a new clearance error was
unneccesarily complex.  Since the clearance errors are always straight
lines, we just need to calculate the closest approach and present that
segment
2025-07-21 14:10:34 -07:00
Seth Hillbrand
4c03ab8ebb Finally remove other_math routines
Replace with standard SEG and VECTOR2 alternatives.  Add QA test for
additional SEG-line intersection routine
2025-07-21 11:03:17 -07:00
Seth Hillbrand
0459c54a92 Cleanup and clarify SEG::intersect and SEG::Collide
Fix handling of end point intersection case
Fix degenerate handling
Fix overflow cases
Simplify logic in SEG::Collide
Remove overly simplistic check for intersection

Add multiple QA regression tests
2025-07-21 11:03:17 -07:00
Seth Hillbrand
3a06de0076 Consolidate ERC label warnings
If global or local labels are floating -> error
If global or local labels are only connected to one pin -> warning

Rather than forcing two different errors depending on whether the label
is local or global
2025-07-18 16:47:25 -07:00
Jeff Young
a7e2878e6b Kicad SEXPR should no longer need LOCALE_IO. 2025-07-14 13:17:53 +01:00
Jeff Young
68d4940087 Thread-safety (potentially KICAD-VMX...)
... KICAD-6PV, KICAD-82, KICAD-R3A, and others.
2025-07-13 15:25:10 +01:00
jean-pierre charras
67aaac48e7 Fix a compil and a Coverity warning 2025-07-12 18:27:19 +02:00
Mark Roszko
1ab8a5944b Add tiny test for IsCopperLayerLowerThan 2025-07-06 11:10:39 -04:00
Jeff Young
044ac6e8e5 Prefer board's errorMax to a constant. 2025-06-27 22:59:12 -06:00
Christopher Alexander
f4b1a15cd8 fix for issue 17429 - fixes DRC unconnected items exclusion instability 2025-06-25 17:03:35 +00:00
jean-pierre charras
ea12df80be make board area colored (from Ethan Chien) 2025-06-19 18:26:39 +02:00
Jon Evans
9b72e30a0b QA: Store SVGs, not PNGs
Different platforms/versions can result in very slight differences
when converting SVGs to PNGs for diffing them.

(cherry picked from commit 8b80853ad7269460a68b20ed9f2a0fd33a8cfef8)
2025-06-14 17:16:25 -04:00
Jeff Young
18e107529a Don't force callers of GetAppSettings to implement exception processing. 2025-06-14 20:25:59 +01:00
Mark Roszko
1922cab5f4 Kill the near-global spread of length_delay_calculation.h 2025-06-14 13:32:18 -04:00
John Beard
d15b2b7305 SHAPE_ARC: Fix GetCentralAngle normalization documentation
This appears to have always been [-360 .. 360], as some tests in
test_shape_arc.cpp have had negative values for a very long time.

Add tests on the start, end and central angle accessors to enforce
the documented normalizations.
2025-06-08 09:55:54 +08:00
John Beard
026eb2512d QA Arc: update 'bad midpoint' test case after fix (2124f2b846) 2025-06-08 09:55:54 +08:00
Marek Roszko
4ada004bb4 Add some checkpoints to qa_pcbnew 2025-06-07 15:02:52 -04:00
Jeff Young
d81e9e6cd1 Code cleanup.
A placement-area is a rule-area sub-type.  We don't
need to say rule-area-placement each time.

Also removes some dead code, and simplifies some
damage-propagation logic.
2025-06-07 17:44:00 +01:00
Marek Roszko
f6c305cea6 Allow QA to create new SCHEMATIC instances rather than reusing a single container
Why make cleanup complicated lol
2025-06-07 10:38:43 -04:00
Seth Hillbrand
ed67d37480 If we can't load the KiCad, don't crash
We already fail the test, so just continue instead of segfaulting the qa
2025-06-05 11:40:47 -07:00
Marek Roszko
fa687289bf Fix qa and make SCHEMATIC::Reset safe on null projects 2025-06-01 21:04:58 -04:00
Jeff Young
a3c9454221 Tighten up footprint c'tor and copy c'tor.
Several fields weren't being initialized; several
other fields weren't being copied.
2025-05-31 22:14:09 +01:00
John Beard
98efdaea5e QA Arc: add a test of SHAPE_ARC start/mid/end construction
Also add an expected-failure for an arc where a bad midpoint
should be corrected or rejected by the SHAPE_ARC constructor

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/21035
2025-05-31 19:30:23 +08:00
John Beard
1ad03f5717 QA: Fix angle-equality predicate
This was sometimes accepting a wrong value on the "other side" of
the correct value. Only actually affected one test, which is fixed.
2025-05-31 19:29:02 +08:00