sleemanj / gerb2etch Goto Github PK
View Code? Open in Web Editor NEWBash script to convert gerber (and drill) files into a PDF containing artwork suitable for DIY PCB etching.
License: MIT License
Bash script to convert gerber (and drill) files into a PDF containing artwork suitable for DIY PCB etching.
License: MIT License
Hi @sleemanj
I was wondering, is there a way to have multiple copies of the same images on a particular page, in other words to have 2 x copies of the copper bottom on page 1, 2 copies of bottom mask on page 2 etc. The reason I am asking is that I typically need to overlay at least 2 transparencies on top of each other to get the artwork dark enough for reliable exposure.
-lekrom
I'm not sure if this is already do-able, but would it be possible to add an option to be able to rotate the boards 90 degrees in the output?
My reasoning: I'm printing to 8.5 x 11" transparency sheets, and would like to try & save as much material as possible. If I have a 'tall' pcb, it would help if I could 'force the image on its side' in the final output. By doing this, I'd be able to use less of the transparency sheet's surface area, using more of its width at the top than it's length, and save a larger portion of the sheet for future use (not sure if that makes sense).
kicad produces drill files with comment lines that begin with semi-colons (see attached drill file).
Any 'weird/unexpected' characters in the comments section will cause the script to spew errors.
here's an example:
LINE: TF.CreationDate,2021-02-20T17:09:14-08:00
(standard_in) 100: syntax error
(standard_in) 100: illegal character: :
(standard_in) 100: syntax error
(standard_in) 100: illegal character: :
(standard_in) 100: illegal character: :
(standard_in) 100: syntax error
I'm guessing a possible solution would be to simply skip over / 'continue' on any lines that begin w/ a semi-colon?
Hey, nice script!
We have been working on a JS module to identify Gerber layers by common file names called whats-that-gerber. This was split out from the pcb-stackup project at some point.
It could save the user from having to worry too much about the layer names. The downside is the user needs to install NodeJS and the script needs to be downloaded somehow or included in the source here.
Hi, I'm getting this error when running the script.
gerb2etch -u copper
Resolution: 600 (dpi)
Padding: 1 (mm)
Border: 0.25 (mm)
Separation: 30.4 (mm)
Rotate: Off
Negative Output: copper
Artwork To Create: copper top bottom
Mask all through holes minimum: 1.3 mm
Creating Artworks
Creating PDF
(standard_in) 90: parse error
/sw/bin/gerb2etch: line 695: [: -gt: unary operator expected
(standard_in) 91: parse error
/sw/bin/gerb2etch: line 715: [: -gt: unary operator expected
Tiling 2 x 3 per page.
Creating page 1...
mv: rename out/page-1.pdf to artwork.pdf: No such file or directory
Done
Any ideas?
Darwin 192-168-1-1.tpgi.com.au 15.3.0 Darwin Kernel Version 15.3.0: Thu Dec 10 18:40:58 PST 2015; root:xnu-3248.30.4~1/RELEASE_X86_64 x86_64
Hi @sleemanj
Firstly, great work on this, truly epic...
Secondly, Full disclosure, I am a bit of a linux noob, so I may be be asking silly questions...
I have a slight issue, My gerber plots come out great (.png files).
No pdf gets created though althoug your scrips appears to try to do so..
Here is the output:
Creating PDF
Tiling 2 x 1 per page.
Creating page 1...
Creating page 2...
Creating page 3...
mv: cannot stat 'out/page-*.pdf': No such file or directory
Notice: Multiple PDF documents created, see page-X.pdf ...
Am I doing something wrong?
Regards,
Lekrom
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.