Maximizing Toolpath Quality with madCAM
I’ve been using madCAM to generate all my toolpaths for a few years now, and I have to say I really love it. Since the machine I use is 3-axis, I’ve been using the entry level version, which sells for $750, which puts it squarely in the “budget” range of CAM software. That being said, I have yet to find myself wanting, and would not hesitate to recommend madCAM to anyone looking for a CAM plugin for Rhino.
A big part of what I like about madCAM is the fact that it exists as a plugin for Rhino3D. There are a few advantages to this, given that I use Rhino3D to do all my surface modeling. First, it keeps me from having to learn another interface. Second, since I don’t have to export the model, I know that there is no generation loss. If I had to export my model, say as a .stl file, that would be a conversion of the geometry, with possible generation loss. Third, since madCAM generates its toolpath based on the Rhino mesh settings, the quality of the toolpath can be easily manipulated by changing the Rhino mesh settings.
It’s this last point that I think represents truly the most important feature of madCAM as it relates to my work. For people doing “mechanical” type of work, this is not as important. However, if like me, you are trying to machine plugs and molds of “organic” shapes, the ability to really refine the level of detail in your toolpaths is crucial. For those who have never generated g-code, the important thing to know is that there are only two types of lines in the g-code universe – straight lines, and arcs. That’s it. All your fancy/swoopy/orgainc/NURBS stuff is eventually going to get broken down into either straight line segments, or arcs. HOW it gets broken down is one of the largest factors determining the quality of your machined parts. What I’m going to show with this post is how to set your madCAM and Rhino settings to maximize the quality of your toolpaths, so that your machined molds and plugs require an absolute minimum of hand finishing.
The first thing to do is to set the Rhino mesh settings per the madCAM manual, or even better. Here is how I set my Rhino mesh settings:
The really important one for the machining that I do is the maximum angle setting. Notice that I have it set to 0.5 degrees, which is very fine. Also, I have Maximum Distance, edge to surface set to 0.0001. In the madCAM Settings tab, I also set the System Tolerance to 0.0001:
There is one more setting to dial in, and that’s the tolerance on the individual tools. For my tools, I set the tolerance to 0.00015:
Now, if you try to look at your model in Rhino in either the “Shaded” or “Rendered” mode, it will go VERY slowly, simply because the mesh is so incredibly dense. So, I suggest putting all your viewports into “Wireframe” mode. If you’ve dialed in your Rhino mesh settings like I’ve shown, and put all your viewports into Wireframe mode, now would be a wonderful time to save your “empty” file out as a Template file. This way, you only have to open up a new file when you want to make g-code, and use your template file to set all your settings:
Typically, I save a copy of part I want to machine with _Tooling appended to the end of the name, start a new file, use my madCAM template, import my _Tooling file and then save it over the original _Tooling file. This is the easiest and fastest way to reset your mesh and viewport settings for toolpath generation.
Here’s something I’m working on right now, it’s a simple part, but it’s a good demonstration of how manipulating the Rhino mesh settings affect the toolpath quality:
I’ve created a toolpath to machine the top of this piece, which you can see below. The cyan curve was used as a boundary curve, and I used the Curve Milling ->From Boundary Curves to make the toolpath, with the tool zig-zagging in y:
Now let’s look at the individual line segments that make up the toolpath. Like I said – even though this is a smooth shape that is based on NURBS cuves, the toolpath can only be lines or arcs. In the case of madCAM, it generates lines. So, to evaluate the density of the linework, we just have to turn the points on in Rhino. Here’s what that looks like:
What I’m looking for is enough point density so that the surfaces don’t look faceted when they are machined. This looks nice to me – you can see that there are some lines along which the points align, but from experience I know that this type of density will look very nice when machined. Here’s another thing to look out for – look at the areas where the toolpath makes hard turns, and make sure that it looks nice and orderly:
The non intuitive part of this is that the hardest parts to get really nice and smooth are the parts where very little is going on. If you have a surface with just a tiny bit of curvature to it, that can often be harder to get right than something with lots of curvature. I figured it might help to show what it looks like when things are not setup correctly. With all the mesh and tolerance settings increased, here’s what that hard edge now looks:
Notice how along the “crease” some of the toolpaths are “jumping across” the crease. This will result in a much less well defined edge on the part. Now look at the general point density:
You’re going to get a much more faceted look with linework like this – the points are much more spread out, the line segments are longer, and you can see in many place the points align with each other in a way that will create flat spots in your part.
So, why not just turn the settings up even further that I have? Well there’s two reasons. First, as you increase the density of your mesh, it will take longer to generate the g-code. Second, at a certain point, the density of your linework may overwhelm the ability of your mill to process the data. When I have gone too dense in the past, the end result has often been something that looks worse than the same part cut with slightly less dense linework. So, the mesh settings and tolerance settings may work for you, but they may not. I’m using a machine controller made by AjaxCNC running Mach3. This particular hardware communicates via the ethernet port instead of the parallel port, as many controllers do. It’s possible that the linework generated with these settings will overload a machine running on the the parallel port, but really I can’t say that for sure. The lesson here is that each setup is unique, and figuring out what works on your machine is a constant work in progress. So approach each machine with patience, and lots of cheap stock that you can cut tests with.