The use of additive manufacturing (AM) has increased considerably in recent years. This technology possibilities the creating of complex shapes in an easy, fast, and with low wast of material. This creative freedom allows components to be highly optimized. Currently, some algorithms allow final users to perform topology optimization in the computer-aided design (CAD) phase. However, the optimization results might not be respected or considered during the downstream AM planning processes like slicing hence the optimized structural design may be lost during the actual fabrication process. This work has a focus on topology optimization in the toolpath planning process by taking into account the characteristics in the AM processes. This work develops a line based topology optimization using the principal stress line (PSL) as the guidance in generating optimized toolpaths. The method is efficient, controllable, and able to consider the characteristics of the AM process. Experimental structural tests were performed on the proposed method, and the results obtained demonstrate that the strategy of applying PSL-based optimization in toolpath planning is a promising direction to complement the topologically optimized results from the CAD phase.