From 6cab3891460dea0ced4b7c77f00e18f094024a8a Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Mon, 18 Jan 2021 14:35:00 -0500 Subject: [PATCH] fix imperial units in this error message --- src/mode/cam/slice.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mode/cam/slice.js b/src/mode/cam/slice.js index efc09b8f..25e1ee25 100644 --- a/src/mode/cam/slice.js +++ b/src/mode/cam/slice.js @@ -40,7 +40,8 @@ maxToolDiam = -Infinity, thruHoles, tabs = settings.widget[widget.id].tab, - unsafe = proc.camExpertFast; + unsafe = proc.camExpertFast, + units = settings.controller.units === 'in' ? 25.4 : 1; if (tabs) { // make tab polygons @@ -85,7 +86,7 @@ } if (zMin >= bounds.max.z) { - throw `invalid z bottom ${zMin.round(3)} >= bounds z max ${zMax.round(3)}`; + throw `invalid z bottom ${(zMin/units).round(3)} >= bounds z max ${(zMax/units).round(3)}`; } let mark = Date.now();