Machine Learning G-Code Optimization
Héctor Lasluisa-Naranjo, David Rivas-Lalaleo, Joaquín Vaquero, Christian Cruz-Moposita · 2024
G-codes are essential in CNC systems, providing crucial instructions for controlling machine parameters and operations in manufacturing, including 3D printing. They may contain errors affecting product quality and increasing resource consumption. This research applies the K-means machine learning clustering algorithm to optimize G-code parameters such as extruder and heated bed temperature, deposition speed, and flow control. The objective is to reduce manufacturing time and material usage while maintaining surface quality. A line-by-line analysis and rewriting of the G-code resulted in an average 24.36% reduction in time and 5% in material use, with minimal impact on quality, validated with the Taguchi method.