[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:30 -0400, DJ Delorie wrote:
> Try this board:
>
> http://www.delorie.com/pcb/m3a/board.pcb
>
> It has multiple layers per group, despite being only two sided.
That rendered funny (top via colours) until I "fiddled" with the layer
groups somehow.. looking at the resulting diff:
-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")
Are both valid?
Seemingly my GL rendering code can tell the difference. Any ideas why
the sequence would be different before / after the edit?
I'm assuming that I'm doing something dumb about testing which layer is
the "top" / "bottom". For 3D view, pads are drawn on every layer - but
on the top / bottom, they are drawn in the expected pad / backside
colour. The code to detect is something like this:
(Diff from when I added this "feature"):
@@ -1053,7 +1053,16 @@ SetPVColor_inlayer (PinTypePtr Pin, LayerTypePtr Layer, i
else if (TEST_FLAG (FOUNDFLAG, Pin))
color = PCB->ConnectedColor;
else
- color = Layer->Color;
+ {
+ int component = GetLayerGroupNumberByNumber (max_layer + COMPONENT_LAYER)
+ int solder = GetLayerGroupNumberByNumber (max_layer + SOLDER_LAYER);
+
+ if (Layer == LAYER_PTR (component) || Layer == LAYER_PTR (solder))
+ color = (SWAP_IDENT == (Layer == LAYER_PTR (solder)))
+ ? PCB->ViaColor : PCB->InvisibleObjectsColor;
+ else
+ color = Layer->Color;
+ }
gui->set_color (Output.fgGC, color);
}
Looks suspiciously like I'm muddling layer _groups_ and layer _numbers_
again, doesn't it...
I guess I need to identify whether the geiven layer "Layer" is a member
of the component or solder _group_.
Best wishes,
Peter C.
>
> _______________________________________________
> geda-user mailing list
> geda-user@xxxxxxxxxxxxxx
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user