← Back to team overview

kicad-developers team mailing list archive

Re: PCB Layer Stackup UI


jean-pierre.charras@... wrote:
Wayne Stambaugh a écrit :

Dick Hollenbeck wrote:

** the first copper layer is number 0 but has a special name
'front', in

addition to any name the user gives it.

Is we are talking about layer numbering in files, we can use keywords instead of numbers
like in Gencad format (see export_gencad.cpp)
layer identification use TOP, BOTTOM, INNER1, INNER2, SOLDERPASTE_TOP ...
and no numbers.

See below. 'front', 'back' are allowed in LAYERSETs. I see no problem numbering internal copper layers. The copper layer numbers are indices into the the array of copper layer definitions which will be early in the new board file format.

We are not vulnerable to any problems with copper layer numbers, since we are now comfortable with the new layering number direction. The first copper layer is 0, and 'front' is a special token for layer number 0. Your 40th copper layer would be layer number 39.

Your back layer would be either <copper_layer_count>-1 or 'back'.

In pads, there would be a LAYERSET data structure. LAYERSET is a data hiding mechanism with a number fast set inclusion tests, such as IsOnLayer( int aLayer ), IsOnFront(void), IsOnBack(void). Inside LAYERSET and also in the BOARD, there would be bitmaps for set management. I envision 'back' being associated with an index somewhere near 49 for the time being. And I would code the technical layers from 50 to 63, so we can use a 64 bit layer mask internally. None of this is actually exposed in a way where you have to worry about board formats again. When you output a simple layer number for the back layer, outside the context of a LAYERSET, you can simply report the layer number, whatever it is, or you could report 'back'.

BTW, I don't like 'top' and 'bottom'. Specctra uses front and back and I want to stick with that.

And I think all tokens should be lowercase. There will be user defined strings such as board text and copper layer names which will have upper case characters, but these will typically be quoted.

All tokens should be lowercase IMO, and only lower case. I see no reason for any exceptions.


Follow ups