From 8a7014ac08556da1a795aa82683408d599de445a Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Wed, 23 Feb 2022 23:29:43 -0500 Subject: [PATCH] short-circuit deep searches of non-manifold parts --- src/geo/slicer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/geo/slicer.js b/src/geo/slicer.js index 6a534b4c..7eee7217 100644 --- a/src/geo/slicer.js +++ b/src/geo/slicer.js @@ -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);