[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: pcb flip-sides



On Thu, 2009-10-29 at 20:54 -0400, DJ Delorie wrote:
> > -Groups("7,8,c,1,3,4:2,5,6,9,10,s")
> > +Groups("1,3,4,7,8,c:2,5,6,9,10,s")
> 
> These are semantically the same.
> 
> > I guess I need to identify whether the geiven layer "Layer" is a member
> > of the component or solder _group_.
> 
> Right, see the png stuff again.  Given a layer, you need to determine
> which group it's in, and compare those.  Or, if you're iterating
> groups, precalculate if you're in the solder/component group and just
> remember that.

Got it, thanks for all your help..

I presume this line in move.c is incorrect:


  if (GetLayerGroupNumberByNumber (MAX_LAYER + SOLDER_LAYER) ==
      GetLayerGroupNumberByPointer (Destination))

(somewhat confusingly.. should be "max_layer", rather than "MAX_LAYER" -
or at least, that seems to be the usage everywhere else).

I'm not sure the implications of the bug, so I'll stash a fix locally in
my branch - and figure it out before pushing to git HEAD.

Comments as to whether this is correct (and what effect to look out for
to reproduce any manifestation of the bug) would be appreciated.

A quick grep also reveals:

grep MAX_LAYER * -R | grep COMPONENT
hid/batch/batch.c:  cg = GetLayerGroupNumberByNumber (MAX_LAYER + COMPONENT_LAYER);
pcjc2@pcjc2lap:~/pcbsrc/git/src$ grep MAX_LAYER * -R | grep SOLDER
hid/batch/batch.c:  sg = GetLayerGroupNumberByNumber (MAX_LAYER + SOLDER_LAYER);
move.c:  if (GetLayerGroupNumberByNumber (MAX_LAYER + SOLDER_LAYER) ==

These also wrong?
(Or the 88 case which use max_layer + ....) ?

Best wishes,

Peter C.




_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user