jasiek / OctoPrint-Cost

Cost-estimation plugin for OctoPrint
10 stars 12 forks source link

Cost field support math formula request #1

Open gddeen opened 8 years ago

gddeen commented 8 years ago

I would like to put a 'formula' in the cost per meter field. I know a roll costs 32.95 for 800 meters. So I'd like to input (32.95/800.0)

Or, I can calculate using the measured weight of a meter (which is better).
A roll costs 32.95 for 2.2 kg. Each meter weight 2.75 grams. So ( 32.95 / 2.2kg (total weight) ) * .00275 (weight/meter).

(32.95/2.2*.00275)

Now, the "real" request should be I know the cost of each roll and the weight. Can you provide support for that. (You might implement it by having a selector for different screens to calculate reported costs...) IE.

[+] Add Another Cost Description __________________ Cost Calculation <flat rate,per hour rate,shipping rate by zip,length rate by meter,by kg,after print completes flat rate>

Calculation Costs Setup 1.00 <delete> Hours 7.00 7 @ 1.0 <delete> Shipping 3.24 32720 3.24 <delete> Filament 6.21 0.14 @ 44.32 <delete> Cleanup at end <delete>

Pinaute commented 7 years ago

Hi @gddeen

Now, the "real" request should be I know the cost of each roll and the weight. Can you provide support for that.

I have the same need. I currently working on the feature.

Pinaute commented 7 years ago

The feature is developed. I did a pull request.