Close

Generating tool paths from solid model files

A project log for CNC Candle Carver

a custom three axis cnc machine for carving candles.

john-opsahlJohn Opsahl 03/08/2020 at 17:080 Comments

I chose to fully develop the mechanical and electrical components of CNC Candle Carver without even considering how challenging it might be to develop the control strategy for the machine. I take this approach to push the limit of my programming skills and to achieve more immediate gratification during the programming stage the project. Once I make a little progress on the code, I get to test it with the physical machine and start carving right away. Planning for small victories early on and throughout development has been a key part of maintaining motivation during my reach projects.

Fortunately, I think it's going to be possible to copy many of the techniques developed for 3D printing to generate the CNC candle carver tool paths from solid model files. The first major decision is to use the STL 3D solid model file format (STL file format Wikipedia page). The STL file format stores 3D geometry using triangles and a unit normal associated with each triangle that indicates the direction away from the 3D soild object. Triangles ought to be one of the easier 3D geometry representations to wrap my mind around so already I like where this is going. Also like 3D printing, I intend to "slice" the 3D geometry into horizontal layers. At each horizontal level, the candle will rotate and the carving bit will move in and out to follow the contour of the 3D geometry. My first thought here is to dig into the open source CuraEngine (https://github.com/Ultimaker/CuraEngine) to understand how the popular Cura 3D printing software slicer works. The end result of the slicing operation will be a 2D horizontal cross section of the 3D geometry at the specified vertical height. 

The major difference from 3D printing is that candle carving is a subtractive manufacturing method (i.e. removes material to create the geometry; 3d printing is additive). So I really only care about the outside contour of each 2D horizontal cross section for this project. On this front, it would probably be easier to copy the techniques developed for cnc milling machines. 

Please leave comments on any of your favorite open source cnc milling CAM software packages. I will dig into the code of each to understand what I might be able to copy for this project. 

Discussions