JuliaCon 2023

Julia in machining: optimizing drilling positions
2023-07-26 , Online talks and posters

In the machining of cast blank parts, small geometrical deviations between different lots of blanks can cause serious issues. These differences need to be compensated to 1) make sure that every feature on the blank is properly machined and 2) dimensional tolerances between features are respected. This poster shows via a case study in drilling that Julia is a great tool for solving this problem, including the steps of data processing, optimization, and visualization.


In a drilling application, CNC code is built up from two sections: positions of hole features relative to a workpiece local coordinate frame called part zero, and the coordinates of those part zeros in the workspace of the machining center. Usually, there are different part zeros for different feature groups (e.g., one for each side of the part). For quality control reasons, feature coordinates should not be changed, while part zeros can be modified if there is a good reason for it.

One such reason can be the small geometrical deviation between the different lots of cast blanks; using the old CNC code for a new lot may result in tool breakage or producing scrap. To ensure that no time, energy and material is wasted by finding appropriate part zeros with the good old trial-and-error method, an automated optimization-based method is needed.

On every new lot, one cast blank is measured with a 3D scanner, and important geometrical features are exported. Rough feature (on the cast blank) and machined feature (CNC code) positions can be compared to ensure that every surface that needs to be machined will be eventually machined. An appropriate machining allowance, i.e., distance between a rough and corresponding machined feature can ensure this. Other aspects that need to be considered are the dimensional tolerances between machined features. Tolerances between features in the same feature group are ensured by the CNC code, while inter-operation tolerances must be overseen when setting the different part zeros.

With a proper optimization model, the allowance criteria as well as tolerance requirements can be balanced and optimal part zeros can be computed.

This poster showcases how this complex engineering problem can be programmed and solved in Julia. Input geometrical data can be read from files or queried from a database. The JuMP ecosystem is used to implement and solve the optimization problem, and Makie to visualize and interpret the results.


The description of this methodology is currently under publication and will be available as an Open Access paper. The implementation is available here: https://github.com/cserteGT3/BlankLocalizationCore.jl

I am Tamás Cserteg mechatronical engineer and PhD student at SZTAKI (Institute for Computer Science and Control), Hungary. Most of my time is spent with developing robotic solutions for our industrial partners and research projects. I like to use Julia for every kind of stuff including my research and personal projects as well.