Hi, I've got a 3 axis homebuilt CNC router. I have built a head adapter that can be manually indexed to "simulate" a 4th and 5th axis. The main reason I've done this is to get access to undercut areas on parts.

My additional "4th axis" is around the Z and can be indexed to 0,45,90,135,180,225,270,315 (45 degree increments). The "5th axis" is a bracket that tips the spindle to 60 degrees from the Z axis. Imagine if the 5th is at zero (spindle straight down) the 4th axis really won't do anything but index the spindle around the Z. Here is a similar machine, but mine has "static indexed" axis for the extra 2 axis:

https://www.youtube.com/watch?v=nITLI_WcnuM

And the beginning of this video I would call 2.5 axis milling (facing, pocketing) with the 2 additional axis "statically indexed".

https://www.youtube.com/watch?v=kGCZUO_E0AU

What I would like to be able to do is rotate the whole G-code program to a new coordinate system that represents the new angle and rotation of the head.

So if I manually tip my head -60 degrees (around the x) my cutter will be pointed at a vector of x0 y-.866 z-.500.

So I now want the "controller" to think the whole coordinate system has shifted and/or rotated. Maybe something like this:

G92 X0 Y0 Z0 A-60 B0 C0 This would just rotate around the X maybe?

Then starting from X0Y0Z0 I would expect a command like:

G1Z-1F50

would result in both Y and Z moving in sync to actual location y-.866 z-.500 (sin and cos of tipped angle -60)

I'm using Linuxcnc for a controller and it doesn't like the A, B or C if I try that. I assume because the machine is only set-up as "3-axis". I don't really understand what U,V and W mean either (in a G92 context)

Other solutions are to tip the entire part, say on a sine plate, which would work for some items, but I only have 10" of z travel so that gets eaten up pretty quick if you try to tip the part. Or I could write a translator that could "rotate" g-code around a point using some trig, not easy but doable.

It would be neat if it could also account for G2, G3 moves in any plane, but I would settle for just G0 and G1.

I may not know the right terminology for what I'm trying to do which is probably making it harder to find the solution.

Thanks for any ideas.