18719 Commits

Author SHA1 Message Date
Jeff Young
f561c05dd5 Fix for new layer arch (copper on even numbers only).
(cherry picked from commit cda127a9a3b9c6cf04266250517aa7d399ec251e)
2025-06-30 13:59:15 -06:00
Jeff Young
53b3c1c082 CHANGED: Use FILTER_COMBOBOX for label names.
Also pushes some of the implementation down a level
so that it can be shared between this and the
SYMBOL_FILTER_COMBOBOX.

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

(cherry picked from commit ee2cf47f23eeca5cfc990ae845e18534fd8c96c4)
2025-06-30 13:58:58 -06:00
Jeff Young
b21ba7c2aa IncrementTimeStamp() lock safety.
Increment is only called once per op, so it's not
overly performance critical.  Better to have the
lock when reading the cache values.

(cherry picked from commit a7a83efc466fa0872e28bf6df13a5b7c73a42f8b)
2025-06-30 12:00:15 -06:00
Jeff Young
632d23c6b0 Uninitialized variable.
(cherry picked from commit 4403c9b62f2d433800b52a845e518112a983c4f3)
2025-06-28 13:57:14 +02:00
Tomasz Wlostowski
d09523728d router: clean up shoved traces after aborting differential pair routing in shove mode
Note: the single-trace placer (LINE_PLACER) has moved to the FIXED_TAIL for tracking the interim placed routes (and reverting them if user pressed backspace). Unfortunately the DIFF_PAIR_PLACER didn't follow. The result was the dummy CommitPlacement() call at the end of aborted routing would commit the last shove state, even if FixRoute() was never called. For longer-term fix: fix ROUTER_TOOL logic to indicated aborted routing to the router/placer (AbortPlacement() is already there). Also implement FIXED_TAIL in diff pair placement mode.
(cherry picked from commit ed6440b782f5293af25c48208ff0f51dbf3299ca)
2025-06-28 13:57:07 +02:00
Tomasz Wlostowski
939659fb58 router: TOPOLOGY::SimplifyLine() should not try to merge segments of differing widths
Note to self: likely a regression after adding aAllowSegmentSizeMismatch parameter (default = true) to AssembleLine(). We need to improve the simplification algorithm to take differing widths into account.

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

(cherry picked from commit 0256ccb6a6c1521c474a38f98e61ea8198a15b6e)
2025-06-28 13:57:02 +02:00
Jeff Young
2ea89e967e Fix uninitialized variable.
(This is potentially #21016.)
2025-06-24 09:44:51 -06:00
dsa-t
90d264e80a router: possible fix for disappearing split-segments
https://gitlab.com/kicad/code/kicad/issues/21019


(cherry picked from commit e274307437344c371cb7f7546dc5a3c09a8b8223)

Co-authored-by: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
2025-06-20 23:08:11 +03:00
Jeff Young
1a59309762 Accept empty "(fp)" statements.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20002

(cherry picked from commit 70dfc9215d5666ec4f66851b382d50bbe961a729)
2025-06-18 12:10:59 +01:00
Jeff Young
b9b6ee41e6 Ensure any mapped layers are enabled.
Also fixes a missing mutex for parallel access to cache
in DRC_TEST_PROVIDER_COPPER_CLEARANCE::testGraphicClearances().

Also simplifies the logic for not show multiple errors.

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

(cherry picked from commit 5e707acbdbdfc53b688fb2fbac27ce4ce0e4c731)
2025-06-18 12:10:59 +01:00
Jon Evans
b1649071e8 Hyperlynx: flip Y-axis coordinates
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18581
2025-06-17 17:43:46 -04:00
jean-pierre charras
addd8d74b5 FP editor: use the footprint datasheet field value if it is not empty.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21149

cherry picked from commit c56d55b3 and fix for 9.0.x branch
2025-06-17 18:31:09 +02:00
Jon Evans
c9668b81c8 API: Don't accidentally copy board's net info 2025-06-16 23:21:50 -04:00
jean-pierre charras
b3c61d2dbc Pcbnew: fix position of rectangles after a Rotate command.
(cherry picked from commit b621e0ccf5573632401c7e3f8d4429e981876948)
2025-06-15 17:50:04 +02:00
Jon Evans
1bc11d0e77 Add prettifier support to ExportFootprint
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21071
2025-06-07 10:18:10 -04:00
Jon Evans
d0453a89bc Restore ability for moves to be async
This is required for the API

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21047
2025-06-07 09:46:50 -04:00
Seth Hillbrand
a5896e231a Don't blindly deref an optional
Since the optional might not have a value (and the wxVariant seems to
equate 0 with an empty string), we should check for the valid optional
first and fallback to 0 if not set

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21081
2025-06-06 13:52:38 -07:00
Seth Hillbrand
846425c638 Force PTH pads to exist on all layers
By definition the PTH will exist on all layers at the moment but some
corner case allowed the NPTH layer set to be saved in the layerset,
after which it was hard to reset

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20980
2025-06-05 17:11:40 -07:00
Seth Hillbrand
15b525852b Split bar check for fp/symbols
(cherry picked from commit fbaf480351f15db5732e775d2dfaa579f65e84c8)
2025-06-05 11:41:18 -07:00
Seth Hillbrand
5eacca8b18 Handle unquoted strings that use the bar '|' character
We use this as part of the standard sexpr now.  But previously, if a
designer used the '|' character as part of a string with no spaces, it
would be entered unquoted into the file, which neccesitates special
handling

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21065
2025-06-04 10:54:06 -07:00
Seth Hillbrand
b2bbee2375 Ensure text ${LAYER} resolves to text not fp layer
We were resolving the footprint variables first for text objects.  This
resulted in always seeing the footprint layer resolution instead of the
text object if the text object was in a footprint.  But this only
happened in the board, not the fp editor.  This harmonizes the display
2025-06-03 10:08:03 -07:00
Marek Roszko
c88ec23177 Fix format string
Because the var is a int and %zu is for size_t
2025-06-03 07:44:47 -04:00
Seth Hillbrand
6988d48250 Fix crash when loading footprints with bezier
We don't have an m_board with design settings, so this can be null and
crash unless we protect it
2025-06-02 17:09:24 -07:00
Wayne Stambaugh
694812b8b3 Fix incorrect board editor text box bitmap button sizes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21050

(cherry picked from commit 473ceb90cc4769a0b5a583ba4eed5ead8f822f27)
2025-06-02 16:00:37 -04:00
Jeff Young
cab050609d ADDED: field options for Update PCB from Schematic
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21021

(cherry picked from commit 4a21da6b27a7f7692751e0d583f5643f87d3638c)
2025-05-31 11:12:47 +01:00
Jeff Young
ee62366607 Remove selection before notifying grid of deletion.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20747

(cherry picked from commit a1cc6403bd611a58e2c1d35ae4d66a5496d71b57)
2025-05-31 11:03:59 +01:00
Jon Evans
0ff77bd332 API: Use net names, not codes, and allow creating new nets
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21027
2025-05-30 22:12:19 -04:00
JamesJCode
580da82c37 Further DRC net class and component class match improvements
- Implements wildcard matching for constituent component classes
- Implements wildcard matching for effective net and component class names

(cherry picked from commit 41601e9c2f6a4c63c01b080ef7f52215883d08e1)
2025-05-29 22:00:40 +01:00
Jeff Young
a92ac0ea99 Restore missing gutter between columns. 2025-05-29 09:23:05 +01:00
Tomasz Wlostowski
fcd8419185 router: make sure we are not committing VIAs with non-unique IDs, fixes random disappearing via issue
Note to self:
LINE_PLACER::FixRoute used to silently reclaim the UID of the transient via (as used by the SHOVE's heads tracking logic).
Depending on the particular sequence of user events (the bug is next to impossible to reproduce on a touchpad), this would
result in freshly placed vias disappearing...

Fixes https://gitlab.com/kicad/code/kicad/issues/20999

(cherry picked from commit c5a4f9e747f2a3801708ad8a90e47d9425d4b32b)
2025-05-28 21:34:12 -04:00
Jeff Young
c4fdf9feeb Fix Scintilla vertical scrolling issue.
(At least on MacOS.  *May* also fix GTK.)

(cherry picked from commit c5947d89012ce55f490e7d4411bd316396627b63)
2025-05-28 19:31:28 +03:00
Jon Evans
52e9cdde99 PNS: Fix early exit from followTrivialPath
Don't mark a segment as visited until the
start of the next loop.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20379
2025-05-26 22:46:51 -04:00
Jon Evans
d1e4b03ec1 API: Add CheckPadstackPresenceOnLayers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20587
2025-05-26 21:46:21 -04:00
Jon Evans
a63758e1e6 API: Add symbol path for footprint instances
See https://gitlab.com/kicad/code/kicad-python/-/issues/37


(cherry picked from commit 4dd39976a345df7f77213c7f48b80d5923c5d8ed)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2025-05-26 18:29:35 -04:00
Jeff Young
d7a0555780 Fix a bunch more bugs in bezier approximation.
(cherry picked from commit e8e7282fe1eed4f2a633fea9c7bdb0e81be53f9b)
2025-05-26 21:44:41 +01:00
Jeff Young
29d0cdb546 Use maxError when converting bezier to polyline.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20312

(cherry picked from commit e44c5a7fcda30137965251edf6e231436e602287)
2025-05-26 21:44:41 +01:00
Jon Evans
81ea108d8c Don't bypass empty visibility recovery due to migration
In some situations, loading a project in 8.0 would wipe the
object visibility settings but the local settings also
require a format migration.  The migrator was adding visibility
for the shapes layer in this situation, bypassing the recovery
from having no objects visible.
2025-05-26 15:19:23 -04:00
JamesJCode
d928a2a0e3 Re-implement wildcard matches for netclass constituents in DRC evaluation
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20955

(cherry picked from commit 7176dbe6dcb4aad5a8fc559962781509c2836924)
2025-05-26 19:49:25 +01:00
Marek Roszko
2bdc7d4872 Fix tuning patterns (generators) not being arrayed properly
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20617
2025-05-23 21:46:51 -04:00
Jeff Young
324f5e1127 Timestamps for altium footprint libs.
(cherry picked from commit afce3eb2d9092fd78a4c58d6247757ef0f99dff9)
2025-05-22 10:20:35 -07:00
Zenn Geeraerts
75a8b35581 Use case insensitivity when loading Altium files
Altium is case insensitive, so our match for internal names should be also

(cherry picked from commit d31eeb5c1ba41536f75a74aa8483478477e75928)
2025-05-22 10:20:35 -07:00
Seth Hillbrand
13442a8f91 Import Altium Projects
Handle Altium project file format

Parse individual schematic files and layout files
Create top-level schematic file
Link imported UUIDs between schematic symbol and footprints based on
refdes
Create KiCad project
Map Altium layout layers between KiCad

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

(cherry picked from commit e81956f292f06719b6984d3a86e7493435f49805)
2025-05-22 10:09:02 -07:00
Seth Hillbrand
de5f65d18e Dijkstra's only works with positive weights
Overlapping limits break the assumptions of the algorithm.  We limit the
weights here to only positive numbers and protect the actual alg should
any sneak past

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

(cherry picked from commit 0c23868ac2f3fd0a5d1d7a845d27af28a33e9ba5)
2025-05-19 17:57:29 -07:00
Alex Shvartzkop
f1738069f9 Slightly optimize creepage DRC.
See https://gitlab.com/kicad/code/kicad/-/issues/20827

(cherry picked from commit 1fe5addafb893386ec9de9bc640bbac80a9b6adb)
2025-05-19 17:57:19 -07:00
Seth Hillbrand
d6607146c4 Fix silk board edge collision case
First, fix the error limit check in drc_test_provider_edge_clearance.
Then, we rotate the final point incorrectly in SHAPE_ARC::Collide (need
negative angle).  We were not checking this result in the QA, so add the
proper tests

(cherry picked from commit 9bedb6eedb8295ea309ff447c48cb53ac028ada5)
2025-05-19 17:49:18 -07:00
Seth Hillbrand
6c09957799 Properly use optional
By dereferencing first, we force a get() on the optional and try to pass
that to a routine that takes an optional parameter.  Just passing the
optional reference protects against accessing an invalid

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20934
2025-05-16 08:53:59 -07:00
Olliver Schinagl
0d88a985b7 export_vrml: Fix 3D model destination timestamp check
Not all hosts have `wxHAS_HUGE_FILES` enabled, which causes us to drop
millisecond resolution accuracy. In some cases, this can cause
race-conditions with externally generated components such as by KiBot
(which generates THT components with color bands on the fly), which runs
so fast, that we fall within a second resolution.

When setting the destination timestamp, there's only two valid options.
Either the destination file exists, and if it does, we use the
destination file's timestamp (current behavior) or it does not exist, in
which case we should use an 'invalid' (null, NaN, whatever).

Calling the constructor sets this up correctly and then only setting the
timestamp if the file exists. Nothing else.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20877
(cherry picked from commit cf3dbfbbe6d2b8b2412ba71c4ea05338c369e568)
2025-05-15 11:30:59 -07:00
Seth Hillbrand
f44157657c Fix how blind/buried vias are handle in IPC356
Code 307 is used for blind/buried vias.  Additionally, the access layer
is represented based on sequential layer numbers and needed to be
adjusted for new layer numbering

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

(cherry picked from commit 4a896f84f50cefe383429df156422e6557993283)
2025-05-14 15:59:36 -07:00
Jeff Young
51b99e8f10 Only report single-file issues in single-file-mode.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20891

(cherry picked from commit 085af8938127d95a48b8fd19611c574def8af504)
2025-05-14 16:31:11 +01:00
Maciej Suminski
84a0f22250 altium: do not reshape NPTH pads to match the holes
Resizing pads affects also their solder mask and solder paste patterns,
admittedly in some unusual footprints.

(cherry picked from commit 5147fd982928b4ea9e6432f5a20f3fccf205ec51)
2025-05-14 16:30:53 +01:00