imrahil / OctoPrint-PrintHistory

Plugin for OctoPrint - saves filename, print time and filament usage for each print
GNU Affero General Public License v3.0
64 stars 64 forks source link

[REQUEST] Add cost per print #11

Closed bolsoncerrado closed 9 years ago

bolsoncerrado commented 9 years ago

Ideally we should be able to set up an associated "price per material/spool" for each print file, but if at first stage it's too much, just set up an "average price per spool" field and calculate price per print accordingly?

imrahil commented 9 years ago

Duplicate of #7

juliendorra commented 8 years ago

Cost per print should be added to history in conjunction with / from the Cost Estimator plugin http://plugins.octoprint.org/plugins/cost/ which already has a rough calculation. Then the calculation itself should be made better in the Cost Estimator plugin and that would transparently make the History plugin better. @imrahil could you reopen this issue ? @jasiek would you have any hints on how to get the data from the Cost Estimator?

jasiek commented 8 years ago

The cost estimator calculates the cost, prior to printing, on the frontend - using JS and a few data structures from Octoprint. I reckon you can just reimplement that in python in your code and you'll be good to go. My implementation is a bit of a hack anyway. ;)