For a 6R milling robot, it is necessary to convert the postprocessing cutter locations (CL) into the robot's revolute joint variables. This paper introduces an algorithm for calculating the forward and inverse kinematics of a 6R robot according to the CL data generated by conventional CAD/CAM systems. A redundant mechanism is analyzed to avoid the singular configurations and joint limits. The Denavit-Hartenberg (D-H) convention is referred to for developing the forward kinematics, and a closed-form solution of the inverse kinematics is presented by means of kinematic decoupling. A fundamental approach with modifying factor for avoiding singularity are developed with regard to three-axis and five-axis CL data. A gap bridging strategy is applied to reduce the jerk motion caused by tool retraction and cut paths connection. Finally, the result is conducted to simulation and machining test to verify the algorithms.