1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-12-22 18:49:32 +02:00

fab/drl2gerber: put whitespace around operators

This commit is contained in:
Werner Almesberger 2017-05-07 14:10:45 -03:00
parent 1d762923e4
commit c5c1b18b5a

View File

@ -2,8 +2,8 @@
#
# drl2gerber - Convert a KiCAD-generated Excellon drill file to Gerber
#
# Written 2011 by Werner Almesberger
# Copyright 2011 Werner Almesberger
# Written 2011, 2017 by Werner Almesberger
# Copyright 2011, 2017 Werner Almesberger
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -22,20 +22,20 @@ print "%FSLAX34Y34*%\n" || die; # format
while (<>) {
chop;
if (/^T(\d+)C/) {
print "%ADD", $1+10, "C,$'*%\n" || die;
print "%ADD", $1 + 10, "C,$'*%\n" || die;
next;
}
if (/^T(\d+)$/) {
print "G54D", $1+10, "*\n" || die;
print "G54D", $1 + 10, "*\n" || die;
next;
}
if (/^X([-0-9.]+)Y([-0-9.]+)$/) {
printf("X%dY%dD03*\n", $1*10000, $2*10000) || die;
printf("X%dY%dD03*\n", $1 * 10000, $2 * 10000) || die;
next;
}
if (/^X([-0-9.]+)Y([-0-9.]+)G85X([-0-9.]+)Y([-0-9.]+)$/) {
printf("X%dY%dD02*\nX%dY%dD01*\n",
$1*10000, $2*10000, $3*10000, $4*10000) || die;
$1 * 10000, $2 * 10000, $3 * 10000, $4 * 10000) || die;
next;
}
}