I started with four layers, two external layers with traces and two inner layers for grounds. I want to add two layers between the two internal ground layers. KiCAD insists on adding them between the bottom ground layer and the bottom external layer.
I tried Edit→Swap Layers. I never used it before, but it seems pretty straightforward: Press the ellipsis button next to each layer you want to swap and enter the name of the layer you want to swap int with. Well, that didn’t work.
I googled around and in another forum somebody claimed that swapping essentially swaps the contents of the layers, not their names and then you can change their names in the Design Rules→Layers Setup menu. That was no good either, because the contents of the layers were not swapped in the first place.
Any ideas? Thanks in advance. Here is the information about my KiCAD, running on Ubuntu 16.04.3:
Application: kicad
Version: 4.0.7-e2-6376~58~ubuntu16.04.1 release build
wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1009,GCC 5.4.0,wx containers,compatible with 2.8)
Platform: Linux 4.13.0-37-generic x86_64, 64 bit, Little endian, wxGTK
Boost version: 1.58.0
Curl version: libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_WXPYTHON=ON
USE_FP_LIB_TABLE=HARD_CODED_ON
BUILD_GITHUB_PLUGIN=ON
Warning. This is purely guesswork. Always back up stuff before trying anyhow.
The files are text based. You might just open the file and see if you can change things there. It might at least be worth opening the file and looking.
@hermit: Thank you. I hacked the kicad_pcb file with vim and it seems to be working. However, I don’t have any blind/buried vias. The hack was actually quite simple. For the benefit of everybody, here is the beginning of the ‘layers’ section before the hack:
Initially, the board did not have any PWR* layers at positions 3 and 4; those were added later from the layer management menu. Got in with the editor and changed the order of layers 2, 3, and 4 above (put ‘GND2.Cu’ in layer 4, and bumped up layers “PWR[1-2].Cu”, accordingly, like the RPN stack of an HP calculator). It worked!!!
Why bother having a menu item—which I don’t think worked here—for something that simple? The developers can spend their precious scarce time on other things. Now, this board did not have any blind/buried vias, so I don’t know how this simple hack would have worked then, but I suspect it should have worked. However, a DRC should be done to check for blind/buried vias getting into the way of traces after the layer swap.
So, KiCAD comes with 32 layers total. Not all of them are used. The layers menu merely activates the selected ones and names them. I wonder, then, can KiCAD be hacked to have more than 32 copper layers maximum?
I’m glad that worked out for you. I didn’t have time to try it myself so I didn’t know how much work would be involved. Thanks for letting us know how it turned out.
Nice idea, but I think layers 0-31 are hard coded as copper, and >=32 are technical. It might be related to using a 64 bit int as a bitmask, I’m not sure.
”IIRC in the Wayne’s FOSDEM talk someone from the audience said they have sixty something. Must be rare.
Yes, I saw that! My question about >32 layers was mostly theoretical. I don’t foresee any such need for myself any time soon (I mostly use 4-8 layers), but it was the sweet taste of the my hack above that got me thinking…