mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-12-23 03:23:48 +01:00
normalize cleanDelta with precision
This commit is contained in:
parent
ff9ef8690a
commit
1ec4f55c4b
@ -1,7 +1,9 @@
|
||||
import Shape from 'Doodle3D/clipper-js';
|
||||
import Slice from '../Slice.js';
|
||||
|
||||
import { CLEAN_DELTA } from '../constants.js';
|
||||
import { CLEAN_DELTA, PRECISION } from '../constants.js';
|
||||
|
||||
const cleanDelta = CLEAN_DELTA / PRECISION;
|
||||
|
||||
export default function shapesToSlices(shapes, settings) {
|
||||
const sliceLayers = [];
|
||||
@ -12,11 +14,11 @@ export default function shapesToSlices(shapes, settings) {
|
||||
closedShapes = new Shape(closedShapes, true, true, true, true)
|
||||
.fixOrientation()
|
||||
.simplify('pftNonZero')
|
||||
.clean(CLEAN_DELTA)
|
||||
.clean(cleanDelta)
|
||||
.seperateShapes();
|
||||
|
||||
openShapes = new Shape(openShapes, false, true, true, true)
|
||||
.clean(CLEAN_DELTA);
|
||||
.clean(cleanDelta);
|
||||
|
||||
const slice = new Slice();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user