allow poly offset closer to 0 for pocket ops

This commit is contained in:
Stewart Allen 2024-12-15 15:14:59 -05:00
commit 4fc4b3da54
3 changed files with 6 additions and 5 deletions

View file

@ -345,10 +345,10 @@ function flatten(polys, to, crush) {
* @returns {Polygon[]} out
*/
function subtract(setA, setB, outA, outB, z, minArea, opt = {}) {
let min = minArea || 0.1,
let min = numOrDefault(minArea, 0.1),
out = [];
function filter(from, to = []) {
function filter(from, to = []) {
from.forEach(function(poly) {
if (poly.area() >= min) {
to.push(poly);