From 1c25bb22f394cba7bf2745b35383a2e080a974ba Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Wed, 9 Jun 2021 11:08:12 -0400 Subject: [PATCH] rm dead code. fix point conversion for small areas --- src/mode/fdm/slice.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/mode/fdm/slice.js b/src/mode/fdm/slice.js index 228d0be8..4b4beb12 100644 --- a/src/mode/fdm/slice.js +++ b/src/mode/fdm/slice.js @@ -1418,7 +1418,7 @@ } } let filter = isBelt ? (norm) => { - return norm.z < thresh && norm.y < -0.001; + return norm.z <= thresh && norm.y < 0; } : (norm) => { return norm.z < thresh; }; @@ -1437,8 +1437,7 @@ continue; } // skip tiny faces - let area = BASE.newPolygon().addPoints([a,b,c]).area(); - let poly = BASE.newPolygon().addPoints([a,b,c]); + let poly = BASE.newPolygon().addPoints([a,b,c].map(v => BASE.newPoint(v.x, v.y, v.z))); if (poly.area() < min && poly.perimeter() < size) { continue; } @@ -1448,15 +1447,9 @@ } // match with other attached, coplanar faces coplane.put(a, b, c, norm.z); - // midpoint only for areas about the size of the support pillar - // if (area < size) { - // tp(new THREE.Vector3().add(a).add(b).add(c).divideScalar(3)); - // continue; - // } - // ta(a,b,c); } - // console.log({v3cache, coplane}); let groups = coplane.group(true); + // console.log({v3cache, coplane, groups}); for (let group of Object.values(groups)) { for (let polys of group) { for (let poly of polys) {