short-circuit deep searches of non-manifold parts

This commit is contained in:
Stewart Allen 2022-02-23 23:29:43 -05:00
commit 8a7014ac08

View file

@ -483,6 +483,7 @@ function sliceConnect(input, z, opt = {}) {
current = [ path ];
branches = [ ];
}
if (branches.length < 500)
for (let p of links) {
branches.push(nc = current.slice());
let rpath = findNextPath(p, nc, branches, depth + 1);