Spline-GCodes (G5)

Hi @Titaninchen ,

This should be possible, but similar to G-code arcs, this would introduce another layer of approximations to the motion planning since even if the CAD file used NURBS, as soon as you export it to a slicer, it transforms it to an STL made of triangles, an approximation (this also applies even if you export as STEP and import into slicer). Then, the slicer would have to detect the spline, approximate it again as a G5 command. Finally, Klipper would turn the G5 command into a series of G1’s.

In short, the series of approximations are:

  1. CAD in NURBS
  2. Slicer: CAD to STL triangles
  3. Slicer: Triangles → G5 spline
  4. Klipper: G5 spline → G1 lines

This could be simplified by just having one approximation (CAD to slicer):

  1. CAD in NURBS
  2. Slicer: CAD to STL triangles (G1 commands)