1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-25 00:18:26 +02:00

fab/gmerge: support non-circular apertures

Had this sitting around uncommitted for eight months ...
This commit is contained in:
Werner Almesberger 2017-05-07 14:29:16 -03:00
parent d70dc71cfe
commit 76987b1dfb

View File

@ -2,8 +2,8 @@
#
# gmerge - Merge multiple KiCAD Gerber files into one
#
# Written 2011 by Werner Almesberger
# Copyright 2011 Werner Almesberger
# Written 2011, 2016 by Werner Almesberger
# Copyright 2011, 2016 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
@ -29,7 +29,8 @@ LINE: while (<>) {
$state = "CMD";
next;
}
die "unrecognized aperture" unless /^%ADD(\d+)C,((\d|\.)+)\*%/;
die "unrecognized aperture"
unless /^%ADD(\d+)([CRO],(\d|\.)+(X(\d|\.)+)?)\*%/;
for (keys %apt) {
if ($apt{$_} == $2) {
$map{$1} = $_;
@ -71,7 +72,7 @@ LINE: while (<>) {
print $ghdr || die $!;
print "G04 APERTURE LIST*\n" || die $!;
for (sort keys %apt) {
print "\%ADD".$_."C,".$apt{$_}."*%\n" || die $!;
print "\%ADD".$_.$apt{$_}."*%\n" || die $!;
}
print "G04 APERTURE END LIST*\n" || die $!;
print $c || die $!;