summaryrefslogtreecommitdiff
path: root/gerbonara/gerber/apertures.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-01-24 14:19:01 +0100
committerjaseg <git@jaseg.de>2022-01-24 14:19:01 +0100
commita1c1d6d971257f03f1926db9dc44e659d2773d2d (patch)
tree443af73413f52b47fbbddf185bb497fb483c93c0 /gerbonara/gerber/apertures.py
parent4a6d76c557caf7263ab57e5fe840d28aa3356621 (diff)
downloadgerbonara-a1c1d6d971257f03f1926db9dc44e659d2773d2d.tar.gz
gerbonara-a1c1d6d971257f03f1926db9dc44e659d2773d2d.tar.bz2
gerbonara-a1c1d6d971257f03f1926db9dc44e659d2773d2d.zip
Add more tests
Diffstat (limited to 'gerbonara/gerber/apertures.py')
-rw-r--r--gerbonara/gerber/apertures.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gerbonara/gerber/apertures.py b/gerbonara/gerber/apertures.py
index d288a2a..ab4a1a1 100644
--- a/gerbonara/gerber/apertures.py
+++ b/gerbonara/gerber/apertures.py
@@ -77,7 +77,10 @@ class Aperture:
unit = settings.unit if settings else None
actual_inst = self._rotated()
params = 'X'.join(f'{float(par):.4}' for par in actual_inst.params(unit) if par is not None)
- return ','.join((actual_inst.gerber_shape_code, params))
+ if params:
+ return f'{actual_inst.gerber_shape_code},{params}'
+ else:
+ return actual_inst.gerber_shape_code
def __eq__(self, other):
# We need to choose some unit here.