First 'Real' CNC task : Modeling and Toolpath

5 Bears Home Homebrew CNC bench mill

I like this old dude, he looks like a machinist.BIG PICTURES LOADING. If you are on a dialup, come back in a minute or two!

The KaVo mounting block was nearly completed in the previous installment. All that remains for full functionality is to split the block and mount it. But the front of the block could stand some dressing up a bit. Hmm, maybe some cooling fins? That'd be easy to do and a snap on my large manual machine, but the more I thought about it, the more I decided to make the fins using the CNC mill itself, via the already mounted Sherline spindle.

My first impulse was to hand-code some lines of G-code and let it rip. But I had yet to do an entire CNC project using the admittedly expensive software tools I had obtained a few months ago. I had done some very basic tutorial work with both Rhino (CAD) and Visual Mill (CAM), but I had been putting off any real work for quite some time. Yes, I was chicken. I think what was intimidating was the power of both packages. Naturally, people like to show off their best work, and the gorgeous models created with Rhino, which abound on the web, are works of art. But like any quality software, you can do basic stuff too, and the more I practice, the less 2D (QuickCAD) drafting I find myself doing in favor of Rhino.

Step 1: Model the fins using Rhino 3d

The block had 0.200" of surplus aluminum on the face to work with, meaning 0.200" tall fins could be cut. Functionally correct cooling fins would in reality be taller, thinner, and more numerous. What you see here is more decorative than functional. The first 3d model I attempted was a simple series of rectangular fins with squared ends, but decided to round them off simply because, with CNC, it's easy! Impossible to do in a manual mill.

The perspective view here is of six fins, width 0.150", with 0.250" between fins. I intentionally made it this spacing coarse because I wanted to use a 0.187" carbide end mill to speed the process and keep everything conservative for the first shot at actual CNC. The red line defines the X axis, and equates to Y=0. I did this intentionally, because I wanted the clamp slot to be exactly centered on the block, with the fins symmetrically mirrored across that plane. Therefore, the red line defines where the block will ultimately be split for the clamping action.

There is no need to model the block; only the fins. The screen shot shows the six fins resting upon the X,Y plane. Each fin is composed of two cylinder objects, one on each end, and one rectangular box. The box was created first, and the cylinders were set on the ends of the box, forming the shape you see here. One fin was grouped, copied, and with three fins spaced correctly, a mirror image was generated on the other side of the red Y=0 line, creating six total. The file was saved as fins04.3dm (220K), a Rhino 3d file.



Step 2: Import into Visual Mill 4.0

Visual Mill is the costliest software I have ever purchased, but I cannot imagine doing serious CNC work without a quality toolpath generator like this. CAM software is designed to turn a 3d model into a series of toolpaths, and the intelligence and ease of use of your CAM package is one of the biggest contributors to good CNC results. CAM software ranges from free to $10,000++. Picking the right package for your purposes is daunting and requires a bit of research. From what I have seen so far, Visual Mill will do everything I'll need for a long time!

Creation of a set of toolpaths (G-code) for a model like this is a multistage process. After the model was imported (VM directly loads Rhino 3dm files), this display was generated on the screen. Nice rendered fins! Within Visual Mill, you can rotate the model to any perspective just as you can in Rhino; it's fascinating stuff.



Step 3: Create the 'Stock'

The first step after importing the model was to enter a series of tooling and cut parameters for the machining in a logical order... you select your tool (a 0.187" EM), set desired feed and speed, axis orientation, a number of other smaller but necessary information tidbits. Next, the stock was generated surrounding the fins. Stock is nothing more than the chunk of metal which will be loaded into your mill, and ultimately machined away from the model, which you can see "buried" within the stock. In this particular case, since the fins are 0.200" tall and were designed to occupy the face of the KaVo mounting block, I took the width (Y) and length (X) of the face of the block, by 0.200 tall (Z). Program zero was set as follows: X = 0, left edge of block, Y = 0, middle of the left edge, and Z = 0 was set at the surface. This means that during the program's execution, we will be generating negative values for both Y and Z. By having Z=0 at the upper surface of the stock, it simplifies the machine setup come cut time.

It is unusual to have Y=0 being in the middle of the stock, but it ensured absolute symmetry on either side of what will eventually be the split in the block.


Step 4: Horizontal Roughing Toolpath Generation

The first cut will be a horizontal roughing. Visual Mill has many, many cutting processes to choose from, and it took me quite a while to determine exactly what each mode can do, and what would be best for a given model or shape. I still have a long way to go with study.

The primary horizontal roughing dialog looks like the picture above. A series of tabs allows you to fill in the essential information. For example, on this tab, I have specified (near the bottom of the dialog) a Stepover Control distance of 0.156. This means that the toolpath will step over between cuts no further than 0.156", but will step less if needed. As you make your choices with the radio buttons, the illustration next to the selection dynamically changes to allow you to visualize exactly what effect you will have. An excellent, user friendly environment.

When all of the information is entered, you click the Generate button, and Visual Mill creates the toolpath for the horizontal roughing. The toolpath list describes the time needed to machine among other critical items, and best of all it runs for you a simulation of the process, showing which portions of the stock are cut, and which are left behind.

Here is the display of the roughing toolpath after the simulation was run. Note that there are four Z axis layers; I have limited the maximum Z increase per pass to 0.050", and also specified 0.004" of cleanup stock to remain after the roughing process. The colors are representative of stock remaining in different amounts, remembering that the color RED is the model... don't want to cut that!


When this roughing toolpath was generated, I was intrigued by this side view. The 4 layers of Z are obvious, as are the Z axis retraction and traverse paths. But why does the cutter enter the stock at a downward sloping angle? I was not sure exactly why, but I continued the process, saved the G-code, ran it as you will see, and the answer was immediately obvious. Rather than plunge the cutter straight down into the stock, it follows those angled paths, thus enters the stock traveling on 3 axes simultaneously. The gradual, flanking entry into raw metal is much better than a straight plunge, and it allows the use of non center-cutting end mills. Honestly, this program has amazed me with its intelligence. It's pretty idiot-proof, and being smarter than me, it knows what to do and does so with minimum fuss. Enter the numbers, generate the toolpath, and you'll have pretty good confidence that the created path is both accurate and efficient. I spent quite a few hours changing parameters, generating the toolpath, and learning how to run the software as well as search for the fastest roughing times.


Step 5: Horizontal Finishing and Post Processing

With the roughing toolpath complete, I next chose to create a horizontal finishing toolpath. The roughing phase left from 0.004" to 0.010" all around to remove, and I set the finishing toolpath to clean up the fins in only one pass per fin, full depth. Any roughing operation leaves behind a more ragged part surface than a finishing op, and this full-depth path takes only a couple of minutes. I increased the speed from 4 ipm to 12, and although I must manually change the spindle speed, it too will be boosted for best surface finish.

Note the simulation of stock removal... the remaining yellow here is within my specified tolerance of +.001", -0.000". Of course, they're just fins, and an undersized fin won't hurt anything, but I wanted to explore and exercise both the hardware and the software. .

Happy now that this set of instructions would actually cut the fins I wanted, I executed the Post Process for the paths. Post processing is the generation of G-code for a particular machine, and is an integral part of Visual Mill. From an extensive list, you select your particular controller (i.e. Haas, Okuma, Roland) and simply execute. Of course I chose Flashcut, and VM happily cranked out a G-code listing in short order. The post processors within Visual Mill can be edited, or you can create one from scratch.

I make use of two computers. My office PC is my "normal" PC and is where I do most work. The PC which runs the Flashcut controller is dedicated to just that task in my garage. To get the G-code from office PC to controller PC, I make use of one of the new USB keychain flash memory sticks. If you have never used one, they are very cool, work great, and you can store 256 mB on a tiny widget the size of a pack of gum.

The KaVo mounting block was loaded into the mill's vise, a tiny 3" KURT ANGLOCK which is about the cutest little vise you'd ever want to see. Ebay of course. I didn't even know Anglock made such a miniscule vise, but they did at one point, and it is perfect for this mill.

DID IT WORK? We'll find out!