From 396502948ba7775124c2f5de601f6b19e4006b85 Mon Sep 17 00:00:00 2001 From: Casper Lamboo Date: Tue, 3 Apr 2018 21:33:34 +0200 Subject: [PATCH] Fix bug where some shapes are skipped --- src/sliceActions/intersectionsToShapes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sliceActions/intersectionsToShapes.js b/src/sliceActions/intersectionsToShapes.js index 25ba3e2..7b8b58f 100644 --- a/src/sliceActions/intersectionsToShapes.js +++ b/src/sliceActions/intersectionsToShapes.js @@ -87,7 +87,7 @@ export default function intersectionsToShapes(layerPoints, layerFaceIndexes, fac for (const objectIndex in shapes) { const shape = shapes[objectIndex] .map(lineSegment => lineSegment.map(pointIndex => points[pointIndex])) - .filter(lineSegment => lineSegment.some(i => !almostEquals(lineSegment[0], lineSegment[1]))); + .filter(lineSegment => lineSegment.some(point => !almostEquals(lineSegment[0], point))); const openShape = openObjectIndexes[objectIndex]; const connectPoints = [];