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