From 3bceef4f7e5b5ac77998dc73dcbe3246d1a3e533 Mon Sep 17 00:00:00 2001 From: liabru Date: Wed, 22 Nov 2017 21:42:08 +0000 Subject: [PATCH] fix Vertices.chamfer radius argument, closes #467 --- src/geometry/Vertices.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/geometry/Vertices.js b/src/geometry/Vertices.js index 1dd769f..3b484b2 100644 --- a/src/geometry/Vertices.js +++ b/src/geometry/Vertices.js @@ -268,10 +268,11 @@ var Common = require('../core/Common'); * @param {number} qualityMax */ Vertices.chamfer = function(vertices, radius, quality, qualityMin, qualityMax) { - radius = radius || [8]; - - if (!radius.length) + if (typeof radius === 'number') { radius = [radius]; + } else { + radius = radius || [8]; + } // quality defaults to -1, which is auto quality = (typeof quality !== 'undefined') ? quality : -1;