format settings deconstructing

This commit is contained in:
casperlamboo 2017-07-19 11:04:13 +02:00
parent 3b4dbc0d4a
commit fdbb1469ee
3 changed files with 12 additions and 3 deletions

View File

@ -8,7 +8,9 @@ const offsetOptions = {
};
export default function addBrim(slices, settings) {
let { brim: { offset: brimOffset } } = settings;
let {
brim: { offset: brimOffset }
} = settings;
brimOffset /= PRECISION;
const [firstLayer] = slices;

View File

@ -1,7 +1,10 @@
import * as THREE from 'three';
export default function calculateLayersIntersections(lines, settings) {
const { layerHeight, dimensions: { z: dimensionsZ } } = settings;
const {
layerHeight,
dimensions: { z: dimensionsZ }
} = settings;
const numLayers = Math.floor(dimensionsZ / layerHeight);

View File

@ -9,7 +9,11 @@ const offsetOptions = {
export default function generateInnerLines(slices, settings) {
// need to scale up everything because of clipper rounding errors
let { layerHeight, nozzleDiameter, shell: { thickness: shellThickness } } = settings;
let {
layerHeight,
nozzleDiameter,
shell: { thickness: shellThickness }
} = settings;
nozzleDiameter /= PRECISION;
shellThickness /= PRECISION;
const nozzleRadius = nozzleDiameter / 2;