X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7+dev X-Exmh-Isig-CompType: repl X-Exmh-Isig-Folder: inbox From: "karl AT aspodata DOT se [via geda-user AT delorie DOT com]" To: geda-user AT delorie DOT com Subject: Re: [geda-user] PCB silk layer image script In-reply-to: <6b291694-f248-aa27-aa38-732ad42096d6@linetec.nl> References: <6877754c-dcb7-db34-dd39-419de060ad7a AT linetec DOT nl> <20231001134334 DOT D3643862293F AT turkos DOT aspodata DOT se> <20231001191307 DOT 88D638622949 AT turkos DOT aspodata DOT se> <6b291694-f248-aa27-aa38-732ad42096d6 AT linetec DOT nl> Comments: In-reply-to "Richard Rasker (rasker AT linetec DOT nl) [via geda-user AT delorie DOT com]" message dated "Sun, 01 Oct 2023 22:54:15 +0200." Mime-Version: 1.0 Content-Type: text/plain Message-Id: <20231001223527.808FC8622949@turkos.aspodata.se> Date: Mon, 2 Oct 2023 00:35:27 +0200 (CEST) X-Virus-Scanned: ClamAV using ClamSMTP Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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