Table of Contents
Fetching ...

Learning Based Toolpath Planner on Diverse Graphs for 3D Printing

Yuming Huang, Yuhu Guo, Renbo Su, Xingjian Han, Junhao Ding, Tianyu Zhang, Tao Liu, Weiming Wang, Guoxin Fang, Xu Song, Emily Whiting, Charlie C. L. Wang

TL;DR

This work tackles large-scale, diverse-graph toolpath planning for 3D printing by introducing an on-the-fly Deep Q-Network planner operating on Local Search Graphs (LSGs). By encoding moving states with a pattern-aware representation and incorporating short-term memory, the method enables rapid decision-making and reuses learned priors across similar graph configurations to accelerate learning. The approach is demonstrated across three printing modalities—wire-frame, continuous carbon fiber (CCF CFRTP), and LPBF metal printing—with substantial gains in efficiency and print quality: up to 4.2k struts printed, a 93.3% reduction in sharp turns, and a 24.9% reduction in thermal distortion. These results validate a general, scalable framework for optimized toolpath planning on diverse, large graphs with domain-specific reward formulations and acceleration strategies that bridge learning with practical manufacturing outcomes.

Abstract

This paper presents a learning based planner for computing optimized 3D printing toolpaths on prescribed graphs, the challenges of which include the varying graph structures on different models and the large scale of nodes & edges on a graph. We adopt an on-the-fly strategy to tackle these challenges, formulating the planner as a Deep Q-Network (DQN) based optimizer to decide the next `best' node to visit. We construct the state spaces by the Local Search Graph (LSG) centered at different nodes on a graph, which is encoded by a carefully designed algorithm so that LSGs in similar configurations can be identified to re-use the earlier learned DQN priors for accelerating the computation of toolpath planning. Our method can cover different 3D printing applications by defining their corresponding reward functions. Toolpath planning problems in wire-frame printing, continuous fiber printing, and metallic printing are selected to demonstrate its generality. The performance of our planner has been verified by testing the resultant toolpaths in physical experiments. By using our planner, wire-frame models with up to 4.2k struts can be successfully printed, up to 93.3% of sharp turns on continuous fiber toolpaths can be avoided, and the thermal distortion in metallic printing can be reduced by 24.9%.

Learning Based Toolpath Planner on Diverse Graphs for 3D Printing

TL;DR

This work tackles large-scale, diverse-graph toolpath planning for 3D printing by introducing an on-the-fly Deep Q-Network planner operating on Local Search Graphs (LSGs). By encoding moving states with a pattern-aware representation and incorporating short-term memory, the method enables rapid decision-making and reuses learned priors across similar graph configurations to accelerate learning. The approach is demonstrated across three printing modalities—wire-frame, continuous carbon fiber (CCF CFRTP), and LPBF metal printing—with substantial gains in efficiency and print quality: up to 4.2k struts printed, a 93.3% reduction in sharp turns, and a 24.9% reduction in thermal distortion. These results validate a general, scalable framework for optimized toolpath planning on diverse, large graphs with domain-specific reward formulations and acceleration strategies that bridge learning with practical manufacturing outcomes.

Abstract

This paper presents a learning based planner for computing optimized 3D printing toolpaths on prescribed graphs, the challenges of which include the varying graph structures on different models and the large scale of nodes & edges on a graph. We adopt an on-the-fly strategy to tackle these challenges, formulating the planner as a Deep Q-Network (DQN) based optimizer to decide the next `best' node to visit. We construct the state spaces by the Local Search Graph (LSG) centered at different nodes on a graph, which is encoded by a carefully designed algorithm so that LSGs in similar configurations can be identified to re-use the earlier learned DQN priors for accelerating the computation of toolpath planning. Our method can cover different 3D printing applications by defining their corresponding reward functions. Toolpath planning problems in wire-frame printing, continuous fiber printing, and metallic printing are selected to demonstrate its generality. The performance of our planner has been verified by testing the resultant toolpaths in physical experiments. By using our planner, wire-frame models with up to 4.2k struts can be successfully printed, up to 93.3% of sharp turns on continuous fiber toolpaths can be avoided, and the thermal distortion in metallic printing can be reduced by 24.9%.
Paper Structure (49 sections, 16 equations, 33 figures, 2 tables, 1 algorithm)

This paper contains 49 sections, 16 equations, 33 figures, 2 tables, 1 algorithm.

Figures (33)

  • Figure 1: Applications in computing optimized toolpaths for 3D printing problems of (a) wire-frame models, (b) the continuous fiber reinforced layer for CFRTP, and (c) LPBF-based metal printing. Given input graphs (a.1, b.1 & c.1), our planner can generate toolpaths optimized according to manufacturing objectives. The toolpaths are tested in physical experiments (a.2, b.2 & c.2) to produce the results (a.3, b.3 & c.3). Three different parts of the toolpath are visualized as red, green, and blue arrows.
  • Figure 2: (a)-(e) Illustration of using our $Q$-learning based planner to compute the toolpath on a graph $\mathcal{G}$. Our on-the-fly planner explores $\mathcal{G}$ on a LSG with $n$-rings of neighbors ($n=2$ in this example), given a current node $v_c$ (orange in (b,g,h)). (f) The moving state $\mathbf{S}$ of $v_c$ is a 3D matrix commonly determined by the current LSG and two previous steps in the partially planned toolpath (in black), which is formed by three adjacency matrices $\mathbf{A}$, $\mathbf{A}^{\dag}$ and $\mathbf{A}^{\ddag}$. (g, h) The next best node of $v_c$ is determined by learning an updated deep $Q$-network to compute the $Q$-values (green bars) on every nodes in the LSG according to the state $\mathbf{S}^*$. Color blocks in (f) highlight the differences between $\mathbf{A}$ and $\mathbf{A}^{\dag}$ (pink color) and between $\mathbf{A}^{\dag}$ and $\mathbf{A}^{\ddag}$ (blue color). The best next node from (h) will update to become next current node in (c). Repeatedly applying this $Q$-learning based planner can determine the resultant toolpath as shown in (e).
  • Figure 3: A study to verify the effectiveness of the pattern encoding method. Given a LSG as shown on the Bunny model, we compare the similarity of its adjacent matrix to the other adjacent matrices formed when visiting other nodes by a random order. The histograms of similarities with vs. without the pattern encoding (P.E.) algorithm are compared.
  • Figure 4: Printing CCF along an unoptimized toolpath generated by (a) DFS on the input graph leads to 6 sharp turns (regions in red squares -- failure of carbon fiber adhesion), which can be reduced into (b) 2 sharp turns by using our planner. The turning angles in blue squares have been changed so that improved fiber adhesion can be observed.
  • Figure 5: The illustration of the warpage caused by concentrated thermal stresses in the metal printing process. During the cooling process, materials in large melt pools need to undergo larger temperature gradients and corresponding volume changes, which is the main cause of warpage.
  • ...and 28 more figures