How to change the geometry of a product with a python

I want to to simulate the change of the geometry with python. I want to simulate a CNC. How can I change this?

Thank you all in advance!

Best Regards,

Paul