From 78799464ca5e2c4ec08073fdca2e2a0341ae62d5 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Mon, 11 Jan 2021 22:54:52 -0500 Subject: [PATCH] fix new code brim and belt facing extrusion threshold --- src/mode/fdm/prepare.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mode/fdm/prepare.js b/src/mode/fdm/prepare.js index 8ebd49c5..5e2fdc59 100644 --- a/src/mode/fdm/prepare.js +++ b/src/mode/fdm/prepare.js @@ -439,16 +439,16 @@ point.y += minby - miny; } } + let thresh = firstLayerHeight * 1.05; // iterate over layers, find extrusion on belt and // apply corrections and add brim when specified for (let layer of output) { let lastout, first = false; let minz = Infinity, maxy = -Infinity, minx = Infinity, maxx = -Infinity; - let thresh = miny * 1.1; for (let out of layer) { let point = out.point; let belty = out.belty = -point.y + point.z * bfactor; - if (out.emit && belty < firstLayerHeight && lastout && lastout.belty < firstLayerHeight) { + if (out.emit && belty <= thresh && lastout && lastout.belty <= thresh) { out.speed = firstLayerRate; out.emit *= firstLayerMult; minx = Math.min(minx, point.x, lastout.point.x);