The Add Spaces tool automatically inserts spaces into G-code, bringing it to a consistent and parser-safe format. Formatting does not change the meaning of the commands, but makes the code more readable for humans and unambiguous for NCPlayer’s internal parser.
G00X10Y5Z-2F800 → G00 X10 Y5 Z-2 F800.G17G90G54 → G17 G90 G54, G00X → G00 X.#100=ROUND[#101+10] → #100 = ROUND[#101 + 10].[ ... ] (conditions/expressions):
operators and functions are separated by spaces but not broken apart:
[#100+5*COS[#101]] → [#100 + 5 * COS[#101]].( ... ) is not changed or parsed.IF, THEN, GOTO, WHILE, DO, END
remain intact and are separated by spaces to avoid confusion with addresses/cutter comps.Before: G0G90G54X0Y0S1200M3 #100=ROUND[#101+10] IF[#100GT50]THENGOTO120 N11G1X[#7-#2]Z-[#8-#2]F[#12] After: G0 G90 G54 X0 Y0 S1200 M3 #100 = ROUND[#101 + 10] IF [#100 GT 50] THEN GOTO 120 N11 G1 X[#7 - #2] Z-[#8 - #2] F[#12]
G00X vs G00 X).[ ... ] ensures correct recognition of operators (EQ/NE/GT/GE/LT/LE) and functions
(SIN, COS, ROUND, FIX, etc.).IF / THEN / GOTO / WHILE / DO / END prevents logical parsing errors.
Z-2) remains attached to the value: Z-2, not Z - 2.