This paper presents a novel methodology to generate deposition paths for wire and arc additive manufacturing (WAAM). The medial axis transformation (MAT), which represents the skeleton of a given geometry, is firstly extracted to understand the geometry. Then a deposition path that is based on the MAT is efficiently generated. The resulting MAT-based path is able to entirely fill any given cross-sectional geometry without gaps. With the variation of step-over distance, material efficiency alters accordingly for both solid and thin-walled structures. It is found that thin-walled structures are more sensitive to step-over distance in terms of material efficiency. The optimal step-over distance corresponding to the maximum material efficiency can be achieved for various geometries, allowing the optimization of the deposition parameters. Five case studies of complex models including solid and thin-walled structures are used to test the developed methodology. Experimental comparison between the proposed MAT-based path patterns and the traditional contour path patterns demonstrate significant improved performance in terms of gap-free cross-sections. The proposed path planning strategy is shown to be particularly beneficial for WAAM of thin-walled structures.