Close
0%
0%

GerberRender

Renders gerber files into png image(s) that represent what the PCB will look like in real life.

Public Chat
Similar projects worth following
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.org website and its constant down time. This is just a simple script that can be ran in the command line to generate the images.

Sample Output that generated the two project photos:

[user@machine:~/Project]$ gerbrend -l Boards/pHAndORPV1-0/Gerber/ -i BuildPictures/BoardRenders/ph-orp-front.png -j BuildPictures/BoardRenders/ph-orp-back.png
Outline file:           Boards/pHAndORPV1-0/Gerber/pH-ORP-Card-Edge.Cuts.gm1
Drill file:             Boards/pHAndORPV1-0/Gerber/pH-ORP-Card.drl
Front copper file:      Boards/pHAndORPV1-0/Gerber/pH-ORP-Card-F.Cu.gtl
Front solder mask file: Boards/pHAndORPV1-0/Gerber/pH-ORP-Card-F.Mask.gts
Front silk screen file: Boards/pHAndORPV1-0/Gerber/pH-ORP-Card-F.SilkS.gto
Back copper file:       Boards/pHAndORPV1-0/Gerber/pH-ORP-Card-B.Cu.gbl
Back solder mask file:  Boards/pHAndORPV1-0/Gerber/pH-ORP-Card-B.Mask.gbs
Back silk screen file:  Boards/pHAndORPV1-0/Gerber/pH-ORP-Card-B.SilkS.gbo
Rendering front outline layer...Converting colors...Done!
Rendering front copper layer...Converting colors...Done!
Rendering front solder mask layer...Converting colors...Done!
Rendering front silk screen layer...Converting colors...Done!
Combining front layers...Done!
Rendering back outline layer...Converting colors...Done!
Rendering back copper layer...Converting colors...Done!
Rendering back solder mask layer...Converting colors...Done!
Rendering back silk screen layer...Converting colors...Done!
Combining back layers...Done!

  • 1
    Install dependencies
    sudo apt install gerbv imagemagick 
  • 2
    Clone the git repository
    git clone https://github.com/brandtks/GerberRender.git 
  • 3
    Start rendering gerbers with gerbrend

    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.

    Options

    • -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 front image

    Gerber Extensions

    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.*

View all 3 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates