BlinkenArea - GitList
Repositories
Blog
Wiki
partlib
Code
Commits
Branches
Tags
Search
Tree:
369f5a4
Branches
Tags
master
stefan.experimental
partlib
pcb_stuff
pcb_drill_min_dia.pl
minimum drill diameter script: add feature to increase copper diamater of pins/vias as well
Stefan Schuermans
commited
369f5a4
at 2015-03-15 11:40:56
pcb_drill_min_dia.pl
Blame
History
Raw
#! /usr/bin/perl use strict; use warnings; if (@ARGV < 1) { print ("usage: pcb_move.pl <new min drill> [<new min copper>]\n"); exit (1); } my $mindrill = int($ARGV[0]); my $mincopper = 0; if (@ARGV >= 2) { $mincopper = int($ARGV[1]); } my $line; while ($line = <STDIN>) { chomp ($line); chomp ($line); if ($line =~ /^([ \t]*(?:Via|Pin)[ \t]*\[(?:-?[0-9]+[ \t]+){2})([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)(.*)$/) { my $begin = $1; my $copper = int ($2); my $clearance = int ($3); my $solderstop = int ($4); my $drill = int ($5); my $end = $6; if ($copper < $mincopper) { if ($solderstop > $copper) { $solderstop += $mincopper - $copper; } $copper = $mincopper; } if ($drill < $mindrill) { $drill = $mindrill; } $line = "$begin$copper $clearance $solderstop $drill$end"; } print ($line . "\n"); }