Stefan Schuermans commited on 2015-03-14 10:53:30
Showing 1 changed files, with 28 additions and 0 deletions.
... | ... |
@@ -0,0 +1,28 @@ |
1 |
+#! /usr/bin/perl |
|
2 |
+ |
|
3 |
+use strict; |
|
4 |
+use warnings; |
|
5 |
+ |
|
6 |
+if (@ARGV < 1) { |
|
7 |
+ print ("usage: pcb_move.pl <new minium drill diameter>\n"); |
|
8 |
+ exit (1); |
|
9 |
+} |
|
10 |
+ |
|
11 |
+my $mindia = int($ARGV[0]); |
|
12 |
+ |
|
13 |
+my $line; |
|
14 |
+while ($line = <STDIN>) { |
|
15 |
+ chomp ($line); |
|
16 |
+ chomp ($line); |
|
17 |
+ |
|
18 |
+ if ($line =~ /^([ \t]*(?:Via|Pin)[ \t]*\[)((?:-?[0-9]+[ \t]+){5})([0-9]+)(.*)$/) { |
|
19 |
+ my $dia = int ($3); |
|
20 |
+ if ($dia < $mindia) { |
|
21 |
+ $dia = $mindia; |
|
22 |
+ } |
|
23 |
+ $line = $1 . $2 . $dia . $4; |
|
24 |
+ } |
|
25 |
+ |
|
26 |
+ print ($line . "\n"); |
|
27 |
+} |
|
28 |
+ |
|
0 | 29 |