hudbrog / gCodeViewer

a visual web based gcode analyzer
Other
421 stars 150 forks source link

Request: Running total of filament mm used #21

Open PxT opened 10 years ago

PxT commented 10 years ago

Hi, it would be nice to display a running total of the filament used as you scroll through the layers.

I wanted to make a two-color print that changed at a particular layer so I needed to know how long to cut the first filament piece so I could I join it to the second one. I had to add up each layer by hand to work it out but if the output included a running total it would be very easy.

Thanks.

kisolre commented 7 years ago

And again years later +1 to that :) Will try to hack something localy but probably wont be nice (first time JS try).

kisolre commented 7 years ago

So my quick hack worked - just created an array and filled it with "totalFilament" variable... But since as I understand the script calculates all moves at given Z height as one layer and my file has a Zhop of 5mm at the begining (to wait for the nozzle to heat and remove any oozed filament) totalFilament calculates that as if the whole 5mm layer was printer first. Altho there is "sort layers by Z" option it probably affects displaying them but not the initial analysis. I will use it as it is now but a proper implementation will be apreciated :)

DeanStuff commented 5 years ago

Hello, I've just gotten into 3d printing and found myself needing a way to see how much filament was used at a certain layer to. This tool is awesome, but this feature didn't exist nor does it in Cura.

I'm not sure if the authors are taking any contributions. But if they are, I added my changes that helped me using their code in a standalone web server. I added it to a pull request: https://github.com/hudbrog/gCodeViewer/pull/76. It's a minor change to the ui.js file.