From c3b061b421a58c08b709eba282d27e2f46d26484 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Mon, 10 Oct 2022 11:54:51 -0400 Subject: [PATCH] increase resolution of contoured lines --- src/geo/polygon.js | 4 ++-- src/kiri-mode/cam/ops.js | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/geo/polygon.js b/src/geo/polygon.js index 2f71074c..d0a543bc 100644 --- a/src/geo/polygon.js +++ b/src/geo/polygon.js @@ -1830,7 +1830,7 @@ class Polygon { if (dl < max) { continue; } - const div = dl / dist; + const div = dl / max; const fit = div | 0; const add = fit - 1; const ix = dx / fit; @@ -1838,7 +1838,7 @@ class Polygon { let ox = p1.x + ix; let oy = p1.y + iy; for (let i=0; i p.segment(topo.tolerance * 2)); + for (let poly of hirez) { for (let point of poly.points) { point.z = topo.toolAtXY(point.x, point.y); } } + return hirez; } prepare(ops, progress) {