← Back to team overview

kicad-developers team mailing list archive

Re: GAL layers

 

On Fri, Nov 01, 2013 at 03:28:03PM +0100, Maciej Sumiński wrote:
> Seems quite interesting. As far I understand - you have already introduced
> the changes? If yes - may I have a look at them?
> I was also considering using classes for storing layers information (name,
> visiblity, rendering order, always-on-top, etc), but for the time being I
> would rather not introduce too many changes to the used model.

Working on it, but tracking the ints and determining the 'right' type to
use is not the fastest thing to do :D also to get all the warning you
need to get the -O level high and the C++ compiler speed is not
helping:P

> Generally, it was done on purpose. As you already know - some of items had

I imagine that was done on purpose:D however looking at the type system
these are quite different things. In fact often looking at a variable
`aLayer' the question is: it's a pcb layer or a GAL layer? In
common/view there should be only GAL layer, while, for example, in the
router they are mostly (if not all) PCB layers (copper layers,
actually!) which are only a subset of the GAL ones. Sadly you can't
inherit an enum from another one...

> Nope, there is no trick - thanks for spotting this, you are quite watchful.
> Good that it works, but it should be ITEM_GAL_LAYER(GP_OVERLAY), soon to be
> changed.

Probably it got allocated on some via layer which is usually always
enabled... I'd expect to find the interactive routing 'disappear'
disabling it, so it's not an exactly easy to spot bug.

And by the way the compiler spotted it, once types became separated.

-- 
Lorenzo Marcantonio
Logos Srl


References