Rcode - gcode layer 2

I realize this has no practical application - but when I went back to college recently we were manually writing lots of gcode and I created a very simple interpreter in Ruby to take methods I wrote and convert them over to gcode


That’s very clean. There was some interest a while back in having an option in GroundControl to view the current gcode file in more human-friendly format, sort of the reverse of what you have here. Something along the lines of this.


It probably wouldn’t be very challenging to do the reverse of what I have done here. To parse gcode and have it spit out something human friendly would be pretty easy I think

edit: in fact… here is a quick jsfiddle showing how simple it could be: https://jsfiddle.net/g1pcsbv1/30/
Obviously you’d need to add support for more codes and do a few more checks, but this is totally possible.

As an example, type G00 X2.5 Y1.67 into the box. It’s obviously assuming positive numbers and inches, but like I said…a few more checks and it could work.

1 Like

go for it! not-enough-chars

I assume that not-enough-chars is an error you have received somewhere? If it is using Rcode, I’ll need more specifics. If it is using the jsfiddle - I’m not surprised lol. It’s in no way comprehensive or complete, nor is it intended to be

the forum requires 20 chars minimum to post.


As I discovered recently (OnShape scripts to add features), there are sneaky ways around the 20-character limit.