difference line shapes with fill shapes

This commit is contained in:
casperlamboo 2018-01-18 14:02:34 +01:00
parent 198ca783f7
commit 60c70cdbd5

View File

@ -27,14 +27,16 @@ export default function shapesToSlices(shapes, settings) {
for (let i = 0; i < fillShapes.length; i ++) {
const fillShape = fillShapes[i];
if (fillShape.paths.length === 0) continue;
slice.add(fillShape, true);
// if (lineShapesClosed.paths.length > 0) {
// lineShapesClosed = lineShapesClosed.difference(closedShape);
// }
// if (lineShapesOpen.paths.length > 0) {
// lineShapesOpen = lineShapesOpen.difference(closedShape);
// }
if (lineShapesClosed.paths.length > 0) {
lineShapesClosed = lineShapesClosed.difference(fillShape);
}
if (lineShapesOpen.paths.length > 0) {
lineShapesOpen = lineShapesOpen.difference(fillShape);
}
}
if (lineShapesClosed.paths.length > 0) {