writing a Python program to generate gcode that 3D prints filament. Step 1: can I print a single color 1 meter piece and then print with it?
Step 2 is adding a pause-at-layer directive to make bi-color filament.
Step 3 is breaking up the single coil into segments and using different colors per segment. I think this would only be useful for a "faster rainbow filament" not for multicolor prints where the color is supposed to end up in a specific spot.
It looks like I could fit up to about 14 meters / 42g of filament on my build plate (Prusa mk3s), depending how close it can spiral to the middle while remaining printable, so this is only useful for smallish projects unless you want to keep loading short lengths every so often.
I did this a long time ago in openscad but it was nearly unusably slow due to the CSG operations. This program isn't dealing in any 3d solid models, it directly generates gcode.
I've been learning things like the inverse arc length calculation for the Archimedean spiral & remembering how to make gcode, so it's been fun and educational even if I fall off the project before completing step 3.