← Back to team overview

kicad-developers team mailing list archive

Re: Layer ID enums

 

I would keep the enum values the same for the board layers. The GAL layer
enum values would have to change. I would just move them all to be in one
enum, and set a high starting value for the GAL layers. That way, there is
only one structure and its easy to add layers that are needed for specific
applications, and there are guaranteed to be no conflicts between layer
enum values.

-Jon

On Mar 12, 2017 14:06, "Wayne Stambaugh" <stambaughw@xxxxxxxxx> wrote:

> I cannot speak about the GAL enums but I can tell you that if you muck
> up the legacy layer enums, you will almost surely break loading really
> old board files.  I would proceed with extreme caution here.
>
> On 3/12/2017 12:25 PM, Jon Evans wrote:
> > Hi,
> >
> > Can anyone explain if there is a reason why the layer definition enums
> > are done in the way they are?
> >
> > Using multiple enums for the "normal" layers and the GAL extra layers is
> > complicating the code, especially now that I am using the GAL layers for
> > GerbView, and also working on a color theme manager that will be shared
> > across applications.
> >
> > It would make more sense to me if there was a single large enum that
> > contained all possible layers, with some offset somewhere to separate
> > the "drawing" layers from the "GAL item" layers. This would simplify
> > code that needs to refer to layer IDs across multiple applications.
> >
> > Would anyone be opposed to this?
> >
> > -Jon
> >
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
> >
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References