From b3337797738e04f81e6c2f20c9e99d5a8f1bfcd8 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Fri, 28 May 2021 11:19:33 -0400 Subject: [PATCH] fix odd layer offset from floating point imprecision --- src/mode/fdm/prepare.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mode/fdm/prepare.js b/src/mode/fdm/prepare.js index 0e9af91f..45ea341f 100644 --- a/src/mode/fdm/prepare.js +++ b/src/mode/fdm/prepare.js @@ -325,7 +325,7 @@ } for (let slice of widget.slices) { slice.widget = widget; - let z = slice.z + widget.offset.z; + let z = (slice.z + widget.offset.z).round(2); let rec = zrec[z] = zrec[z] || {z, slices:[]}; if (rec.slices.length === 0) { cake.push(rec);