For this in 2D, see Sam's thesis, 6.3.3 (p. 86, CNC wire plotting). 3D would add a lot of challenges.
https://cba.mit.edu/docs/theses/19.09.calisch.pdf