From f8fe16708502e0588d9d0be42d097a933d6f12d3 Mon Sep 17 00:00:00 2001 From: Hiroshi Murayama Date: Sun, 18 Aug 2019 18:33:41 +0900 Subject: zero supressing in aperture macro definition --- gerberex/am_expression.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gerberex') diff --git a/gerberex/am_expression.py b/gerberex/am_expression.py index 4bb1d78..5400130 100644 --- a/gerberex/am_expression.py +++ b/gerberex/am_expression.py @@ -49,7 +49,8 @@ class AMConstantExpression(AMExpression): return self def to_gerber(self, settings=None): - return '%.6f' % self._value + gerber = '%.6g' % self._value + return '%.6f' % self._value if 'e' in gerber else gerber def to_instructions(self): return [(OpCode.PUSH, self._value)] -- cgit