BlinkenArea - GitList
Repositories
Blog
Wiki
partlib
Code
Commits
Branches
Tags
Search
Tree:
727ed2b
Branches
Tags
master
stefan.experimental
partlib
pcb_stuff
pcb_drill_min_dia.pl
script to ensure minimum drill diamater in PCB files
Stefan Schuermans
commited
727ed2b
at 2015-03-14 10:53:30
pcb_drill_min_dia.pl
Blame
History
Raw
#! /usr/bin/perl use strict; use warnings; if (@ARGV < 1) { print ("usage: pcb_move.pl <new minium drill diameter>\n"); exit (1); } my $mindia = int($ARGV[0]); my $line; while ($line = <STDIN>) { chomp ($line); chomp ($line); if ($line =~ /^([ \t]*(?:Via|Pin)[ \t]*\[)((?:-?[0-9]+[ \t]+){5})([0-9]+)(.*)$/) { my $dia = int ($3); if ($dia < $mindia) { $dia = $mindia; } $line = $1 . $2 . $dia . $4; } print ($line . "\n"); }