At present, urban informatization has become an inevitable trend, and 3D CAD has entered a new period of rapid development and wide application. Based on ML (Machine learning) algorithm and CAD technology, this article discusses its application in landscape planning. On the basis of discussing and analyzing the data acquisition and preprocessing of urban 3D landscape model, a landscape planning and design model based on PSO (Particle swarm optimization) algorithm is proposed. In the model, this article improves the position updating formula and introduces the crossover operation of genetic algorithm, which increases the learning mode of population particles and improves the optimization ability of particles. Moreover, an improved random inertia weight selection strategy is proposed, which can effectively adjust the fishing ability of subgroups. The simulation results show that the RMSE, MAE and MAPE of this model are at a low level. Among them, RMSE is about 0.507, MAE is about 1.243, and MAPE is about 0.261. This method effectively improves the performance of the algorithm, improves the display speed and improves the 3D display effect. Compared with the traditional parametric design, the proposed method can automatically learn the rules of landscape architecture functional layout without adding rules artificially, and generate a more reasonable landscape architecture planning scheme, which can be used as a reference for professionals. © 2024 CAD Solutions, LLC.