add union notes

This commit is contained in:
Stewart Allen 2021-06-22 00:01:21 -04:00
commit 4d830c3b12
2 changed files with 6 additions and 1 deletions

View file

@ -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[]}
*/

View file

@ -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;