Reputation: 71
I'm looking to learn more about the process of slicing a mesh into gcode, a process that takes a 3d model and creates 2D slices of an object that a CNC machine or 3D printer can use.
What mathematical algorithms are used to perform this type of mesh decimation/slicing? Are there any libraries that have some of them implemented?
Upvotes: 4
Views: 3891
Reputation: 324
If anyone would pass by, maybe it will be helpful for him to see my library:
https://github.com/yoavmil/amlib - this is a toolset for 3D slicing (that works with polygons, not raster).
I write slicers for a living.
Upvotes: 0
Reputation: 1770
Think of the slicer as a tool path generator. Essentially you are compiling your STL mesh in to G-code that tells a tool where to go. This is a far better documented problem in CNC machines than it is in 3D printers.
If you were type in "slicing algorithms" in to google, you wouldn't get much. Now type in "tool path generation algorithms" and you get a lot more. A lot of what goes on in 3D printing is boot strapped off of CNC milling ideas.
While this paper isn't directly applicable to Slicing for 3D printers, it might give you an idea of the sort of thinking that goes in to tool paths for CNC: http://www.sciencedirect.com/science/article/pii/S001044859900024X
http://www.emeraldinsight.com/journals.htm?articleid=1538004 is also another excellent paper.
The source code for Slic3r isn't too hard to understand, so you might want to start by making a clone, if you'd like to learn the process.
Upvotes: 5