From 823e5c78aa012781bef719e6e234b68631ba23f5 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Sat, 2 Oct 2021 15:17:33 -0400 Subject: [PATCH] work around for microscopic objects in workspace --- src/kiri/slicer.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/kiri/slicer.js b/src/kiri/slicer.js index f5f30096..93873440 100644 --- a/src/kiri/slicer.js +++ b/src/kiri/slicer.js @@ -162,6 +162,11 @@ } } + /** short-circuit for microscopic and invalid objects */ + if (zMax == 0 || zSum == 0 || points.length == 0) { + return ondone([]); + } + /** * bucket polygons into z-bounded groups (inside or crossing) * to reduce the search space in complex models