Gerber Render
Renders gerber files into png image(s) that represent what the front and back of the PCB will look like in real life. Inspired by the gerblook website and its constant down time.
- gerbv Renders the gerber files
- ImageMagick Makes everything pretty
Install the dependencies: sudo apt install gerbv imagemagick
.
Clone the GerberRender repository: git clone https://github.com/brandtks/GerberRender.git
.
GerberRender can be ran by simply running gerbrend [options...]
. Running the command without any options uses the defaults variables to render both the front and back images and searches the local directory for the gerber files to use. Recommend either moving or creating a link to the gerbrend file to somewhere the terminal can find it.
- -F Only render the front gerber files
- -B Only render the back gerber files
- -r Set the final image resolution
- -p Defines the solder mask/PCB color. Can only be green, red, blue, yellow, black, or white
- -w Defines the silk screen color. Can only be black or white
- -c Defines the copper color. Can only be silver and gold
- -l Directory location containing the gerber files
- -x Keep temporary working directory, contains the images for all the intermediate steps
- -o Path to outline gerber file
- -d Path to drill gerber file
- -f Path to front copper gerber file
- -m Path to front solder mask gerber file
- -s Path to front silk screen gerber file
- -b Path to back copper gerber file
- -n Path to back solder mask gerber file
- -t Path to back silk screen gerber file
- -i File name of the final rendered front image
- -j File name of the final rendered back image
The script searches for the different layers based on the following rules:
- Outline *.out, *.oln, *.gm1, *.gbr, *.gml, *.gko, *.gm16, *board.gbr
- Drill *.dri, *.drl, *.drd, *.txt
- Front Copper *.gtl, *.cmp, *.top, *toplayer*.ger, *top*copper.*
- Front Solder Mask *.gts, *.stc, *.smt, *topsoldermask*.ger, *top*unmask.*, *top*mask.*
- Front Silk Screen *.gto, *.sst, *topsilkscreen*.ger, *top*silk.*
- Back Copper *.gbl, *.sol, *.bot, *bottomlayer*.ger, *bottom*copper.*
- Back Solder Mask *.gbs, *.sts, *.smb, *bottomsoldermask*.ger, *bottom*unmask.*, *bottom*mask.*
- Back Silk Screen *.gbo, *.ssb, *bottomsilkscreen*.ger, *bottom*silk.*
GerberRender is released under the terms of the MIT. See LICENSE for details.