This paper presents an algorithm to automatically generate optimal tool-paths for the wire and arc additive manufacturing (WAAM) process for a large class of geometries. The algorithm firstly decomposes 2D geometries into a set of convex polygons based on a divide-and-conquer strategy. Then, for each convex polygon, an optimal scan direction is identified and a continuous tool-path is generated using a combination of zigzag and contour pattern strategies. Finally, all individual sub-paths are connected to form a closed curve. This tool-path generation strategy fulfils the design requirements of WAAM, including simple implementation, a minimized number of starting-stopping points, and high surface accuracy. Compared with the existing hybrid method, the proposed path planning strategy shows better surface accuracy through experiments on a general 3D component.