
This is a quick perl script to scan through a gcode file and figure out how much filament will be required. It reads all of the "E" moves and adds them up each time they get reset to 0. This will only work with absolute moves, not relative moves.I did a 5 hour print and weighed it. The script said it should way 48.167 g. My kitchen scale said it weight 50 g. Pretty good!After downloading this script you may have to make it executable (chmod gou+x filament_length.pl)To use it just pipe the gcode file through the perl script:cat mygcodefile.gcode | ./filament_length.pl(replace the ./ with whatever the path is to the script)or, you can specify the file on the command line like this:./filament_length.pl -f filename.gcodeyou can also specify the density (in g/cc) and size of the filament (in mm)./filament_length.pl -d 1.25 -s 2.75 -f filename.gcodeYou can include or omit any of the command switches you like, it reads from stdin if you omit the filename and a density of 1.05 and diameter of 1.75 if you omit them. The density of ABS is around 1.05 g/cc, PLA should be around 1.25 g/ccIt will produce a report like the following: Cross sectional area of filament: 0.0240527984375 cm^2macbookpro:~ jag$ ./filament_length.pl -d 1.25 -f ~/Dropbox/repg\ files/Dreidel03.gcode Filament diameter is 1.75 mm Filament density is 1.25 g/cc Cross sectional area of filament: 0.0240527984375 cm^2Total filament: 738.936 cm Volume: 17.773 cc Weight: 22.217 g
- 0 inches x 0 inches x 0 inches
- this product is 3D printed
- 16 available colors
- material is a strong plastic
- free delivery by May 05
- 0 parts
