EEVblog Electronics Community Forum

Electronics => PCB/EDA/CAD => KiCad => Topic started by: blueskull on June 28, 2020, 12:12:39 pm

Title: KiCAD Gerber to Altium Gerber conversion tool
Post by: blueskull on June 28, 2020, 12:12:39 pm
This is totally for noobs noober than I am, but I'll just post it here for Google to index in case someone needs.

I just encountered a fab that won't accept KiCAD Gerber naming convention, so I wrote this simple tool to rename and compress the generated Gerber so a KiCAD-unaware fab can manufacture a KiCAD design.

Tested with Ubuntu 20.04, and I have no reason to believe it won't work in WSL or MSYS2.

Code: [Select]
#!/bin/bash

NAME=[i]your-output-zip-name-here-without-extension[/i]

rm $NAME.zip
rename 's/-F_Cu.gbr/.gtl/' *.gbr
rename 's/-B_Cu.gbr/.gbl/' *.gbr
rename 's/-F_Mask.gbr/.gts/' *.gbr
rename 's/-B_Mask.gbr/.gbs/' *.gbr
rename 's/-F_Paste.gbr/.gtp/' *.gbr
rename 's/-B_Paste.gbr/.gbp/' *.gbr
rename 's/-F_SilkS.gbr/.gto/' *.gbr
rename 's/-B_SilkS.gbr/.gbo/' *.gbr
rename 's/-Edge_Cuts.gbr/.gm1/' *.gbr

#Uncomment the following line if your fab does not recognize .drl files
#rename 's/.drl/.txt/' *.drl

zip -9 $NAME.zip *.g?? *.drl > /dev/null
Title: Re: KiCAD Gerber to Altium Gerber conversion tool
Post by: greenpossum on June 28, 2020, 01:05:24 pm
Couldn't you just uncheck Use Protel filename extensions in the Plot dialog?