← Back to team overview

kicad-developers team mailing list archive

Re: PCB Layer Stackup UI


--- Dick Hollenbeck wrote:
> Dick Hollenbeck wrote:
> >> One idea to put on the table is an actual layer stack up
> >> sequence, which would be a modifiable data structure which
> >> defines the order of layers within a board. The current notion
> >> of layer mask would stay, it's just that a person could not
> >> assume that a layer with a mask of (1<<0) is next to a layer
> >> with a mask of (1<<1) unless the layer stackup sequence says it
> >> is.
> >>
> >
> > Jean-Pierre,
> >
> > I rarely settle on the first idea, so here is another one to put
> > on the table. We make the BACK layer mask dynamic, not fixed.
> > Its value would depend on the copper layer count. If the copper
> > layer count is 2, then the BACK mask would be (1<<1), and the
> > FRONT mask would be (1<<0). For a four layer board the back mask
> > would be (1<<3), etc.
> >
> > Mask
> > Bit# Layer#
> > 0 0 Front
> > :
> > :
> > N N Back
> >
> >
> > Advantage: no dynamic stackup sequence, but does have the dynamic
> > single BACK mask. The order of the bits in the mask set would be
> > reversed. I do not think this one is hard to implement, the
> > drawing code would simply walk the mask in reverse from what it
> > is now, starting at position GetCopperLayerCount()-1. We could
> > fix existing board files at time of first load, once and for ever
> > after.
> >
> > Eventually we can go to a 64 bit mask and expand the number of
> > copper layers quite easily, using a datatype of uint64_t.
> >
> > For a single layer board, the notion of back or front is moot,
> > because the user can name the layer anything he wants. 
> Oops, I guess this is not a true statement since text is reversed,
> but maybe a 'side' flag in this case is needed, or we make this
> kind of boards simply have two sides, with one side being empty.
> All boards actually have two sides anyways if you think about it.
> > For a single layer board 
> > the layer mask would always be (1<<0)
> >
> >
> > Dick

Another suggestion for contemplating is the possibility of providing a new line within each PCB file of a nature such as:

LAYER_SEQUENCE = Component_to_Copper

The presence of such a line would imply that layer 0 is the Component layerand that layer 15 is the Copper layer, and that layer 1 is the closest internal layer to the Component layer, etc.

OTOH, the absence of such a line (or the presence of an alternative line such as "LAYER_SEQUENCE = Copper_to_Component" ?) would imply that layer 0 is the Copper layer and that layer 15 is the Component layer, and that layer 1 is the closest internal layer to the Copper layer, etc.

In the case of the latter, the inference to be drawn (by the software) is that the PCB file had previously been saved using an earlier version of KiCad, so on "reading (subsequent) data in", the layer property of each object should be updated as appropriate. (E.g. an object previously on layer 0 is subsequently "mapped" to layer 15, and vice versa; objects on internal copper layers are re-mapped depending upon the total count of "enabled" copper layers; etc.)

I fully applaud your efforts to "re-sequence" the layers within KiCad; as far as I am concerned, if there was just one thing in KiCad which I could change, it would be the original sequence of layers.

If this suggestion were to be adopted, I would also advocate "re-sequencing" the non-copper layers as well, e.g. the Silkscreen layer for the Component side of the PCB should come before the Silkscreen layer for the Copper side of the PCB, etc.


Follow ups