-
Notifications
You must be signed in to change notification settings - Fork 16
/
commands.txt
229 lines (221 loc) · 13.3 KB
/
commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
usage: process_g_code.py [-h] -i filename [-o filename] [-umo] [-umi]
[--split filename line, layer, zheight, nth, or path) value]
[--inject filename (line, layer, zheight, nth, or path value]
[--merge filename [additional files ...]]
[--resume line, layer, or Zheight value]
[-f multiplier] [-t multiplier] [-j degrees]
[-n degrees] [--wait-temp none, first, or all]
[--wait-bed-temp none, first, or all] [-b multiplier]
[-k degrees layer] [-q fan_speed] [-g fan_speed]
[-w fan_speed temperaturedrop] [--filament mm]
[--quality quality_setting [quality_setting ...]]
[-d mm] [--movement abs or rel]
[--extrusion abs or rel] [--scalex x] [--scaley x]
[--scalez x] [--scaleall x] [-x mm] [-y mm] [-z mm]
[-X mm] [-Y mm] [-Z mm] [-r multiplier]
[-e multiplier] [--precision decimal points]
[--retract distance speed threshold]
[--report-move-times] [--report-feedrates]
[--no-spaces] [--use-G10-G11] [-p] [-v]
[-l LCD_COMMAND] [--progress GCode_header lines] [-c]
[--quote-messages] [--comments pad or remove]
[--no-header] [-m MOVE_HEADER] [--description]
[--metrics] [--report-flow] [--keep_pre_resume]
[--leave_z_on_resume] [-u original replacement]
[--version] [--explicit | -s | --compress]
Monkey around with GCode (especially from KISSlicer. Cura, Craftware and
Slic3r support not thoroughly tested) written by Lars Norpchen,
http://www.octopusmotor.com
optional arguments:
-h, --help show this help message and exit
-u original replacement, --replace original replacement
Replace a code with another code. Regex coding is
supported (^ for beginning of line, etc). Use ~ for
space. Can be used to comment out codes by adding a
";" to the code.
--version show program's version number and exit
File input and output options:
-i filename, --input filename
specify the input file to process
-o filename, --output filename
specify the output file to generate. If not specified,
output will overwrite the input file when done.
-umo, --ultimaker-out
Output Ultimaker G-Code (extrusion by volume)
-umi, --ultimaker-in Input file is Ultimaker G-Code (extrusion by volume)
--split filename (line, layer, zheight, nth, or path) value
Split the file into a second file based on line
number, layer, height or path type. Nth is every N
layers.
--inject filename (line, layer, zheight, nth, or path) value
Insert the file snippet based on line number, layer,
height or path type. Nth is every N layers. MUST use
relative E coordindates and disable destringing in
slicer
--merge filename [additional files ...]
Merge the specified file(s). They will be interleaved
by layer, sorted based on Z height. MUST use relative
E coordindates and disable destringing in slicer app #
(you can add retraction commands using the --retract
option)
--resume line, layer, or Zheight value
Resume an interrupted print from a given line, layer
or ZHeight. X, Y and Z positions will be set for you,
and you need to manually position the printer's Z
height before resuming. Line number is not recommended
as it is based on the input file, which may change
position in the output file based on other post
processing commands.
Fan and Temperature control options:
-f multiplier, --fan multiplier
Multiply all fan speeds by this. This only affects fan
speeds that were in the original file, not those fan
speed commands added by options in this script
-t multiplier, --temperature multiplier
Multiply all extruder temperatures by this.
-j degrees, --minimum-temperature degrees
Enforce a minimum temperature for all extruder
temperature settings (including raft cooling). Will
not override extruder off (temp=0) commands.
-n degrees, --maximum-temperature degrees
Enforce a maximum temperature for all extruder
temperature settings
--wait-temp none, first, or all
Wait for extruder temperature changes
--wait-bed-temp none, first, or all
Wait for bed temperature changes
-b multiplier, --bed multiplier
Multiply all bed temps by this
-k degrees layer, --cool-bed degrees layer
Slic3r / KISSlicer only. Decrease the bed temperature
by DEGREES at specified LAYER
-q fan_speed, --cool-support fan_speed
Slic3r / KISSlicer only. Turns the fan on for all
"Support Interface" paths. Fan speed is 0 - 255.
-g fan_speed, --cool-sparse-infill fan_speed
Slic3r / KISSlicer only. Turns the fan on for all
"Sparse Infill" paths. Fan speed is 0 - 255.
-w fan_speed temperaturedrop, --cool-raft fan_speed temperaturedrop
Slic3r / KISSlicer only. Adjusts the fan and extrusion
temperature to make it easier to remove the raft. Set
the fan speed (0-255) and temperature reduction (in
degrees) for first object layer
--filament mm input file's assumed filament diameter -- for
converting linear to volumetric extrusions
Movement control options:
--quality quality_setting [quality_setting ...]
Adjust the print quality for a given key (path / layer
/ etc. -- only path type is supported at the moment).
If supported in printer's firmware, this scales speed,
acceleration and jerk values for each extrusion move
-- for example 1.0 is normal, 2.0 is half speed and
0.5 is double speed. Multiple quality options can be
set, with each of the three required settings for each
option being comma separated (ie: --quality
2,0,path,loop 3.0,path,skirt 0.2,path,perimeter ) .
-d mm, --decimate mm Drop XY movements smaller than this. Useful to get rid
of excessive "micromoves" that are below the printer's
resolution. Requires "--strip" option enabled to work
--movement abs or rel
Convert / output all movement to use absolute or
relative mode.
--extrusion abs or rel
Convert / output all extrusion to use absolute or
relative mode.
--scalex x Scale all X movements by this. Default is 1.0
(unchanged)
--scaley x Scale all Y movements by this. Default is 1.0
(unchanged)
--scalez x Scale all Z movements by this. Default is 1.0
(unchanged)
--scaleall x Scale all X, Y and Z movements by this. Default is 1.0
(unchanged)
-x mm, --xoffset mm Offset all X movements by this. Use only with absolute
coordinate mode.
-y mm, --yoffset mm Offset all Y movements by this. Use only with absolute
coordinate mode.
-z mm, --zoffset mm Offset all Z movements by this. Use only with absolute
coordinate mode.
-X mm, --xcompensate mm
Offset all X movements by this when switching
directions (movement/backlash compensation).
-Y mm, --ycompensate mm
Offset all Y movements by this when switching
directions (movement/backlash compensation).
-Z mm, --zcompensate mm
Offset all Z movements by this when switching
directions (movement/backlash compensation).
-r multiplier, --feedrate multiplier
Multiply all movement rates by this (X, Y, Z and
Extruder)
-e multiplier, --extrusion-flow multiplier
Multiply extrusion amount by this.
--precision decimal points
Round XYZ movement to the given number of decimal
points. Extruder position E and arc definitions I / J
are not rounded
--retract distance speed threshold
Retract the filament a given number of mm for non-
extrusion moves greater than the threshold (in mm).
Retraction speed is in F code feedrate (mm/min)
--report-move-times Output the time in comment are for each move
--report-feedrates Add comments showing changes to feedrate in mm/s
--no-spaces Remove unneed spaces in commands
--use-G10-G11 Replaces retraction and un-retract gcode with G10 /
G11 for printer controlled retraction
--explicit Force all coordinates to be listed in all G0/G1/G2/G3
commands
-s, --strip Strip redundant move command parameters. Saves a
little space, should not change the result, in
theory... use at your own risk!
--compress Strip redundant move command parameters, remove
spaces, turn off comments. Makes a smaller file, less
human readable, but still valid to the printer.
Printer user interface options:
-p, --print-layer Slic3r / KISSlicer only. Print the current layer
number on the LCD display
-v, --verbose Slic3r / KISSlicer only. Show movement type comments
on the LCD display. This command can be risky on some
machines because it adds a lot of extra chatter to the
user interface and may cause problems during printing.
-l LCD_COMMAND, --LCD-command LCD_COMMAND
Set the G-Code M command for showing a message on the
device display. M117 for Marlin, M70 for ReplicatorG
(default)
--progress GCode_header lines
Output progress percentage (based on input file lines)
every N lines with the given GCode prefix / header
(ie: M73 Q). Will not give proper values if you merge
or insert or split files in the same pass.
-c, --colored-movements
Cura / Slic3r / KISSlicer only. Set RGB LED to show
the path type using the M420 command (Makerbot). This
command can be risky on some machines because it adds
a lot of extra chatter to the user interface and may
cause problems during printing.
--quote-messages LCD display commands will wrap quotes around the
message
GCode comments options:
--comments pad or remove
Pad or remove comments from gcode file. Pad adds an
empty move command to the start of comment only lines.
Most hosts will not send comments to printer, however
this can cause a line number mismatch between the
original file and the printed file (which makes it
harder to resume).
--no-header Remove the header (all commands before the first layer
command)
-m MOVE_HEADER, --move-header MOVE_HEADER
Moves the last X lines (slicing summary) at the end of
the file to the head of the file. KISSlicer uses 30
lines.
--description Add metrics data to the system DESCRIPT.ION file for
the output file
--metrics Add comments with metrics data to end of the output
file
--report-flow Add comments to movement showing extrusion vs travel
rate (micrometers of filament per mm of travel)
--keep_pre_resume Keep movement commands as comments instead of deleting
them
--leave_z_on_resume Leave the Z height when resume (assume head already at
proper Z