summaryrefslogtreecommitdiff
path: root/gerbonara/gerber/utils.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-01-29 16:44:28 +0100
committerjaseg <git@jaseg.de>2022-01-29 16:44:28 +0100
commit1304847afe223661a574c0cd16d9a915c2bfa19f (patch)
tree6193b56b4b02e9075477b4854d41f3b05959d3d8 /gerbonara/gerber/utils.py
parent80121e6e5aecea1faf5d33b0511ccc2827d820f4 (diff)
downloadgerbonara-1304847afe223661a574c0cd16d9a915c2bfa19f.tar.gz
gerbonara-1304847afe223661a574c0cd16d9a915c2bfa19f.tar.bz2
gerbonara-1304847afe223661a574c0cd16d9a915c2bfa19f.zip
Add initial netlist support
Diffstat (limited to 'gerbonara/gerber/utils.py')
-rw-r--r--gerbonara/gerber/utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gerbonara/gerber/utils.py b/gerbonara/gerber/utils.py
index 5bc03e5..1aad900 100644
--- a/gerbonara/gerber/utils.py
+++ b/gerbonara/gerber/utils.py
@@ -75,6 +75,9 @@ class LengthUnit:
return unit.convert_from(self, value)
+ def format(self, value):
+ return f'{value:.3f}{self.shorthand}'
+
def __call__(self, value, unit):
return self.convert_from(unit, value)