Make something
Email yourself a 10% off coupon
Send
Coupon sent! Check your email
This will be 3D printed near you and delivered to your door by May 02
Loading

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

Filament Length/Weight/Volume Estimator for 4d G-Code
Please wait while we prepare the order
$ 0.00 + free delivery
Sorry we had trouble getting the 3D files. Download them yourself and upload them here to place an order.
View files
  • 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 02
  • 0 parts
Delivery address
This field is required.
This field is required.
Please enter a valid email.
This field is required.
This field is required.
This field is required.
This field is required.
This field is required.
Pay with credit card or debit card
or pay with
Place order
Order summary
Filament Length/Weight/Volume Estimator for 4d G-Code
Color:
Quantity:
Subtotal
$
Delivery (May 01 - May 03)
Free
Total
$