It takes a little trigonometry to convert the polar coordinate angle and distance to a cartesian coordinate. Relative coordinates (whether you’re in relative or absolute mode is defined by G90/G91) are easy: just add the values given on the current line to the current position to get the new absolute coordinates. Next up is conversion from either relative or polar coordinates to absolute coordinates. Step 2: Conversion from Relative or Polar to Absolute Coordinates The point is that once we’re past this stage, G20 and G21 are no longer being considered. I’ve portrayed a conversion to Metric in the diagram, but this could as easily be a conversion to Imperial (inches) if that’s what your controller is internally setup for. The first calculation involves converting from the coordinates used in your part program (as defined by G20 and G21) to the units your machine uses internally (typically setup with a parameter in your controller). Let’s go through each step to understand what it does. By dividing and conquering the pipeline into it’s building blocks, you’ll get an idea of what’s possible. I call it a Coordinate Pipeline because you can think of each box as representing a calculation that is done on the coordinate from your part program to get to the machine coordinate that will actually be used. Let’s start our overview with a graphical diagram of the 5-steps involved in transforming a coordinate from the number you type into your g-code program to the actual machine coordinates that will be used: For a basic introduction to g-code coordinates, refer to our intro chapter on the g-code coordinate system. Future chapters will provide details on each specific type of operation. This chapter in the G-Code Tutorial is all about introducing what kinds of things can be done to g-code coordinates and how they fit together. G-Code has some powerful operations that allow you to transform coordinates and mold them to your needs.