Wishlist: Automatically adjust dielectric layer widths when changing layer count
Description
When setting the layer count, KiCad by currently keeps all dielectric layers at a width of 1.51 mm, which results in stupidly thick boards in the 3D viewer for example, if you don't manually adjust weights or forget use the "Adjust Dielectric thickness" button.
When increasing or decreasing the layer count, KiCad should choose sensible default layer widths and set core/prepreg layers according to the standards most manufacturers use by default. In cases where you don't care about the exact stackup, or communicate stackup to the manufacturer separately, this would result in more realistic preview in the 3D viewer for example.
The "Adjust Dielectric thickness" button should also be changed accordingly, so that it assigns sensible core and prepreg layer types and widths by default.
Prototype
I created a prototype for that with some open points. Here's a demonstration video:
Bildschirmaufzeichnung_vom_27.09.2022__11_06_36
TODO:
-
Include mask thickness in calculation -
Ask user before possibly overriding any already user defined values?(Probably no necessary as the user can lock any layers with manually entered values) -
Properly handle locked layer widths, additional dielectric layers, etc. -
Default target board width to old value?
See https://forum.kicad.info/t/4-layer-board-thickness/37724 for discussion
The attached MR also fixes the issue that you can't actually enter the minimum possible PCB thickness it shows you in the dialog.
KiCad Version
Application: KiCad PCB Editor
Version: (6.99.0-3505-g45d6b4a9fc-dirty), debug build
Libraries:
wxWidgets 3.1.5
FreeType 2.12.1
HarfBuzz 4.0.0
FontConfig 2.14.0
Platform: Linux 5.19.7-200.fc36.x86_64 x86_64, 64 bit, Little endian, wxGTK, gnome-xorg, x11
wxWidgets: 3.1.5 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.76.0
OCC: 7.5.0
Curl: 7.82.0
ngspice: 31
Compiler: Clang 14.0.5 with C++ ABI 1002
Build settings:
KICAD_USE_EGL=ON
KICAD_SPICE=ON
KICAD_STDLIB_DEBUG=OFF
KICAD_STDLIB_LIGHT_DEBUG=OFF
KICAD_SANITIZE_ADDRESS=OFF
KICAD_SANITIZE_THREADS=OFF