rename percentage to density

This commit is contained in:
casperlamboo 2018-01-18 16:32:54 +01:00
parent 485f741077
commit f28722aec5
4 changed files with 10 additions and 10 deletions

View File

@ -156,7 +156,7 @@ class Settings extends React.Component {
case 'settings.innerShell.flowRate':
case 'settings.outerShell.speed':
case 'settings.outerShell.flowRate':
case 'settings.innerInfill.precentage':
case 'settings.innerInfill.density':
case 'settings.innerInfill.speed':
case 'settings.innerInfill.flowRate':
case 'settings.outerInfill.speed':
@ -367,7 +367,7 @@ class Settings extends React.Component {
<NumberField name="settings.outerShell.speed" min={10} max={200} fullWidth floatingLabelText="Speed" />
<NumberField name="settings.outerShell.flowRate" min={0.1} max={4} fullWidth floatingLabelText="Flow rate" />
<p>Inner infill</p>
<NumberField name="settings.innerInfill.precentage" min={0} max={100} fullWidth floatingLabelText="Percentage" />
<NumberField name="settings.innerInfill.density" min={0} max={100} fullWidth floatingLabelText="Density" />
<NumberField name="settings.innerInfill.speed" min={10} max={200} fullWidth floatingLabelText="Speed" />
<NumberField name="settings.innerInfill.flowRate" min={0.1} max={4} fullWidth floatingLabelText="Flow rate" />
<p>Outer infill</p>

View File

@ -38,7 +38,7 @@ outerShell:
innerInfill:
flowRate: 1.0
speed: 80.0
precentage: 20.0
density: 20.0
outerInfill:
flowRate: 1.0
speed: 50.0

View File

@ -15,7 +15,7 @@ low:
speed: 70.0
innerInfill:
speed: 80.0
precentage: 10.0
density: 10.0
medium:
title: "Medium"
layerHeight: .15
@ -33,7 +33,7 @@ medium:
speed: 40.0
innerInfill:
speed: 80.0
precentage: 10.0
density: 10.0
high:
title: "High"
thickness:
@ -51,4 +51,4 @@ high:
speed: 30.0
innerInfill:
speed: 70.0
precentage: 20.0
density: 20.0

View File

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