In addition to the above, I would note that you are going to need to perform a great many physical tests before you get this right. You will have to let the machine perform, observe and calculate the error, and then return to your calculations with modifications.
I'll propose to you this brief classification of the tasks required in the proccess of producing a part using a NC machine:
1) First, you need to generate a program to control the NC machine to produce the part. For this reason, you'll use CAD, CAPP and CAM (in this order).
2) The second group of tasks is happening on NC system that reads and interprets the part program, generated previously, then controlling the movements of axis of the machine.
3) In this stage, the part is finished and it is measured using CMM. The results are compared with the required geometry and if there are differences, compensations are performed.