diff --git a/src/geo/polygons.js b/src/geo/polygons.js index c0e3ce57..d6d3b505 100644 --- a/src/geo/polygons.js +++ b/src/geo/polygons.js @@ -342,6 +342,11 @@ * Slice.doProjectedFills() * Print.init w/ brims * + * clipper is natively less efficient at merging many polygons. this iterative + * approach skips attempting to merge polys lacking overlapping bounding boxes + * and can quickly check if the attempt to union two polys outputs the same + * two input polys. the latter bit is the key to greater speed. + * * @param {Polygon[]} polys * @returns {Polygon[]} */ diff --git a/src/mode/fdm/slice.js b/src/mode/fdm/slice.js index 05480502..fdf2082a 100644 --- a/src/mode/fdm/slice.js +++ b/src/mode/fdm/slice.js @@ -1034,7 +1034,7 @@ return; } - let unioned = POLY.union(solids, undefined, true).flat(), // TODO verify + let unioned = POLY.union(solids, undefined, true).flat(), isSLA = (spacing === undefined && angle === undefined); if (solids.length === 0) return false;