From 921e04f88c91b8903af0998fa662692246839415 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Lafreniere Date: Tue, 26 Feb 2019 20:54:19 -0500 Subject: [PATCH] Fix issue with tool size --- pcbdevice/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pcbdevice/main.py b/pcbdevice/main.py index 637e385..9959568 100644 --- a/pcbdevice/main.py +++ b/pcbdevice/main.py @@ -24,7 +24,11 @@ if __name__ == "__main__": else: pxHeight, pxWidth = FileUtils.getPixelSize(height, width, args.he, args.wi) - rTool = int(math.ceil(args.t * pxHeight if pxHeight > pxWidth else pxWidth)) + if pxHeight > pxWidth: + rTool = int(math.ceil(args.t * pxHeight)) + else: + rTool = int(math.ceil(args.t * pxWidth)) + matrixUpdated = path(matrix, rTool) listIndexes = createSequence(matrixUpdated) gcode = listToGCode(listIndexes, pxHeight, pxWidth)