GCodeInfo

Created by mdietz, source
  3D view
3D Compare
gcodeprintr
created 09/06/14 21:09


Download shape

This is a small command line tool to analyse gcodes. It calculates various print details like
-print time
-used filament
-yx move distance
-print object dimension
-average print speeds
-number of layers
-layer details
-speed distribution
-weight and price of the printed object
...
**** UPDATE 0.98 Now with edit mode (experimental) ******
Change the print speed by percent
Change the extrusion rate by percent
Change the Layerheight by percent (+increase extrusion)
Modify extruder temperatur (only update existing gcodes)
Modify bed temperatur (only update existing gcodes)
Add Offset to Z position (requires layer option 'all'
Add Offset to X position (requires layer option 'all'
Add Offset to Y position (requires layer option 'all'
Modify Fan options 0=off, 255=full (only update existing gcodes)
Delete the specified layers



I used it to optimize my slicer settings and print times for my reprap printer.
Tested mostly with slic3r generated gcodes.


User Prints

If you printed this shape, share it!

I printed this!

Instructions

Source Code now available at Github: github.com/dietzm/GCodeInfo
**** UPDATE 0.98 Now with edit mode (experimental!)******
Change the print speed by percent
Change the extrusion rate by percent
Change the Layerheight by percent (+increase extrusion)
Modify extruder temperatur (only update existing gcodes)
Modify bed temperatur (only update existing gcodes)
Add Offset to Z position (requires layer option 'all'
Add Offset to X position (requires layer option 'all'
Add Offset to Y position (requires layer option 'all'
Modify Fan options 0=off, 255=full (only update existing gcodes)
Delete the specified layers

***UPDATE V0.95 Version****
Added guessed info about print material and diameter
Added info about mass and weight (based on guessed material info)
Added info about price (based on guessed material info + default price per kg=30)
Ability to specify environment variables to overwrite diameter and price per kg (FILAMENT_DIAMETER, FILAMENT_PRICE_KG)
(Guessing of PLA or ABS is based on temperature, Diameter guessing based slicer comments or rough guess assuming WOT=~2) .
Fixed some issues with Skeinforge comments and average calulations.

***UPDATE V0.94 Version****
Added support for Java 1.6 (MacOS)

***UPDATE V0.93 Version****
Fixed issues with Z-Lift and negative coordinates.
Added "position on print bed" to model details.
Show gcode load time and analyse time.
Added undodumented option "g" for debugging (print gcode details)



Start the java program by calling on the command line (Java 1.7.x required)


java -jar GCodeInfo.jar [mplnscg] gcode_file

GcodeUtil 0.91
Usage: GcodeUtil [mode m|p|n] gcodefile [
Modes:
m = Show Model Info
l = Show Layer Summary
p = Show Printed Layer Detail Info
n = Show Non-Printed Layer Detail Info
s = Show Printing Speed Details Info
c = Show embedded comments (e.g. from slicer)
Edit Mode Usage: GcodeUtil [editmode e] [option] [layers] gcodefile
e speed=-10 = Reduce Speed by 10 percent
e extr=10 = Increase extrusion rate by 10 percent
e layerh=10 = Increase Layerheight by 10 percent (+increase extrusion)
e exttemp=170.3 = Set extruder temperatur to 170.3 (only update existing gcodes)
e bedtemp=50.3 = Set bed temperatur to 50.3 (only update existing gcodes)
e zoffset=0.1 = Add Offset to Z position (requires layer option 'all'
e xoffset=0.1 = Add Offset to X position (requires layer option 'all'
e yoffset=0.1 = Add Offset to Y position (requires layer option 'all'
e fan=255 = Set Fan 0=off, 255=full (only update existing gcodes)
e delete = Delete the specified layers
[layers] = comma separated list of layers or 'all' for all

Example:
Show Model Info and Printed Layers
GcodeUtil mp /tmp/object.gcode
Show All Info
GcodeUtil mlpnsc /tmp/object.gcode
Edit Model, increase 1-3 layer speed by 25%
GcodeUtil e speed=25 1,2,3 /tmp/object.gcode
Edit Model, disable fan for all layers
GcodeUtil e fan=0 all /tmp/object.gcode
Example output for model details with speed distribution:
***************************************************************************
****************************** Model Details ******************************
***************************************************************************
Filename: ../MadeAlready/chichen-itza_pyramid.gcode
Layers visited: 73
Layers printed: 71
Avg.Layerheight: 0.4mm
Size:





76.42mm x 80.57mm H28.8mm
XY Distance:

103305.76mm
Extrusion:

2823.27mm
Bed Temperatur: 60.0
Ext Temperatur: 185.0
Extrusion:

2823.27mm
Avg.Speed(All):

81.22mm/s
Avg.Speed(Print): 80.34mm/s
Avg.Speed(Travel): 91.83mm/s
Max.Speed(Print): 110.0mm/s
Min.Speed(Print): 9.0mm/s
Gcode Lines:

15830
Overall Time:

00:23:53 (1433.39sec)
---------- Model Speed Distribution ------------
Speed 9.0 Time:0.11sec0.01%
Speed 19.0 Time:11.41sec0.8%
Speed 20.0 Time:0.02sec0.0%
Speed 21.0 Time:32.45sec2.26%
Speed 26.0 Time:0.94sec0.07%
Speed 27.0 Time:149.92sec10.46%
Speed 29.0 Time:1.92sec0.13%
Speed 30.0 Time:0.13sec0.01%
Speed 50.0 Time:14.01sec0.98%
Speed 60.0 Time:49.58sec3.46%
Speed 63.0 Time:142.19sec9.92%
Speed 70.0 Time:242.72sec16.93%
Speed 74.0 Time:0.3sec0.02%
Speed 76.0 Time:0.38sec0.03%
Speed 79.0 Time:2.01sec0.14%
Speed 80.0 Time:80.88sec5.64%
Speed 90.0 Time:596.4sec41.61%
Speed 97.0 Time:7.18sec0.5%
Speed 100.0 Time:7.57sec0.53%
Speed 105.0 Time:0.01sec0.0%
Speed 110.0 Time:47.13sec3.29%
Speed 130.0 Time:12.79sec0.89%

Gcode Analyse Time: 00:00:01

Example Output for Layer Summary:
---------- Printed Layer Summary ------------
#2Height: 0.2mm/0.2mmTemp:195.0/58.0Avg.Speed(Print): 45.78mm/sTime: 56.32sec12.52%
#3Height: 0.6mm/0.4mmTemp:185.0/60.0Avg.Speed(Print): 98.01mm/sTime: 36.85sec8.19%
#4Height: 1.0mm/0.4mmTemp:185.0/60.0Avg.Speed(Print): 87.07mm/sTime: 17.91sec3.98%
#5Height: 1.4mm/0.4mmTemp:185.0/60.0Avg.Speed(Print): 87.42mm/sTime: 17.83sec3.96%
#6Height: 1.8mm/0.4mmTemp:185.0/60.0Avg.Speed(Print): 86.51mm/sTime: 17.73sec3.94%
#7Height: 2.2mm/0.4mmTemp:185.0/60.0Avg.Speed(Print): 86.57mm/sTime: 17.76sec3.95%
#8Height: 2.6mm/0.4mmTemp:185.0/60.0Avg.Speed(Print): 87.54mm/sTime: 17.77sec3.95%
#9Height: 3.0mm/0.4mmTemp:185.0/60.0Avg.Speed(Print): 87.1mm/sTime: 17.59sec3.91%
#10Height: 3.4mm/0.4mmTemp:185.0/60.0Avg.Speed(Print): 86.6mm/sTime: 17.6sec3.91%
#11Height: 3.8mm/0.4mmTemp:185.0/60.0Avg.Speed(Print): 87.45mm/sTime: 17.57sec3.9%
#12Height: 4.2mm/0.4mmTemp:185.0/60.0Avg.Speed(Print): 86.54mm/sTime: 17.58sec3.91%
#13Height: 4.6mm/0.4mmTemp:185.0/60.0Avg.Speed(Print): 87.48mm/sTime: 17.8sec3.96%
#14Height: 5.0mm/0.4mmTemp:185.0/60.0Avg.Speed(Print): 86.64mm/sTime: 17.53sec3.9%
#15Height: 5.4mm/0.4mmTemp:185.0/60.0Avg.Speed(Print): 86.66mm/sTime: 17.64sec3.92%
#16Height: 5.8mm/0.4mmTemp:185.0/60.0Avg.Speed(Print): 86.58mm/sTime: 17.55sec3.9%
#17Height: 6.2mm/0.4mmTemp:185.0/60.0Avg.Speed(Print): 86.54mm/sTime: 17.65sec3.92%
#18Height: 6.6mm/0.4mmTemp:185.0/60.0Avg.Speed(Print): 86.56mm/sTime: 17.68sec3.93%
#19Height: 7.0mm/0.4mmTemp:185.0/60.0Avg.Speed(Print): 86.56mm/sTime: 17.61sec3.91%
#20Height: 7.4mm/0.4mmTemp:185.0/60.0Avg.Speed(Print): 97.55mm/sTime: 36.65sec8.14%
#21Height: 7.8mm/0.4mmTemp:185.0/60.0Avg.Speed(Print): 98.55mm/sTime: 36.68sec8.15%

Example output for Layer details
***************************************************************************
****************************** Layer Details ******************************
***************************************************************************
--------------------------------------------------
#2 Height: 0.2mm
LayerHeight: 0.2mm
Is Printed: true
Print Time: 00:00:56
Distance: 2712.23/534.93mm
Extrusion: 85.13mm
Bed Temperatur:58.0
Extruder Temperatur:195.0
Cooling Time (Fan): 0.06%
GCodes: 1395
GCode Linenr: 33
Dimension: 87.68mm x 64.97mm x0.2mm
Avg.Speed(All): 64.5mm/s
Avg.Speed(Print): 45.78mm/s
Avg.Speed(Travel): 140.73mm/s
Max.Speed(Print): 120.0mm/s
Min.Speed(Print): 33.0mm/s
Percent of time:12.52%

Tested mostly with slic3r generated gcodes.


Tags

Comments

You must be logged in to comment, log in now

Latest Changes

Jun 09, 2014

network map more

Forks

Be the first one to fork this shape Fork

Likes

License


GCodeInfo by gcodeprintr is licensed under the Creative Commons - Attribution license.

Print Tag

If you printed this shape, please give your attribution by print this tag

Shape Tag
  1. Welcome Tutorial - The shape page

    This is a shape page, a shape can contain one or more STL files as well as extra instructions helper files..
    Press Next to continue.

  2. This is the shape gallery. Like in many sites you can see a 3D view of this shape by clicking the "3D view" button. This button appears when an image is linked to an STL file.

  3. In case you missed it, this download button would let you download the shape.

  4. Here comes the magic of ShapeDo, lets start by forking this shape.
    Forking a shape creates a full copy of the shape in your account, one which you an edit and improve on.
    Try forking this shape!

  1. Welcome Tutorial - The shape page

    This is a shape page, a shape can contain one or more STL files as well as extra instructions helper files..
    Press Next to continue.

  2. This is the shape gallery. Like in many sites you can see a 3D view of this shape by clicking the "3D view" button. This button appears when an image is linked to an STL file.

  3. In case you missed it, this download button would let you download the shape.

  4. Here comes the magic of ShapeDo, lets start by forking this shape.
    Forking a shape creates a full copy of the shape in your account, one which you an edit and improve on.

  5. Note there are extra details calculated for the shape, such as volume and file size, useful for when you want to print.

  6. Shapes can have many revisions, here you can see the version count with the latest first. By clicking on the version you can see live what has been changed in the 3D viewer or download older versions.

  7. This box will show you the history of changes made on this shape.

  8. You can see a visual representation of the history by clicking on the "network map" link, the "network map" shows the entire fork and shape history, its a powerful tool finding the exact version you want, and seeking who has the latest changes. You can also view it by clicking on the 'forks' message at the top of the page

  9. This box will show the users who forked this shape. Forks can take shapes in unusual directions.

  10. Don't forget to upload your shapes and thanks for participating our tour. We can't wait to see what you will create!

  11. Your feedback is important, please take a minute to make us get better.

  1. Congratulations

    You have created your first fork, good job!
    You made your first important step.

    Lets continue our tour...

  2. This shape is yours, you can edit and update it in any way you want.

    You can get new changes from other users that forked the original shape by pulling from them. Using the arrow on the right of the edit button opens the pull action.

    When you make changes and want to contribute back to the origin, just use the merge request to create a request to the original author. They will get an e-mail that their shape has a request, they can comment on it in case a change needs to be made.

  3. You can see here where the shape was forked from and who will get the request.

  4. Note there are extra details calculated for the shape, such as volume and file size, useful for when you want to print.

  5. Shapes can have many revisions, here you can see the version count with the latest first. By clicking on the version you can see live what has been changed in the 3D viewer or download older versions.

  6. This box will show you the history of changes made on this shape.

  7. You can see a visual representation of the history by clicking on the "network map" link, the "network map" shows the entire fork and shape history, its a powerful tool finding the exact version you want, and seeking who has the latest changes. You can also view it by clicking on the 'forks' message at the top of the page

  8. This box will show the users who forked this shape. Forks can take shapes in unusual directions.

  9. Don't forget to upload your shapes and thanks for participating our tour. We can't wait to see what you will create!

  10. Your feedback is important, please take a minute to make us get better.