There is value in learning g-code and even hand code some things as exercises, but typically, you don’t want to hand write g-code. It can be done (as Barry as done), but 99.999% of all g-code is created by programs from some sort of drawing or model. It would take just a few minutes to draw your corners and generate g-code in Inkscape, Fusion 360, Lightburn, or a number of other programs, and changes like resizing or picking a new origin point would be simple once you have your initial drawing done.
The problem is that Marlin’s g-code does not have programming concepts like variables or functions. That means if you want to make changes like resizing your “frame” or making the center of the frame rather than the corner the origin point, you would need to recalculate most, if not all, of the coordinates, and completely rewrite the code. And there is more room for errors when writing g-code directly. That is less of an issue when drawing with a pen, but bad things can happen with g-code mistakes and a router.
In addition to Jeff’s g-code basics, you might want to take a look at Marlin’s g-code reference. Re-writing Barry’s g-code to be the size and orientation you want is a good exercise, just not a general purpose solution. Also, it is not a bad idea to take a look at handwritten g-code in a g-code simulator like this one before running it on your machine.
That’s definitely true, Robert. Learning the CAM and design tools are much more useful. This particular job would be easy to do in CAD/CAM. I also agree that learning the basics is really helpful. It helps you when debugging problems (when you can read the gcode created by CAM) and when configuring those tools (they often ask you to set the preambles, or choose options directly related to the gcode).
This particular problem might be a good chance to get more familiar with gcode, but it isn’t required.
All of your replies are so helpful and written in such a sweet way Really just like, “Oh you need help, here’s help, and some more help”.
And am VERY grateful! Thank you so much!
I do understand gcode to some minor degree, but I was not sure about how to put something like this together. Now I know, and I am able to tweak this to fit my needs! THANK YOU!