18500 Commits

Author SHA1 Message Date
jean-pierre charras
cac3a140cc Pcbnew, plot F&B Fab: ensure the DNP mark is plotted only on the right layer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20458

(cherry picked from commit 99e65afa1f61083e7400e7e226209435a81b7b41)
2025-03-26 16:30:22 +01:00
jean-pierre charras
c7f1d0a0ff Pcbnew, performance fix: rebuild the pad view only when mandatory.
The LAYER_PAD_HOLEWALLS shape needs a rebuild only when the zoom level changes.
So keep trace of the last GAL zoom level to rebuild the shape, and only rebuild
the view when needed

(cherry picked from commit 3e51b2c647e44bb313345bf978dee40c4c39b525)
(and from commit 3dfd164e2b50167c02536f064ec4b1f3464a0087)
2025-03-26 15:14:05 +01:00
Tomasz Wlostowski
56c05869dd router: don't try to lock the first vertex of a zero-vertex line. Might crash (sometimes).
Fixes https://gitlab.com/kicad/code/kicad/issues/20440

(cherry picked from commit 5f620f0fa1a1f3ad44f0d1a26ac3f7aea596d28a)
2025-03-26 07:47:56 -04:00
Jon Evans
bd3cc02b18 Mark pad as dirty when changing layerset
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20435


(cherry picked from commit 8921824128b8408b76c4b9194e6fcf01f0350188)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2025-03-23 20:10:07 -04:00
Seth Hillbrand
e1436d3597 Fix inheritance for git_common
Avoids repo type pointer issues when casting from void

(cherry picked from commit 676dd4ceec4dc3d3e0c921c93147561f03915683)
2025-03-16 18:04:47 -07:00
Seth Hillbrand
6104651613 Adjust git handling
- Utilize scoped deletion for individual git_*_free() calls
- Protect against multiple usage when updating icons
- Reduce frequency of git update calls

(cherry picked from commit 26c331a83704bcc1f221e67fe6757a07dc9e920b)
2025-03-16 18:03:16 -07:00
Jon Evans
6768e34e0e Use UI order for drill report stackup
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20069


(cherry picked from commit 77747aa41e6f08e0ccd3fcbe5d52de304459375d)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2025-03-16 11:13:37 -04:00
Seth Hillbrand
572fcdfa22 Update fp properties even when can't update fp
When updating the footprint, we may encounter a missing footprint.  We
should still modify the netlist against the existing footprint (if one
does exist) to match the netlist.  This matches the behavior of updating
the netlist when fp are not selected for update

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

(cherry picked from commit 72411af9de07e159845e22a322759ed134ce0159)
2025-03-14 16:51:26 -07:00
Eric
234994bf53 ODB++:Fix date format in misc/info file
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20103

(cherry picked from commit 92cdca69b33acb90287da2a5c61dd213a6162821)
2025-03-14 16:51:18 -07:00
jean-pierre charras
cf118f142c plot mask layers: do not skip mask on track when solder mask min web is not 0
When solder mask min web is not 0, PlotSolderMaskLayer() uses GenerateLayerPoly(),
that skipped tracks (not updated since tracks can be on a mask layer)

(cherry picked from commit 7f1b412203e73a4275c8aa9a389926451e1e2171)
2025-03-14 16:10:31 +01:00
Jeff Young
be0c8c88e5 Don't modify selection in the middle of a move/drag.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20239
2025-03-14 14:52:04 +00:00
Jeff Young
de953b0fdb Refresh preview after rotate/flip/mirror during move.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19561

(cherry picked from commit 3c32f4d31d98791d0eb96681dc945b73bb18f008)
2025-03-14 14:52:04 +00:00
Jeff Young
31b65a241f Don't report non-meeting line-pairs.
We're called on each line pair, so a rect would otherwise
always report to failures for the two pairs of opposite
sides.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20326
2025-03-13 16:30:48 +00:00
Alex Shvartzkop
2bf369793c Fix Eagle PCB layers handling after v9 layer changes. 2025-03-13 17:48:29 +03:00
Jeff Young
ff578d9866 De-duplicate table border drawing code.
Also cleans up a misconception about table header borders,
and renames the getter/setter to be clearer.

Also makes sure that table cells are updated when the table
layer changes.

And another bug where we were writing the grey color value
back to the cell for hidden cells.
2025-03-13 13:08:30 +00:00
Seth Hillbrand
7cb85e2dd1 Correct layerset calls
The Board layerset (because BOARD is a BOARD_ITEM) should return the
layers that the board contains instead of just the F.Cu.  This assigns
the common function to map to the board-specific functions

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

(cherry picked from commit 96794e94e3fd233481f162fbebb3f18798afbf86)
2025-03-12 11:49:11 -07:00
Seth Hillbrand
34906f0871 Be sure to clear hit cache
When re-running the DRC creepage check, we need to ensure that the
element-element hittest set is cleared to report the same errors again

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

(cherry picked from commit 1c245ad01eb0b5b2f72360741559e0bb9e948803)
2025-03-12 11:49:08 -07:00
Jeff Young
9e98bb68d7 Add textOnEdgeCuts to global DRC items list.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20308

(cherry picked from commit 6df9c90440c25e0e0eed1e16bda0522e9559b1d1)
2025-03-12 11:32:12 +00:00
jean-pierre charras
bcb8c2097c BOARD::BulkRemoveStaleTeardrops(): fix bug that prevent removing a teardrop.
When a teardrop is the first zone (or the only one) in list (i.e. last tested)
it was ignored, and therefore not removed.

(cherry picked from commit ccc396a6c24e3339adff804db64ffedf327aeb70)
2025-03-12 09:51:38 +01:00
Jeff Young
3446dbbf27 Apply Damjan's rotated table fixes to PCB_TABLE::GetEffectiveShape().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20143

(cherry picked from commit b7ef57a97d378c183fda177074086dde165fb986)
2025-03-11 20:17:47 +00:00
Jeff Young
aee836d722 Don't disable first internal layer in footprint editor.
It's used as a proxy for all internal layers.

Also fixes LAYER_RANGE_ITERATOR so that it works with an odd
number of copper layers.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20246
2025-03-11 18:41:35 +00:00
Jeff Young
631c5ec01d Tables support for router.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20295

(cherry picked from commit 567da3de911040b2f563b89d770be94e65925e10)
2025-03-11 16:39:59 +00:00
Jeff Young
d92f42cdcb Check parent footprint as well for component class.
Also output more descriptive text when checking inherited
rules on parent footprint.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20281
2025-03-11 16:39:59 +00:00
Tomasz Wlostowski
a4893523e4 router: simplify post-walkaround lines 2025-03-11 13:40:14 +01:00
Tomasz Wlostowski
4dc0a31071 multichannel: possible fix for ghosting footprints when using grouping
(cherry picked from commit c05cc345f3326aa6f01c21fadc5466d2ae9494fe)
2025-03-11 13:40:14 +01:00
Tomasz Wlostowski
c65a1139cb connectivity: treat empty FPIDs as matching in TOPO_MATCH
(cherry picked from commit b1bf5127fa21d5b5c794378531d8640658a46632)
2025-03-11 13:40:14 +01:00
Tomasz Wlostowski
71aae415a4 connectivity: TOPO_MATCH now orders reference components by the lowest matching candidate count.
This heuristic seems to make the algorithm reject non-isomorphic mappings much earlier on and converges faster on a solution for typical circuits.

(cherry picked from commit 8192ba73d97d1909649d2b21da3cfb1a230ab90d)
2025-03-11 13:40:14 +01:00
Tomasz Wlostowski
7061b64319 connectivity: TOPO_MATCH now prioritizes component candidates by the ratio of matching pad nets.
This improves cloning of circuits with numerous of matching component mappings (e.g. LED matrices) by
taking preference for mappings with same order of net connections.

(cherry picked from commit 91ee987cfebce4478442adeac6906f57d3a9f424)
2025-03-11 13:40:14 +01:00
Tomasz Wlostowski
03da07767d router: refine the endpoint moving logic so that it doesn't block shoving
(cherry picked from commit b4d29a98f97b7bbee1284617803e63c164acb6aa)
2025-03-11 13:40:14 +01:00
Tomasz Wlostowski
f3c5b21b1b router: fix regression in post-shove optimization
Note to self: we keep track of the formerly pushed vias in the line stack, but pruning one from the optimizer queue should not prune the lines attached to it.

(cherry picked from commit 78fc95fd6df04e61a2eb2982d2eabc7451458cf8)
2025-03-11 13:40:14 +01:00
Tomasz Wlostowski
69eb81196d router: prevent assertion fail in MULTI_DRAGGER
Fixes https://gitlab.com/kicad/code/kicad/issues/20075

(cherry picked from commit 9e4947ed36659b443af078d48fda2ca2b5f4a89c)
2025-03-11 13:40:14 +01:00
Tomasz Wlostowski
f23b06de27 router: prevent disconencting via fanout traces when shoving
Note to self: move-endpoints fallback mode must check for vias connected at the obstacle LINE's ends - fallback is only applicable for unconnected ends.

(cherry picked from commit 29a4ec0fde1fc3b978a43b3bbd32f1da9e787f81)
2025-03-11 13:40:14 +01:00
Tomasz Wlostowski
badaac9366 router: improved shove litter fix
Note to self: managing the shove stack is quite challenging and there were a few corner cases
where reverse via/segment collisions would cause a head segment (or a via) to have multiple clones in the stack.
As SHOVE::removeHeads() took only complete head lines, sometimes it resulted with stray vias/segments.

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

(cherry picked from commit bfbdfcf872bfcbca5431f5429807425268492ac8)
2025-03-11 13:40:14 +01:00
Jon Evans
215c3fdf77 Switch to operator= for item updates
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20206


(cherry picked from commit d0b22d21bb27f680941a52ca25c1bde683107c30)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2025-03-10 19:19:55 -04:00
Jeff Young
02b756189b Formatting.
(cherry picked from commit e163c40e54603b85b61abdd67365f5ce15733fc3)
2025-03-09 18:18:32 +00:00
Jeff Young
d2af56597e DRC for tables. (And some fixes for dimensions.)
(cherry picked from commit a468c486eb47e4dbff52d812da19cf4ad0a88f49)
2025-03-09 18:18:32 +00:00
Jeff Young
f862eea1b9 Group members are still children of the board (not
the group).

(cherry picked from commit 4b38932129c129ffaf3a2e842318314edb1c4310)
2025-03-09 18:18:32 +00:00
JamesJCode
a69d6a129a Mirror netclass DRC expression semantics for component classes
With this change, "A.Component_Class == 'SOME_CLASS'" will return
true if either SOME_CLASS exists in the list of component classes
attached o the footprint, or if SOME_CLASS is the full component
class name.

(cherry picked from commit 85e6978aa271528952427812bbc404d2341c4ff6)
2025-03-08 22:20:55 +00:00
jean-pierre charras
34458cf738 Pcbnew: remove dead code.
The export SVG dialog was removed some time ago (merged with plot svg).
But some settings of this removed dialogs were not removed.

(cherry picked from commit 9a1cf81ca655374cbeee031a7e41d8200826b91d)
2025-03-08 13:35:15 +01:00
jean-pierre charras
809948333e Fix compil warnings
(cherry picked from commit 9d1b320896db66a13de468415bd6ebc08bbd6d38)
2025-03-08 09:42:15 +01:00
Seth Hillbrand
1a6160b132 Removed shared_ptr circular references
When A references B and B references A, the shared pointer reference
count will never go to zero by just removing the parent container.  We
need to explicitly clear the shared pointer references when we are done

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

(cherry picked from commit 641e06e67c4358283eb35de7ffa269246e01d1a2)
2025-03-07 17:31:32 -08:00
JamesJCode
51f588b55b Check for constituent netclasses in DRC netclass equality checks
This reverts previous behaviour whereby 'A.Netclass == x' compared
the full name of an effective netclass (e.g. 'Class1,Default'). This
was found to be unexpected behaviour to users, who were expecting
the equality to compare single netclasses. The equality check now
first checks for a constituent class with the given name, and then
falls back to a check of the full class name.

Inequality requires the netclass name being tested to not be a
constituent netclass and to not be the full class name.

(cherry picked from commit f0e287a87b070c29d7467b911d1280ebdabaefe6)
2025-03-07 23:57:13 +00:00
Damjan
b3ba8d78b5 pcbnew: table rotation: table jumps if rotation ends at 180°
(cherry picked from commit bded181ad084653605e672f8e903a336148e155d)
2025-03-07 20:39:59 +00:00
Jeff Young
11df4b32eb Fix merge mess-up.
(cherry picked from commit 727fc9bd064e9349bd01501e210eb55e6b0207f9)
2025-03-07 19:00:46 +00:00
Jeff Young
1de9a83ff0 Printing is not zoom-specific.
(Some of these items don't currently get printed, but
there's no sense in leaving a latent bug around in case
we ever change our minds.)

(cherry picked from commit 877c6bce8938e9ca6e3d3c6381a5dd5d9acfb9a4)
2025-03-07 19:00:10 +00:00
JamesJCode
ed5ec0f749 Don't dereference null COMPONENT_CLASS in testFootprintSelector
This can happen when running standalone, where component classes
have not been resolved.

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

(cherry picked from commit 54540f9e827968a35ab44aef79e3d005ece8c916)
2025-03-06 21:45:38 +00:00
Wayne Stambaugh
04733511fc Use case insensitive comparison in symbol footprint filter match DRC.
This keeps the DRC test in line with the ERC test which is also case
insensitive.

(cherry picked from commit a1b78d170decaec8e17cd930d9eef9158a436b4f)
2025-03-06 15:42:03 -05:00
JamesJCode
1414e90ce9 Fix Specctra export for multiple netclasses
(cherry picked from commit 57952a7a8639e637a10e2c1cc557b104c0d2d513)
2025-03-06 20:25:58 +00:00
Seth Hillbrand
5c492429be Printing should never hide small elements
Since it is effectively infinite resolution, pass the vectors to the
printer and let it decide if there should be a dot there or not.  Hiding
based on perspective is a screen optimization

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

(cherry picked from commit 8e048d0c42a85add48470c3eb0ad6acbaf3ab283)
2025-03-06 12:18:57 -08:00
Jeff Young
6aa274bc0d Formatting.
(cherry picked from commit 52648497b2c226a31cb15e6d259dbdeba258933f)
2025-03-06 16:15:23 +00:00