Additive manufacturing technology (AMT) is a topic that is of considerable ongoing interest. The application of robots enhances the flexibility and intelligibility of the AMT. However, the traditional robot teaching programming method is tedious and complicated, which is one of the key challenges for developing a robot AMT technique. This paper proposes a new robot programming method based on the computer-aided design (CAD). Firstly, the geometry information of the CAD model is extracted in accordance to the stereo lithography (STL) data format. Secondly, the CAD topological structure is established based on the edge topological information. On the premise of guaranteeing the model precision, the CAD model error is analyzed. The particle swarm optimization (PSO) method is applied to raise the efficiency of the process.Finally, the robot path is automatically generated layer-by-layer from the CAD model and the proposed method is validated by an experiment of cladding a blade. The experiment result shows that the CAD-based automatic path generation and optimization for laser cladding robot is of higher efficiency and better accuracy than the ones with the robot teaching programming method.