Mail Archives: geda-user/2023/10/01/18:36:50
Richard Rasker:
...
> When I use pcb instead of pcbfill, two things are different:
>
> - The result now ends up at the bottom left of Layer 1 named 'poly'
> instead of Layer 10 named 'silk' -- which usually means it is on the top
> copper layer.
To be uptodate, the pcb line should be something like:
Layer(5, "top silk", "silk)
To have the logo in cupper is probably not useful, but why not.
> - Polygons now have one co-ordinate per line.
...
Pcb files is like c source files, pcb treat newlines as a space,
so it is fine to have them one per line or all on one line.
> >>> I can help with a program doing that if you wish.
> >> That would be nice, although I should of course try and figure it out
> >> for myself first. I see that the resulting PCB file features large
> >> polygons, so if changing the size beforehand is not possible, I'd say
> >> the logical approach would be to find the lowest Y value (the topmost
> >> polygon point), and subtract this value from all Y values - [...]
...
> From what I see, Y co-ordinates can
> be located using the " [0-9]+" regex (so including a leading space),
> starting from line 6 in the pcb logo file; the lowest value found should
> then be subtracted from all Y values, effectively moving the logo to the
> top left. Then the highest X and Y values should be determined, which
> then define the overall pcb size.
Yes, about so.
$ head -10 < TestLogo.pcb
PCB["" 850000 1100000]
Grid[1000.000000 0 0 0]
Layer(1 "poly")
(
Polygon("clearpoly")
(
[2304472 -3448985]
[2303472 -3445930]
$
So for output like that, it suffices to identify the [x-value y-value]
lines.
Regards,
/Karl Hammar
- Raw text -