From 1fa98ae6de7cad220a99e97851c57be3c990ffe7 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Fri, 26 May 2017 17:12:01 +0200 Subject: [PATCH] move merge vertices and compute normals to slice actions --- src/Slicer.js | 3 --- src/sliceActions/slice.js | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Slicer.js b/src/Slicer.js index 08106a8..a0a7069 100644 --- a/src/Slicer.js +++ b/src/Slicer.js @@ -23,9 +23,6 @@ export default class { geometry.applyMatrix(matrix); } - geometry.mergeVertices(); - geometry.computeFaceNormals(); - this.geometry = geometry; return this; diff --git a/src/sliceActions/slice.js b/src/sliceActions/slice.js index 8ee13b9..2b3f47f 100644 --- a/src/sliceActions/slice.js +++ b/src/sliceActions/slice.js @@ -13,6 +13,9 @@ import applyPrecision from './applyPrecision.js'; import removePrecision from './removePrecision.js'; export default function(geometry, settings) { + geometry.mergeVertices(); + geometry.computeFaceNormals(); + // get unique lines from geometry; const openClosed = detectOpenClosed(geometry); const lines = createLines(geometry, settings, openClosed);