From dbd92e58c91ec9d4447749c6c9b4212b96a84e44 Mon Sep 17 00:00:00 2001 From: C4dmium <41113988+MarinMikael@users.noreply.github.com> Date: Thu, 1 Aug 2019 22:25:01 +0900 Subject: Update utils.py --- gerber/utils.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gerber/utils.py') diff --git a/gerber/utils.py b/gerber/utils.py index 817a36e..3d39df9 100644 --- a/gerber/utils.py +++ b/gerber/utils.py @@ -123,6 +123,10 @@ def write_gerber_value(value, format=(2, 5), zero_suppression='trailing'): value : string The specified value as a Gerber/Excellon-formatted string. """ + + if format[0] == float: + return "%f" %value + # Format precision integer_digits, decimal_digits = format MAX_DIGITS = integer_digits + decimal_digits -- cgit