...
Code Block | ||
---|---|---|
| ||
let materialPrice = ; let materialDensity = ; let supportPrice = ; let supportDensity = ; let infill = ; let supportInfill = ; let wallThickness = ; let materialUsed = Math.max((model.volume - model.area*wallThickness)*infill, 0) + Math.min(model.area*wallThickness, model.volume); let totalMaterialPrice = (materialUsed*materialDensity*materialPrice + support.volume*supportPrice*supportDensity*supportInfill)*0.000001; |
Warning |
---|
Do To ensure a proper calculation, do not change the final two lines of code: let materialUsed = Math.max((model.volume - model.area*wallThickness)*infill, 0) + Math.min(model.area*wallThickness, model.volume); let totalMaterialPrice = (materialUsed*materialDensity*materialPrice + support.volume*supportPrice*supportDensity*supportInfill)*0.000001; |
...