PurposeComposite cellular structures have wide application in advanced engineering fields due to their high specific stiffness and strength. As an emerging technology, continuous fiber-reinforced polymer additive manufacturing provides a cost-effective solution for fabricating composite cellular structures with complex designs. However, the corresponding path planning methods are case-specific and have not considered any manufacturing constraints. This study aims to develop a generally applicable path planning method to fill the above research gap.Design/methodology/approachThis study proposes a path planning method based on the graph theory, yielding an infill toolpath with a minimum fiber cutting frequency, printing time and total turning angle. More specifically, the cellular structure design is converted to a graph first. Then, the graph is modified to search an Eulerian path by adding an optimal set of extra edges determined through the integer linear programming method. Finally, the toolpath with minimum total turning angle is obtained with a constrained Euler path search algorithm.FindingsThe effectiveness of the proposed method is validated through the fabrication of both periodic and nonperiodic composite cellular structures, i.e. triangular unit cell-based, Voronoi diagram-based and topology optimized structures. The proposed method provides the basis for manufacturing planar thin-walled cellular structures of continuous fiber-reinforced polymer (CFRP). Moreover, the proposed method shows a notable improvement compared with the existing method. The fiber cutting frequency, printing time and total turning angle have been reduced up to 88.7%, 52.6% and 65.5%, respectively.Originality/valueA generally applicable path planning method is developed to generate continuous toolpaths for fabricating cellular structures in CFRP-additive manufacturing, which is an emerging technology. More importantly, manufacturing constraints such as fiber cutting frequency, printing time and total turning angle of fibers are considered within the process planning for the first time.