fix threshold area function

#18
This commit is contained in:
casperlamboo 2018-01-18 15:30:08 +01:00
parent ca3718e492
commit 2f04aa9c50
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
export const PRECISION = 0.01; export const PRECISION = 0.01;
export const VERSION = '0.0.18'; export const VERSION = '0.0.18';
export const LOCAL_STORAGE_KEY = 'PRINTER_SETTINGS'; export const LOCAL_STORAGE_KEY = 'PRINTER_SETTINGS';
export const MIN_AREA = 25; export const MIN_AREA = 10;
export const Z_OFFSET = 0.3; export const Z_OFFSET = 0.3;

View File

@ -11,9 +11,9 @@ export default function shapesToSlices(shapes, settings) {
fillShapes = new Shape(fillShapes, true, true, true, true) fillShapes = new Shape(fillShapes, true, true, true, true)
.fixOrientation() .fixOrientation()
.thresholdArea(MIN_AREA / Math.pow(PRECISION, 2))
.simplify('pftNonZero') .simplify('pftNonZero')
.clean(1) .clean(1)
.thresholdArea(MIN_AREA / Math.pow(PRECISION, 2))
.seperateShapes(); .seperateShapes();
lineShapesClosed = new Shape(lineShapesClosed, true, true, true, true) lineShapesClosed = new Shape(lineShapesClosed, true, true, true, true)