rename infill density to density

This commit is contained in:
casperlamboo 2018-01-24 12:39:56 +01:00
parent 7906bfe43d
commit 5b934f0e71

View File

@ -5,7 +5,7 @@ import Shape from 'clipper-js';
export default function generateInfills(slices, settings) {
let {
layerHeight,
innerInfill: { density: infillDensity },
innerInfill: { density },
thickness: {
top: topThickness,
bottom: bottomThickness
@ -13,11 +13,11 @@ export default function generateInfills(slices, settings) {
nozzleDiameter
} = settings;
infillDensity /= 100;
density /= 100;
nozzleDiameter /= PRECISION;
const bidirectionalInfill = infillDensity < 0.8;
const infillGridSize = nozzleDiameter * (bidirectionalInfill ? 2 : 1) / infillDensity;
const bidirectionalInfill = density < 0.8;
const infillGridSize = nozzleDiameter * (bidirectionalInfill ? 2 : 1) / density;
const bottomSkinCount = Math.ceil(bottomThickness / layerHeight);
const topSkinCount = Math.ceil(topThickness / layerHeight);