Code: Select all
e:\Dev\eclipse-workspace\gcodestat>gcodestat.exe -g samples\test.gcode -o samples\test-gs.gcode -s 10
gcodestat v0.1
Starting with parameters:
acceleration: 100.000000 mm/sec/sec
junction deviation: 0.020000
x max speed: 100000.000000 mm/min
y max speed: 100000.000000 mm/min
z max speed: 100000.000000 mm/min
retraction time: 0.000000 sec
prime time: 0.000000 sec
speed override: 1.000000
absolute movement: yes
absolute extrusion: yes
metering unit: mm
Total time: ( 03:40:25 )
e:\Dev\eclipse-workspace\gcodestat>diff samples\test.gcode samples\test-gs.gcode
0a1
> M117 100% Remaining ( 03:40:25 )
2057a2059
> M117 90% Remaining ( 03:18:15 )
2567a2570
> M117 80% Remaining ( 02:56:15 )
5507a5511
> M117 70% Remaining ( 02:34:12 )
11140a11145
> M117 60% Remaining ( 02:12:14 )
18726a18732
> M117 50% Remaining ( 01:50:12 )
25905a25912
> M117 40% Remaining ( 01:28:09 )
34882a34890
> M117 30% Remaining ( 01:06:06 )
46163a46172
> M117 20% Remaining ( 44:04 )
61768a61778
> M117 10% Remaining ( 22:02 )
e:\Dev\eclipse-workspace\gcodestat>
I modified gcodestat to add M117 codes into the g-code. The frequency of the M117 commands is controlled by -s or --percent_step value so -s 10 will give you 100%, 90%, 80% ... codes, if you go with -s 1 you will get 100%, 99%, 98%... (default is 10)
-o parameter selects where you want to save the new, modified file (if -o or --output are omitted the M117 will not be added and no new file will be generated, only the time will be calculated and displayed)
-q will prevent anytyhing being displayed on the screen (except for errors, those will be sent to stderr)
use -? to get all parameters
source available on github:
https://github.com/arhi/gcodestat
exe for windows attached
example s3d "additional terminal commands for post processing"
Code: Select all
{REPLACE "; outer perimeter\n" "; outer perimeter\nM204 S400\n"}
{REPLACE "; inner perimeter\n" "; inner perimeter\nM204 S800\n"}
{REPLACE "; solid layer\n" "; solid layer\nM204 S1000\n"}
{REPLACE "; infill\n" "; infill\nM204 S1000\n"}
E:\Dev\eclipse-workspace\gcodestat\gs.bat "[output_filepath]"
E:\bin\curl-7.50.3-win64-mingw\bin\curl.exe -H "X-Api-Key: yourapikey" -F "select=false" -F "print=false" -F "file=@M117_[output_filepath]" "http://youroctoprintip/api/files/local"