Fix bug where some shapes are skipped

This commit is contained in:
Casper Lamboo 2018-04-03 21:33:34 +02:00
parent a0b9cd1306
commit 396502948b

View File

@ -87,7 +87,7 @@ export default function intersectionsToShapes(layerPoints, layerFaceIndexes, fac
for (const objectIndex in shapes) { for (const objectIndex in shapes) {
const shape = shapes[objectIndex] const shape = shapes[objectIndex]
.map(lineSegment => lineSegment.map(pointIndex => points[pointIndex])) .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 openShape = openObjectIndexes[objectIndex];
const connectPoints = []; const connectPoints = [];