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