From 4b64c4b8b0bd355c40a355504c7381a1593bc27f Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Wed, 17 Sep 2025 10:21:00 -0400 Subject: [PATCH] place single wall exactly on medial axis vs inter --- src/kiri/mode/fdm/post.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/kiri/mode/fdm/post.js b/src/kiri/mode/fdm/post.js index 21fae9a5..4dbb5117 100644 --- a/src/kiri/mode/fdm/post.js +++ b/src/kiri/mode/fdm/post.js @@ -718,10 +718,19 @@ function thin_type_3(params) { return; } p1.claimed = true; - shells.push(newPolygon().centerCircle({ - x: np1.x + dy * (pop[0] - dstep), - y: np1.y - dx * (pop[0] - dstep) - }, pop[0], 10)); + if (pop.length === 1) { + // for single wall place it exactly on medial axis + shells.push(newPolygon().centerCircle({ + x: min.x, + y: min.y + }, mr, 12)); + } else { + // otherwise use divisions + shells.push(newPolygon().centerCircle({ + x: np1.x + dy * (pop[0] - dstep), + y: np1.y - dx * (pop[0] - dstep) + }, pop[0], 12)); + } } }); }