From 8ce440d85a9c755f2d5eb4f84d4a1e4017498f0e Mon Sep 17 00:00:00 2001 From: Roland Lutz Date: Fri, 4 Oct 2019 16:18:33 +0200 Subject: [PATCH] netlist: Report error coordinates as "inches" --- src/gaf/netlist/blueprint.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/gaf/netlist/blueprint.py b/src/gaf/netlist/blueprint.py index 08c23f081..d9310b909 100644 --- a/src/gaf/netlist/blueprint.py +++ b/src/gaf/netlist/blueprint.py @@ -25,6 +25,7 @@ import sys from gettext import gettext as _ +import xorn.hybridnum import xorn.proxy import xorn.storage import gaf.attrib @@ -112,12 +113,7 @@ class Schematic: # distance of 100, so most coordinates are multiples of 100. def format_coord(coord): - coord = int(coord) - if coord % 100 == 0: - return '%d' % (coord / 100, ) - if coord % 10 == 0: - return '%d.%d' % (coord / 100, (coord % 100) / 10) - return '%d.%02d' % (coord / 100, coord % 100) + return xorn.hybridnum.format(coord, 3) ## %Component in a single schematic's netlist. -- 2.11.4.GIT