Using last two evenings I wrote simple C++ program that converts Gerber/Excellon files to GIF (default resolution is 1000 dpi) to look like real PCB - up to 4 layers are supported. As side-effect the program displays image in the window 640x480 (or full-screen in case of DOS compilation). Program uses libgif to write GIF and "unigraf" library to display image - it's working in DOS (OpenWatcom 1.9 is required), Windows and Linux (SDL) and also using of Linux+SVGAlib is also possible. This is build for DOS with examples (just viewer, not converter):
http://nedopc.org/nedopc/files/GRB4DOS.ZIP (169K)
Source code is available on SourceForge:
http://nedopc.cvs.sourceforge.net/viewv ... c/grb2gif/
Results of conversion (from Linux version):
http://nedopc.org/nedopc/16/nedo16v1-top.gif
http://nedopc.org/nedopc/16/nedo16v1-bot.gif
http://nedopc.org/nedopc/16/nedo16v1t-top.gif
http://nedopc.org/nedopc/16/nedo16v1t-bot.gif
http://nedopc.org/nedopc/17/nedo17v1-top.gif
http://nedopc.org/nedopc/17/nedo17v1-bot.gif
[Soft] GPL source code of gerber RS-274X converter to GIF
Moderator: Shaos
-
- Admin
- Posts: 24008
- Joined: 08 Jan 2003 23:22
- Location: Silicon Valley
[Soft] GPL source code of gerber RS-274X converter to GIF
Last edited by Shaos on 05 May 2013 06:41, edited 3 times in total.
Я тут за главного - если что шлите мыло на me собака shaos точка net
-
- Admin
- Posts: 24008
- Joined: 08 Jan 2003 23:22
- Location: Silicon Valley
If you run the program as grb2gif filename it will use a set of gerber files:
filename.ovl - board dimension (Gerber)
filename.top or filename.L1 - top layer (Gerber)
filename.L2 (optional) - middle upper layer (Gerber)
filename.L3 (optional) - middle lower layer (Gerber)
filename.bot or filename.L4 - bottom layer (Gerber)
filename.smt - top solder mask (Gerber)
filename.smb - bottom solder mask (Gerber)
filename.slk - silckscreen (Gerber)
filename.drd - drills (Excellon)
to produce 2 images (1000 dpi):
filename-top.gif - top of the board
filename-bot.gif - bottom of the board
P.S. In case of DOS command should look like this: GRB4DOS filename - and it will just display the images with precision worse than 200 dpi (for performance purposes) and no GIF conversion!
filename.ovl - board dimension (Gerber)
filename.top or filename.L1 - top layer (Gerber)
filename.L2 (optional) - middle upper layer (Gerber)
filename.L3 (optional) - middle lower layer (Gerber)
filename.bot or filename.L4 - bottom layer (Gerber)
filename.smt - top solder mask (Gerber)
filename.smb - bottom solder mask (Gerber)
filename.slk - silckscreen (Gerber)
filename.drd - drills (Excellon)
to produce 2 images (1000 dpi):
filename-top.gif - top of the board
filename-bot.gif - bottom of the board
P.S. In case of DOS command should look like this: GRB4DOS filename - and it will just display the images with precision worse than 200 dpi (for performance purposes) and no GIF conversion!
Я тут за главного - если что шлите мыло на me собака shaos точка net
-
- Admin
- Posts: 24008
- Joined: 08 Jan 2003 23:22
- Location: Silicon Valley
-
- Admin
- Posts: 24008
- Joined: 08 Jan 2003 23:22
- Location: Silicon Valley
Today I wrote a multiplier of gerber/excellon files (250 lines of C-code)
Source code under GPL3 is available on the same place of SourceForge:
http://nedopc.cvs.sourceforge.net/viewv ... c/grb2gif/
Usage: grb_mul filename NX NY
The program takes these list of files:
filename.ovl - board dimension (Gerber)
filename.top or filename.L1 - top layer (Gerber)
filename.L2 (optional) - middle upper layer (Gerber)
filename.L3 (optional) - middle lower layer (Gerber)
filename.bot or filename.L4 - bottom layer (Gerber)
filename.smt - top solder mask (Gerber)
filename.smb - bottom solder mask (Gerber)
filename.slk - top silckscreen (Gerber)
filename.drd - drills (Excellon)
and creates for any existing files from that list multiplied version NX x NY - for example if NX=1 and NY=3 it will create 3 copies one above another with suffix _1x3 (as filename_1x3.top etc.)
Source code under GPL3 is available on the same place of SourceForge:
http://nedopc.cvs.sourceforge.net/viewv ... c/grb2gif/
Usage: grb_mul filename NX NY
The program takes these list of files:
filename.ovl - board dimension (Gerber)
filename.top or filename.L1 - top layer (Gerber)
filename.L2 (optional) - middle upper layer (Gerber)
filename.L3 (optional) - middle lower layer (Gerber)
filename.bot or filename.L4 - bottom layer (Gerber)
filename.smt - top solder mask (Gerber)
filename.smb - bottom solder mask (Gerber)
filename.slk - top silckscreen (Gerber)
filename.drd - drills (Excellon)
and creates for any existing files from that list multiplied version NX x NY - for example if NX=1 and NY=3 it will create 3 copies one above another with suffix _1x3 (as filename_1x3.top etc.)
Last edited by Shaos on 13 Aug 2010 17:44, edited 1 time in total.
Я тут за главного - если что шлите мыло на me собака shaos точка net
-
- Admin
- Posts: 24008
- Joined: 08 Jan 2003 23:22
- Location: Silicon Valley
-
- Admin
- Posts: 24008
- Joined: 08 Jan 2003 23:22
- Location: Silicon Valley
-
- Admin
- Posts: 24008
- Joined: 08 Jan 2003 23:22
- Location: Silicon Valley
-
- Admin
- Posts: 24008
- Joined: 08 Jan 2003 23:22
- Location: Silicon Valley
-
- Admin
- Posts: 24008
- Joined: 08 Jan 2003 23:22
- Location: Silicon Valley