summaryrefslogtreecommitdiff
path: root/gerbonara/gerber/aperture_macros/parse.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-01-22 19:26:48 +0100
committerjaseg <git@jaseg.de>2022-01-22 19:26:48 +0100
commit242f4033c661d70c0d2722050370307f4d9b678a (patch)
tree9076a1d0f45a76c49a465f74903071671006b6de /gerbonara/gerber/aperture_macros/parse.py
parent7cf41c6a72e52a63b4f4d4497732a72d6623eec8 (diff)
downloadgerbonara-242f4033c661d70c0d2722050370307f4d9b678a.tar.gz
gerbonara-242f4033c661d70c0d2722050370307f4d9b678a.tar.bz2
gerbonara-242f4033c661d70c0d2722050370307f4d9b678a.zip
Make excellon tests pass
Diffstat (limited to 'gerbonara/gerber/aperture_macros/parse.py')
-rw-r--r--gerbonara/gerber/aperture_macros/parse.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gerbonara/gerber/aperture_macros/parse.py b/gerbonara/gerber/aperture_macros/parse.py
index 43af309..c1aa2d0 100644
--- a/gerbonara/gerber/aperture_macros/parse.py
+++ b/gerbonara/gerber/aperture_macros/parse.py
@@ -121,10 +121,10 @@ class ApertureMacro:
def to_graphic_primitives(self, offset, rotation, parameters : [float], unit=None):
variables = dict(self.variables)
- for number, value in enumerate(parameters):
- if i in variables:
+ for number, value in enumerate(parameters, start=1):
+ if number in variables:
raise SyntaxError(f'Re-definition of aperture macro variable {i} through parameter {value}')
- variables[i] = value
+ variables[number] = value
for primitive in self.primitives:
yield from primitive.to_graphic_primitives(offset, rotation, variables, unit)