@dc42 Thank you. The math looks good. I will try it out.

In the mean time I used a couple blocks to align the part to the x and y axis and then found zero using the edges of the part. It would be great to have a macro that allows you to place the part/stock and then adjust the machine using the edges without having to do the manual alignment. Assuming you have a couple straight edges perpendicular to each other. Another handy thing would be a macro to flip the part if you need to machine both sides of the part. Is there a G code that allows you to mirror one of the WCS axis?