mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-26 07:24:57 +01:00
Always clean with clean delta 1
Making constant clean delta obsolete because it is already implied by the const precision
This commit is contained in:
parent
8db1feecb4
commit
8ea613e36e
@ -1,2 +1 @@
|
|||||||
export const CLEAN_DELTA = 0.05;
|
|
||||||
export const PRECISION = 0.01;
|
export const PRECISION = 0.01;
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
import Shape from 'clipper-js';
|
import Shape from 'clipper-js';
|
||||||
import Slice from './helpers/Slice.js';
|
import Slice from './helpers/Slice.js';
|
||||||
|
|
||||||
import { CLEAN_DELTA, PRECISION } from '../constants.js';
|
import { PRECISION } from '../constants.js';
|
||||||
|
|
||||||
const cleanDelta = CLEAN_DELTA / PRECISION;
|
|
||||||
|
|
||||||
export default function shapesToSlices(shapes, settings) {
|
export default function shapesToSlices(shapes, settings) {
|
||||||
const sliceLayers = [];
|
const sliceLayers = [];
|
||||||
@ -14,14 +12,14 @@ export default function shapesToSlices(shapes, settings) {
|
|||||||
fillShapes = new Shape(fillShapes, true, true, true, true)
|
fillShapes = new Shape(fillShapes, true, true, true, true)
|
||||||
.fixOrientation()
|
.fixOrientation()
|
||||||
.simplify('pftNonZero')
|
.simplify('pftNonZero')
|
||||||
.clean(cleanDelta)
|
.clean(1)
|
||||||
.seperateShapes();
|
.seperateShapes();
|
||||||
|
|
||||||
lineShapesClosed = new Shape(lineShapesClosed, true, true, true, true)
|
lineShapesClosed = new Shape(lineShapesClosed, true, true, true, true)
|
||||||
.clean(cleanDelta);
|
.clean(1);
|
||||||
|
|
||||||
lineShapesOpen = new Shape(lineShapesOpen, false, true, true, true)
|
lineShapesOpen = new Shape(lineShapesOpen, false, true, true, true)
|
||||||
.clean(cleanDelta);
|
.clean(1);
|
||||||
|
|
||||||
const slice = new Slice();
|
const slice = new Slice();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user