From 2a63ae383a8639e8b20412e4019be9af33ddde1d Mon Sep 17 00:00:00 2001 From: Val Erastov Date: Fri, 21 Dec 2018 21:54:17 -0800 Subject: [PATCH] remove empty face in cut/extrude previewer --- web/app/cad/craft/cutExtrude/previewer.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/app/cad/craft/cutExtrude/previewer.js b/web/app/cad/craft/cutExtrude/previewer.js index 5a198993..1f4357dd 100644 --- a/web/app/cad/craft/cutExtrude/previewer.js +++ b/web/app/cad/craft/cutExtrude/previewer.js @@ -34,8 +34,10 @@ export function createPreviewGeomProvider(inversed) { triangles.push([base[p], base[q], lid[q]]); triangles.push([lid[q], lid[p], base[p]]); } - base.forEach(p => basePoints.push(p)); - lid.forEach(p => lidPoints.push(p)); + for (let j = 0; j < base.length - 1; j++) { + basePoints.push(base[j]); + lidPoints.push(base[j]); + } } function collectOnSurface(points, normal) {