From 389b088ce73d10533aa373c00c8aa48b69f88fcc Mon Sep 17 00:00:00 2001 From: bakedpotatolord Date: Wed, 4 Jun 2025 15:34:29 -0600 Subject: [PATCH] remove console logs and increace arc tolerance --- src/kiri-mode/cam/prepare.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/kiri-mode/cam/prepare.js b/src/kiri-mode/cam/prepare.js index c2b83301..ea2b6d8b 100644 --- a/src/kiri-mode/cam/prepare.js +++ b/src/kiri-mode/cam/prepare.js @@ -726,7 +726,7 @@ function prepEach(widget, settings, print, firstPoint, update) { * @returns {Point} - the last point of the polygon */ function polyEmit(poly, index, count, fromPoint) { - const arcDist = 0.001, // minimum dist for arc + const arcDist = 0.05, // allowable distance between circle centers arcRes = 8, //8 degs max arcMax = Infinity; // no max arc radius @@ -759,7 +759,6 @@ function prepEach(widget, settings, print, firstPoint, update) { // if(offset == 0) console.log("forEachPoint",point,pidx,points) if(offset == 0){ // if first point, move to and call export function - console.log("offset 0") camOut(point.clone(), 0, {factor:scale}); quePush(point); } @@ -833,7 +832,7 @@ function prepEach(widget, settings, print, firstPoint, update) { arcQ.rSum = arcQ.center.reduce( function (t, v) { return t + v.r }, 0 ); let dx = cc.x - arcQ.xSum / arcQ.center.length; let dy = cc.y - arcQ.ySum / arcQ.center.length; - dc = Math.sqrt(dx * dx + dy * dy); + dc = Math.hypot(dx, dy); // delta center distance } // if new point is off the arc // if (deem || depm || desp || dc > arcDist || cc.r < arcMin || cc.r > arcMax || dist > cc.r) {