summaryrefslogtreecommitdiff
path: root/gerbonara/rs274x.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-11-09 19:16:37 +0100
committerjaseg <git@jaseg.de>2023-11-14 21:52:12 +0100
commit74fb384c4c0899f4d6f153da8db748a7a49e78ee (patch)
tree6e956d0fb498f1e47b995ec6093827f2a5395fc8 /gerbonara/rs274x.py
parent9af071344523accb5ae094ec76d5ace8102f1b0e (diff)
downloadgerbonara-74fb384c4c0899f4d6f153da8db748a7a49e78ee.tar.gz
gerbonara-74fb384c4c0899f4d6f153da8db748a7a49e78ee.tar.bz2
gerbonara-74fb384c4c0899f4d6f153da8db748a7a49e78ee.zip
aperture macros: work around gerbv/jlc wonkiness
Diffstat (limited to 'gerbonara/rs274x.py')
-rw-r--r--gerbonara/rs274x.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gerbonara/rs274x.py b/gerbonara/rs274x.py
index 1559740..ad78ceb 100644
--- a/gerbonara/rs274x.py
+++ b/gerbonara/rs274x.py
@@ -131,7 +131,7 @@ class GerberFile(CamFile):
nonlocal cache, settings
if isinstance(aperture, apertures.ApertureMacroInstance):
macro = aperture.macro
- macro_def = macro.to_gerber(unit=settings.unit)
+ macro_def = macro.to_gerber(settings)
if macro_def not in cache:
cache[macro_def] = macro
@@ -283,7 +283,7 @@ class GerberFile(CamFile):
self.dedup_apertures()
- am_stmt = lambda macro: f'%AM{macro.name}*\n{macro.to_gerber(unit=settings.unit)}*\n%'
+ am_stmt = lambda macro: f'%AM{macro.name}*\n{macro.to_gerber(settings)}*\n%'
for macro in self.aperture_macros():
yield am_stmt(macro)