...
Code Block | ||
---|---|---|
| ||
let maxVolume = 380 * 284 * 380; // dimensions of the printer let materialCost = 60; // euro/kg let density = 1.02; // g/cm^3 let machineRate = 50; // euro/hour let maxPrintTime = 14; // printing time of a full building chamber let margin = 5; // total price is multiplied with margin // Price calculation let material = model.volume * materialCost * density * 0.000001; let time = ((model.machine_volume * maxPrintTime) / maxVolume) * machineRate; let price = margin * (material + time * machineRate); // Last line must contain final price price; |
...