From d0a1c73bf0b5a60342658e367edc5881ba1d659d Mon Sep 17 00:00:00 2001 From: bakedpotatolord Date: Wed, 4 Jun 2025 16:05:45 -0600 Subject: [PATCH] add lineTolerance config --- src/kiri-mode/cam/prepare.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/kiri-mode/cam/prepare.js b/src/kiri-mode/cam/prepare.js index a464282c..f69bf6b0 100644 --- a/src/kiri-mode/cam/prepare.js +++ b/src/kiri-mode/cam/prepare.js @@ -729,7 +729,8 @@ function prepEach(widget, settings, print, firstPoint, update) { function polyEmit(poly, index, count, fromPoint) { //arcTolerance is the allowable distance between circle centers let arcRes = 8, //8 degs max - arcMax = Infinity; // no max arc radius + arcMax = Infinity, // no max arc radius + lineTolerance = 0.01; // do not consider points under 0.05mm for lines fromPoint = fromPoint || printPoint; @@ -784,7 +785,7 @@ function prepEach(widget, settings, print, firstPoint, update) { // console.log("start",point,lastp) let dist = lastp? point.distTo2D(lastp) : 0; if (lastp) { - if (dist >arcTolerance && lastp) { + if (dist >lineTolerance && lastp) { let rec = Object.assign(point,{dist}); arcQ.push(rec); let desp = false; // do arcQ[0] and rec have differing move speeds?