diff --git a/fab/gmerge b/fab/gmerge index b80aca2..9fafbe3 100755 --- a/fab/gmerge +++ b/fab/gmerge @@ -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 $!;