Git Product home page Git Product logo

dietzm / gcodeinfo Goto Github PK

View Code? Open in Web Editor NEW
46.0 9.0 20.0 718 KB

This is a small command line tool to analyse gcodes (control codes for 3D printers, CNC,...). 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 ... I used it to optimize my slicer settings and print times for my reprap printer. Tested mostly with slic3r generated gcodes.

Home Page: http://gcodesim.dietzm.de

Java 100.00%

gcodeinfo's Introduction

GCodeInfo

This is a small command line tool to analyse gcodes (control codes for 3D printers, CNC,...). 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 ...

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

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) Example: Show Model Info and Printed Layers GcodeUtil mp /tmp/object.gcode Show All Info GcodeUtil mlpnsc /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.11sec 0.01% Speed 19.0 Time:11.41sec 0.8% Speed 20.0 Time:0.02sec 0.0% Speed 21.0 Time:32.45sec 2.26% Speed 26.0 Time:0.94sec 0.07% Speed 27.0 Time:149.92sec 10.46% Speed 29.0 Time:1.92sec 0.13% Speed 30.0 Time:0.13sec 0.01% Speed 50.0 Time:14.01sec 0.98% Speed 60.0 Time:49.58sec 3.46% Speed 63.0 Time:142.19sec 9.92% Speed 70.0 Time:242.72sec 16.93% Speed 74.0 Time:0.3sec 0.02% Speed 76.0 Time:0.38sec 0.03% Speed 79.0 Time:2.01sec 0.14% Speed 80.0 Time:80.88sec 5.64% Speed 90.0 Time:596.4sec 41.61% Speed 97.0 Time:7.18sec 0.5% Speed 100.0 Time:7.57sec 0.53% Speed 105.0 Time:0.01sec 0.0% Speed 110.0 Time:47.13sec 3.29% Speed 130.0 Time:12.79sec 0.89%

Gcode Analyse Time: 00:00:01

Example Output for Layer Summary: ---------- Printed Layer Summary ------------ #2 Height: 0.2mm/0.2mm Temp:195.0°/58.0° Avg.Speed(Print): 45.78mm/s Time: 56.32sec 12.52% #3 Height: 0.6mm/0.4mm Temp:185.0°/60.0° Avg.Speed(Print): 98.01mm/s Time: 36.85sec 8.19% #4 Height: 1.0mm/0.4mm Temp:185.0°/60.0° Avg.Speed(Print): 87.07mm/s Time: 17.91sec 3.98% #5 Height: 1.4mm/0.4mm Temp:185.0°/60.0° Avg.Speed(Print): 87.42mm/s Time: 17.83sec 3.96% #6 Height: 1.8mm/0.4mm Temp:185.0°/60.0° Avg.Speed(Print): 86.51mm/s Time: 17.73sec 3.94% #7 Height: 2.2mm/0.4mm Temp:185.0°/60.0° Avg.Speed(Print): 86.57mm/s Time: 17.76sec 3.95% #8 Height: 2.6mm/0.4mm Temp:185.0°/60.0° Avg.Speed(Print): 87.54mm/s Time: 17.77sec 3.95% #9 Height: 3.0mm/0.4mm Temp:185.0°/60.0° Avg.Speed(Print): 87.1mm/s Time: 17.59sec 3.91% #10 Height: 3.4mm/0.4mm Temp:185.0°/60.0° Avg.Speed(Print): 86.6mm/s Time: 17.6sec 3.91% #11 Height: 3.8mm/0.4mm Temp:185.0°/60.0° Avg.Speed(Print): 87.45mm/s Time: 17.57sec 3.9% #12 Height: 4.2mm/0.4mm Temp:185.0°/60.0° Avg.Speed(Print): 86.54mm/s Time: 17.58sec 3.91% #13 Height: 4.6mm/0.4mm Temp:185.0°/60.0° Avg.Speed(Print): 87.48mm/s Time: 17.8sec 3.96% #14 Height: 5.0mm/0.4mm Temp:185.0°/60.0° Avg.Speed(Print): 86.64mm/s Time: 17.53sec 3.9% #15 Height: 5.4mm/0.4mm Temp:185.0°/60.0° Avg.Speed(Print): 86.66mm/s Time: 17.64sec 3.92% #16 Height: 5.8mm/0.4mm Temp:185.0°/60.0° Avg.Speed(Print): 86.58mm/s Time: 17.55sec 3.9% #17 Height: 6.2mm/0.4mm Temp:185.0°/60.0° Avg.Speed(Print): 86.54mm/s Time: 17.65sec 3.92% #18 Height: 6.6mm/0.4mm Temp:185.0°/60.0° Avg.Speed(Print): 86.56mm/s Time: 17.68sec 3.93% #19 Height: 7.0mm/0.4mm Temp:185.0°/60.0° Avg.Speed(Print): 86.56mm/s Time: 17.61sec 3.91% #20 Height: 7.4mm/0.4mm Temp:185.0°/60.0° Avg.Speed(Print): 97.55mm/s Time: 36.65sec 8.14% #21 Height: 7.8mm/0.4mm Temp:185.0°/60.0° Avg.Speed(Print): 98.55mm/s Time: 36.68sec 8.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.

gcodeinfo's People

Contributors

dietzm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gcodeinfo's Issues

Z-axis endstop crash

Hi, I'm running simulator free with a Mendel90 printer and I have a problem where the Z-axis will move up past the endstop, causing damage to the Z-axis bracket. This does not happen when using the move buttons using pronterface. Any idea why the endstop signal would be ignored when controlling the printer via Gcodesimulator? Is this is bug or a configuration issue? Thanks!

Problem with large files

Hi,

Thanks for a very nice app. I love it.

I'm running your app on a small Denver Pad, I have around 50k mem to use when I have loaded the App.
I loaded a G-code file with 222414 lines of G-code. The first 50% goes fast and then it slows down alot. But the file loaded into mem.
How ever, 2 hours into the print, the Pad crashed.
I was wondering if it was possible to read the G-code 10 - 50 lines at a time from the disk, instead of loading it all into mem at once.
I have also tried to load larger files, but they error out at line 270001 for some reason.

Kind regards,
Vendorf

Filetypes on Mac

On a Mac all of the files are greyed out when I try to Load File. I've tried .txt and .gcode extensions, but neither work.

Could GCodeInfo add support for MakerBot gcode files?

I tried using a gcode file generated with MakerWare (using Miracle Grue as the slicer) but GCodeInfo stopped with this error:
Unknown Gcode 1: M136 (ENABLE BU....
Unknown Gcode 2: M73 P0....
Unknown Gcode 3: G162 X Y F2000(....
Unknown Gcode 4: G161 Z F900(HOM....
Exception in thread "main" java.lang.NumberFormatException: empty String
at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
at java.lang.Float.parseFloat(Unknown Source)
at de.dietzm.GCode.parseSegment(GCode.java:539)
at de.dietzm.GCode.parseGcode(GCode.java:432)
at de.dietzm.Model.loadModel(Model.java:489)
at de.dietzm.Model.loadModel(Model.java:476)
at de.dietzm.GCodeUtil.main(GCodeUtil.java:51)

I assume this is because MBI has modified some of the commands used in a standard gcode file but I was hoping support for this could be added.

The overall time estimates may appear in the incorrect order.

I just ran a few of my gcode files through GCodeInfo and the Overall Time estimates don't seem to match up.
The output for one such job is as follows:
Overall Time (w/o Acceleration): 0:14:56 (895.73sec)
Overall Time (w/ Acceleration): 0:17:09 (1028.5654sec)

Should the "w/o acceleration" time be 0:17:09 instead of 0:14:56?

İs the app dead?

Hi,
is the App dead?
I cant find any Help anywhere G+ is not available anymore...

GCodeInfoV99.jar

GCodeInfoV99.jar produces the following errors. Is it due to a Java update?

C:\Users\¿>"C:\Program Files\Java\jdk1.8.0_77\jre\bin\java.exe" -jar "c:/xampp/h
tdocs/GCodeInfoV99.jar" m "c:/xampp/htdocs/gCodeOutput/cube.stl.gcode" 2>&1
Load Model started
Parse GCODE GCDEF Exception:java.lang.IllegalArgumentException: No enum constant
de.dietzm.Constants.GCDEF.M542
Unknown Gcode 179: UNKNOWN M542 ....
Parse GCODE GCDEF Exception:java.lang.IllegalArgumentException: No enum constant
de.dietzm.Constants.GCDEF.M551
Unknown Gcode 180: UNKNOWN M551 P32000 S900....
Parse GCODE GCDEF Exception:java.lang.IllegalArgumentException: No enum constant
de.dietzm.Constants.GCDEF.M543
Unknown Gcode 181: UNKNOWN M543 ....
Parse GCODE GCDEF Exception:java.lang.IllegalArgumentException: No enum constant
de.dietzm.Constants.GCDEF.M542
Unknown Gcode 315: UNKNOWN M542 ....
Parse GCODE GCDEF Exception:java.lang.IllegalArgumentException: No enum constant
de.dietzm.Constants.GCDEF.M551
Unknown Gcode 316: UNKNOWN M551 P32000 S900....
Parse GCODE GCDEF Exception:java.lang.IllegalArgumentException: No enum constant
de.dietzm.Constants.GCDEF.M543
Unknown Gcode 317: UNKNOWN M543 ....
Load Model finished in ms:63
Detected 6 error(s) during parsing of Gcode file. Results might be wrong.


****************************** Model Details ******************************


Filename: c:/xampp/htdocs/gCodeOutput/cube.stl.gcode
Layers visited: 75
Layers printed: 73
Avg.Layerheight: 0.35mm
Size: 24.54mm x 24.54mm H26.05mm
Position on bed: -11.27/13.27mm x -11.27/13.27mm H26.05mm
XY Distance: 34123.27mm
Extrusion: 0.0mm
Bed Temperatur: 0.0°
Ext Temperatur: 250.07°
Avg.Speed(All): 68.09mm/s
Avg.Speed(Print): 29.96mm/s
Avg.Speed(Travel): 103.7mm/s
Max.Speed(Print): 52.5mm/s
Min.Speed(Print): 10.0mm/s
Gcode Lines: 24227
Overall Time (w/o Acceleration): 0:25:04 (1503.74sec)
Overall Time (w/ Acceleration): 0:25:28 (1527.9677sec)
Material(guessed):ABS 3.0mm
Mass: 0.0cm3
Weight: 0.0g
Price: 0.0?

Gcode Analyse Time: 0:00:00 Load time:0:00:00

wire melting 3d printer

HI!

First thank you for your product it seems from first point that it's exactly what I need.
I want to attach laser wire melting assembly on 3d printer. There is a need to control additional stepper motor, and I hope you can get the control possibility through your SW - GCODE simulator and printer.
For more info how assembly should work check this topic on metalbot forum:

http://www.metalbot.org/forum/viewtopic.php?f=8&t=263

I would appreciate few starting tips on required changes of source code to accomplish this mission. :)

thanks and regards
Zhivko

Problems connecting to CH340 arduino mega 2560

Hi,
I'd like to use your software for my printers (I'm a manufacturer) but unfortunately the device will not connect. I'm connecting via USB-OTG and have tried 4 different tablets now. Not many seem to have OTG support for CH340, however the Aoson M751S does. 3D Fox software works well, but has left out too many important features. I'd love to give your software a chance, but unfortunately it will not connect. The tablet fails to connect after a window pops requesting permission to access the USB device. The device is discovered. The same hardware and software works if the arduino has the atmel comm chip instead of CH340.
Thanks,
Jared

Is there a way to set the material and prices as an argument?

GCodeInfo is making a guess that the material used in my gcode files is ABS but I'm using PLA which weighs slightly more thus the estimates for the weights a off by a little bit. I would be nice to be able to set the value of this to force another material.
Also, can the price per unit be set as an argument as well so that I can specify my cost / unit of material?

M101/M113 Gcodes caused model load failure

Not supported Gcode:M101
Not supported Gcode:M103
Not supported Gcode:M101
Not supported Gcode:M103
Not supported Gcode:M101
Not supported Gcode:M103
Not supported Gcode:M101
Not supported Gcode:M103
Not supported Gcode:M101
Not supported Gcode:M103
Not supported Gcode:M103
Not supported Gcode:M113
Detected 84 error(s) during parsing of Gcode file. Results might be wrong.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.