algorithmic modeling for Rhino
In this video, we will walk through how to setup a Grasshopper definition that will write the G-code for surface milling on a 3-axis CNC milling machine. When surface milling - the contouring engine is crucial. For speed reasons, I found the C# contouring definition written by Giulio Piacentino' works extremely well because it allows the user to specify a step distance (tool path offset). After we have generated the contours (or tool paths) we can subdivide each curve, using the evaluate length component, to create a series of points which will guide the CNC mill head in order. Because we now have data structures, we can weave formatted text strings that have been derived from the point data into a G-code that will control the CNC mill.
As in the previous example, we have formatted our text strings to work with the opensource CAM software, Shopbot. You can download a free version of the software here: http://www.shopbottools.com/controlsoftware.htm.