From d2ac6ba9d098fd9d4c4fffae8e039e8117b1f051 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Mon, 12 Apr 2021 20:45:50 -0400 Subject: [PATCH] update precision to more accurately capture slices touching a belt. fix starting point for that case. --- src/mode/fdm/prepare.js | 2 +- src/mode/fdm/slice.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mode/fdm/prepare.js b/src/mode/fdm/prepare.js index 249ac3fc..1b09f25b 100644 --- a/src/mode/fdm/prepare.js +++ b/src/mode/fdm/prepare.js @@ -413,7 +413,7 @@ // output seek to start point between mesh slices if previous data printPoint = print.slicePrintPath( slice, - slice.belt && slice.belt.touch ? newPoint(-wtb.w, wtb.d * 2, 0) : printPoint.sub(offset), + slice.belt && slice.belt.touch ? newPoint(-5000, 0, 0) : printPoint.sub(offset), offset, layerout, { diff --git a/src/mode/fdm/slice.js b/src/mode/fdm/slice.js index 688d3c40..85fa02f3 100644 --- a/src/mode/fdm/slice.js +++ b/src/mode/fdm/slice.js @@ -339,7 +339,7 @@ maxx = Math.max(maxx, poly.bounds.maxx); } } - if (Math.abs(slice.belt.miny - smin) < 0.001) { + if (Math.abs(slice.belt.miny - smin) < 0.01) { slice.belt.touch = true; if (!start) start = slice; }