From 120b49dfb7fbb709d7485eeeedd28ec990314870 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Tue, 13 Feb 2018 16:37:50 +0100 Subject: [PATCH] fix some edge cases in intersections to shapes --- src/sliceActions/intersectionsToShapes.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sliceActions/intersectionsToShapes.js b/src/sliceActions/intersectionsToShapes.js index f7a5c39..60b841f 100644 --- a/src/sliceActions/intersectionsToShapes.js +++ b/src/sliceActions/intersectionsToShapes.js @@ -91,6 +91,8 @@ export default function intersectionsToShapes(layerPoints, layerFaceIndexes, fac for (let pathIndex = 0; pathIndex < shape.length; pathIndex ++) { const path = shape[pathIndex]; + if (path.length === 2 && almostEquals(path[0], path[1])) continue; + let shapeStartPoint = path[0]; for (const point of connectPoints) { if (almostEquals(point.point, shapeStartPoint)) {