From 6fcb31eabc1d439551e6a17bd1da5f9ffbc47ecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Fri, 11 Oct 2013 14:35:09 +0200 Subject: [PATCH] add reformating option --- pcb/Rakefile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pcb/Rakefile b/pcb/Rakefile index 98afb27..ce76aad 100644 --- a/pcb/Rakefile +++ b/pcb/Rakefile @@ -73,6 +73,16 @@ desc "export gerber" task :gerber => GERBERS CLOBBER.include(GERBERS) +desc "reformat gerber and drill output (some programs like LPKF CircuitPro have difficulties with gEDA pcb output)" +task :reformat => GERBERS do + GERBERS.each do |gerber| + if gerber.end_with? ".gbr" then + sh "gerbv --export=rs274x --output=#{gerber} #{gerber}" + elsif gerber.end_with? ".cnc" then + sh "gerbv --export=drill --output=#{gerber} #{gerber}" + end + end +end # ================ # helper functions @@ -158,7 +168,7 @@ file "#{target}_layout.pdf" => vpcb do |t| sh "rm #{t.name}.ps 2> /dev/null" end -desc "generate note file from schematich, listing the 'note' attributes from elements" +desc "generate note file from schematic, listing the 'note' attributes from elements" file "notes.txt" => vsch do |t| notes_data = bom2(t.prerequisites[0],"note") File.open(t.name,"w") do |notes_file| @@ -169,12 +179,12 @@ file "notes.txt" => vsch do |t| end end -desc "generate photo realistich picture from layout (front side)" +desc "generate photo realistic picture from layout (front side)" file "#{target}_layout-top.png" => vpcb do |t| sh "pcb -x png --dpi 600 --format PNG --photo-mode --outfile #{target}_layout-top.png #{t.prerequisites.join(' ')}" end -desc "generate photo realistich picture from layout (bottom side)" +desc "generate photo realistic picture from layout (bottom side)" file "#{target}_layout-bottom.png" => vpcb do |t| sh "pcb -x png --dpi 600 --format PNG --photo-mode --photo-flip-x --outfile #{target}_layout-bottom.png #{t.prerequisites.join(' ')}" end