More higher layer support

155 views
Skip to first unread message

Liang Jia

unread,
Feb 22, 2023, 2:18:46 AM2/22/23
to KiCad Developers
Hi Dear KiCAD Group,

We want to use KiCAD for our products, but we found one limitation which block us.
The max copper layer is 32 now. but our products need more than 50 layers.
I searched the group, there are not related information, so I start this conversation.

I have two questions?
1. Why there is only 32 layers in KiCAD?
2. If we want to adapt the code of KiCAD to support more higher layer,
     Is it possible?
     Which point we should take care?

Sincerely
Liang

Stefan Weber

unread,
Feb 22, 2023, 5:05:59 AM2/22/23
to KiCad Developers, lantian...@gmail.com
Hi Liang,

There is already a wishlist's gitlab ticket for this


You might give a thumbs up there ;-)

And BTW. 50 copper layer, really?
I am curious what are you designing?


> KiCad is capable of creating printed circuit boards with up to 32 copper layers,
> 14 technical layers (silkscreen, solder mask, component adhesive, solder paste, etc), and 13 general-purpose drawing layers.

So when you don't need 50 copper layer, there might be already enough layers ;-)

Best regards,
Stefan

Liang Jia

unread,
Feb 22, 2023, 9:47:41 PM2/22/23
to Stefan Weber, KiCad Developers
Hi Stefan,

Thanks for your reply.
Our products are for chip tests.

I already know the limitation for KiCAD and this ticket.

I want to know if I try to add more layer support in KiCAD, which part of the source code should I pay attention to? bitset for LSET?

SIncerely
Liang

Wayne Stambaugh

unread,
Feb 23, 2023, 11:45:47 AM2/23/23
to dev...@kicad.org

Hi Liang,

The LSET object is merely where it's possible to add new layers but doing so will not be helpful and possibly harmful if you don't understand how layers work internally.  Virtually every object on boards and footprints has to understand what the layers mean in order for them to work properly and the tools used to create and edit them.  This doesn't include all of the DRC and UI changes that would have to be updated for the layer changes.  I don't see this feature request being done by anyone without years of experience with the KiCad code base.  It is a major undertaking.  It's on the development team's list of new features but it's not one that is requested very often (there are just not that many users that require more than 32 copper layers) so it may not make it into version 8.

Cheers,

Wayne

--
You received this message because you are subscribed to the Google Groups "KiCad Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to devlist+u...@kicad.org.
To view this discussion on the web visit https://groups.google.com/a/kicad.org/d/msgid/devlist/CAE0Ak8aJeP3F%2BbPgkJveQR_BThu2F%3D-T9kh63UnLBi5fti7DxQ%40mail.gmail.com.

Liang Jia

unread,
Feb 26, 2023, 10:15:35 PM2/26/23
to dev...@kicad.org
Hi Wayne,

Thanks for your email.
I did some changes in kicad source code with the below source files, it mainly focuses on some copy/paste.
After a simple check, my code seems to work that adding more 34 copper layers in KiCAD.

Could you please kindly check if those files are enough?
image.png

Sincerely
Liang

Wayne Stambaugh

unread,
Feb 28, 2023, 1:56:25 PM2/28/23
to dev...@kicad.org

Hi Liang,

I would be surprised if the this was all the files that needed to be updated in order to add more copper layers.  Without actually seeing your changes, it's impossible for me to know for sure.  I don't see any DRC source file changes and it appears that you didn't change the file version both of which seem to point to an incomplete implementation.  Also, if you are going to maintain your own fork of KiCad, please change the "generator" token in the board file format to something other than "pcbnew".  This way if someone attempts to file a bug against your changes, we will immediately know that the files did not come from KiCad.

I'm curious what your trying to accomplish here.  If you are intending to merge your changes back into KiCad, you need to be working closely with the KiCad lead development team.  Making large change sets to KiCad without coordinating with the KiCad lead developers rarely leads to the outcome that new developers expect.  One thing I should caution you on is that the lead development team is planning on allowing any number of copper or user layers instead of just increasing the current count of those layers.  This is fundamentally a much larger project because it will require significant internal changes virtually all of the PCB code.

If you are interested in contributing to the KiCad project, I recommend that you take a look at the Contributing to KICad web page.

Cheers,

Wayne

Liang Jia

unread,
Feb 28, 2023, 8:46:27 PM2/28/23
to dev...@kicad.org
Hi Wayne,

Got it, thanks for your email.
You can find my patch from attachment, I added 64 layers copper support for KiCAD.
Please give me more advise for how to adapt it more completely.
I will check your points: DRC, "generator" toke, file version(what does this meaning?)

At first, I want to maintain my own fork of KiCad, because there no any progress or plan for below ticket.

Yes, when I tried to modify the code to support more layers, I found there are lots of fixed define for layer related code.
If we plan on allowing any number of copper in recently, I will consider to join KiCad team and make some contribution.

Sincerely
Liang

patch.txt

Wayne Stambaugh

unread,
Mar 1, 2023, 11:51:54 AM3/1/23
to dev...@kicad.org

Hi Liang,

I don't have time right now to look over your patch given it's size.  It's far easier to other developers to review changes using GitLab's interface rather than applying your patch directly (which may not apply cleanly given the changes in both the master and 7.0 branches) and reviewing them.  You should push your 64 layer branch to your private GitLab repo and publish the link to it so other developers can pull from that branch to review and test your changes.  It will also make your life easier if at some point in the future you choose to submit a merge request to the KiCad project.

The board file version definitions are kept in https://gitlab.com/kicad/code/kicad/-/blob/master/pcbnew/plugins/kicad/pcb_plugin.h  They are defined as the date the file format changed using the YYYYMMDD format.

The board file plugin header formatting for changing the generator name is here https://gitlab.com/kicad/code/kicad/-/blob/master/pcbnew/plugins/kicad/pcb_plugin.cpp#L300

I hope this helps.

Wayne

Liang Jia

unread,
Mar 3, 2023, 2:59:00 AM3/3/23
to dev...@kicad.org
Hi Wayne,

Got it, thanks for your support. I will try to move my changeset into gitlab if the time is available.
Have a nice day.

Sincerely
Liang


Reply all
Reply to author
Forward
0 new messages