summaryrefslogtreecommitdiff
path: root/gerbonara/aperture_macros/parse.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-11-09 20:16:00 +0100
committerjaseg <git@jaseg.de>2023-11-14 21:52:12 +0100
commitdf75a2fddb1a2e4a23dd2fb65431879aab8dbfd6 (patch)
tree8e2bb06af8ce7ea9b83e8b105cc26c2d2914c2b0 /gerbonara/aperture_macros/parse.py
parent11325b213b6ef7cebcdcf0c79f966cda3ce61a89 (diff)
downloadgerbonara-df75a2fddb1a2e4a23dd2fb65431879aab8dbfd6.tar.gz
gerbonara-df75a2fddb1a2e4a23dd2fb65431879aab8dbfd6.tar.bz2
gerbonara-df75a2fddb1a2e4a23dd2fb65431879aab8dbfd6.zip
Small bugfix
Diffstat (limited to 'gerbonara/aperture_macros/parse.py')
-rw-r--r--gerbonara/aperture_macros/parse.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gerbonara/aperture_macros/parse.py b/gerbonara/aperture_macros/parse.py
index 51c1f27..de84a9a 100644
--- a/gerbonara/aperture_macros/parse.py
+++ b/gerbonara/aperture_macros/parse.py
@@ -125,7 +125,7 @@ class ApertureMacro:
name=macro_name,
primitives=tuple(p.substitute_params(params, unit) for p in self.primitives),
comments=(f'Fully substituted instance of {self.name} macro',
- f'Original parameters {"X".join(map(str, params.values()))}'))
+ f'Original parameters: {"X".join(map(str, params.values())) if params else "none"}'))
def to_gerber(self, settings):
""" Serialize this macro's content (without the name) into Gerber using the given file unit """
@@ -145,7 +145,7 @@ class ApertureMacro:
def to_graphic_primitives(self, offset, rotation, parameters : [float], unit=None, polarity_dark=True):
parameters = dict(enumerate(parameters, start=1))
for primitive in self.primitives:
- yield from primitive.to_graphic_primitives(offset, rotation, variables, unit, polarity_dark)
+ yield from primitive.to_graphic_primitives(offset, rotation, parameters, unit, polarity_dark)
def rotated(self, angle):
# aperture macro primitives use degree counter-clockwise, our API uses radians clockwise