This is a simulation configuration for a 6 axis machine with one table rotary and two spindle rotary joints

This simulation uses the interpreter's tilted work plane codes, documented in the G-code section of the manual:

G68.2 : defines the plane by three angles, three points or two vectors, with an origin in XYZ and a turn R about the plane's Z
G68.3 : defines the plane from the current tool direction, with an origin in XYZ and a turn R
G68.4 : any G68.2 form, composed onto the active plane
G69 : cancels the plane
G53.1 (P Q) : orients the tool to the plane, rotaries only, the linear joints stay where they are
G53.3 (P Q XYZ) : orients the tool and moves to XYZ in the plane, interpolated in joint space
G53.6 (P Q) : orients the tool with the tool centre point held

The orientation codes need the TCP kinematics (G12.1 P1). P picks the solution, nearest to the present rotary position first. Q0 holds the table and lets the head do it, Q1 lets the table take part as well.

The kinematic supports nutation of the secondary rotary joint (A or B) from 0 to 90 degrees, so this also covers the usual orthogonal spindle rotary-tilt machines by setting the nutation angle to 90 degrees.

The python maths this configuration used to carry as a remap lives on in tests/kins-twp, where the kinematics module is checked against it.

For more:
https://forum.linuxcnc.org/show-your-stuff/49103-kinematic-model-for-a-5axis-mill-with-universal-nutating-head?start=0#271334
