From 2f04aa9c506a72f3a2ba6b087fb06b669be59943 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Thu, 18 Jan 2018 15:30:08 +0100 Subject: [PATCH] fix threshold area function #18 --- src/constants.js | 2 +- src/sliceActions/shapesToSlices.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/constants.js b/src/constants.js index 2bc85da..4977e27 100644 --- a/src/constants.js +++ b/src/constants.js @@ -1,5 +1,5 @@ export const PRECISION = 0.01; export const VERSION = '0.0.18'; export const LOCAL_STORAGE_KEY = 'PRINTER_SETTINGS'; -export const MIN_AREA = 25; +export const MIN_AREA = 10; export const Z_OFFSET = 0.3; diff --git a/src/sliceActions/shapesToSlices.js b/src/sliceActions/shapesToSlices.js index 23bea79..b681a72 100644 --- a/src/sliceActions/shapesToSlices.js +++ b/src/sliceActions/shapesToSlices.js @@ -11,9 +11,9 @@ export default function shapesToSlices(shapes, settings) { fillShapes = new Shape(fillShapes, true, true, true, true) .fixOrientation() - .thresholdArea(MIN_AREA / Math.pow(PRECISION, 2)) .simplify('pftNonZero') .clean(1) + .thresholdArea(MIN_AREA / Math.pow(PRECISION, 2)) .seperateShapes(); lineShapesClosed = new Shape(lineShapesClosed, true, true, true, true)