There are quite a few topics about cnc simulation.
Here’s how I would do it with an Anemone loop in Grasshopper: