Sunday, March 25, 2018

5-Axis Router Toolpath Setup

This post documents getting 3D geometry ready to cut on a 5-axis router. The two methods covered are 3+2 Milling and Swarf Milling. The software discussed is Rhino for modeling and Mastercam for toolpath programming. The issue of holding the work during cutting is also addressed.

Definitions

First, a few terms are defined:

3+2 Milling

In this form of programming the 5-axis router is treated like a 3-axis router which is operated on an arbitrarily rotated plane. That's where the name 3+2 comes from, functioning like a 3-axis with 2 additional degrees of freedom for orientation of the cutting plane. In the images below the end of the work piece is 3+2 milled. It's consists of a pocket and a contour but at an odd angle.
  

Swarf Milling

In this form of milling the 5-axis router is cutting with the edge of a tool, following a surface. That surface needs to be a ruled surface. Simply put that's a surface defined by sweeping a line through space. If you visualize the edge of the tool doing the cutting as the line, and the motion of the router as the sweep, you can picture why that geometry is what we are dealing with.

Fixturing

A key element of using the 5-axis router is how you hold the work for the milling to take place. The work piece must be held securely but must also allow freedom for the router to move around the part to mill it. The process of holding the work is called fixturing.

There's another term which is sometimes (mis)used: Jig. However, a jig implies that the work is held and the tool is guided by the jig. In the case of a CNC router the tool is guided by G-Code. So the term fixture is the more correct one.

Example 5-Axis Projects

This section provides links to a few furniture design and small object scale projects cut on the 5-axis router at Taubman College. 

Rhombic Triacontahedron Fabrication - This simple project uses swarf milling to cut the parts. The fixturing of the work piece is done using vacuum pressure.
  

Origami Side Table - The joinery for this table was cut with swarf milling. Some material clearing was done with 3+2. The fixturing was done with double-sided carpet tape to hold the part to an MDF panel which was held by vacuum pressure.
  

Torus Knot Table - This project uses both swarf and 3+2 milling. Several fixtures were needed to cut the parts for this table.
  

Hexagon Table - This project used both swarf and 3+2 milling. The fixturing was all done with vacuum pressure. Simple MDF fixtures were made to allow the vacuum pressure from the table to be transmitted to the surface of the part to hold it.
  

3+2 Milling Geometry

To program a toolpath using 3+2 milling you first need to define a plane that the cut will take place on. You can use the tools in the Planes tab of Mastercam to create and manage your planes.

Use the + icon at the top left to create a new plane.

It's easy in Mastercam to use the normal of a surface to define the plane. Or use the From line normal... menu item to do so from a line drawn perpendicular to the plane. In Rhino use can use the Normal option of the Line command to easily create such a line.

After you define the plane you can set it as active in the toolpath setup dialogs. Here's a Contour toolpath example. Select the Planes branch in the tree view on the left. The Tool plane name is shown in the middle column. Click the circled icon to change it to one of your defined planes.

Once the planes are set you can program just like 3-axis routing. For details on those toolpaths see Mastercam Toolpath Setup.

Swarf Milling Geometry

To set up a toolpath in Mastercam for swarf milling you need either two rail curves or a surface and a lower rail curve. The bottom edge of the tool will follow the lower rail. The edge of the tool will ride along the surface or the other curve.

In Rhino you can use the ExtractSrf command to extract or copy a single surface from a solid (polysurface). You can use the DupEdge command to create a new curve from the edge of one of your surfaces.

From the Torus Knot Table example the geometry was generated with a Python script. It output each part and the surfaces used for milling:

Each part was put in its own file and moved to the origin for cutting. Here is all the geometry for a part including the bounding box of the wood. Note that the front face of the wood is the 0,0,0 point:

What's required is just a subset of that. Minimally you need edge curves to swarf mill. For example, the three side surfaces which don't have dovetail components are swarf milled. The required lower rail is the lower curve and the corresponding upper edge is upper rail.

Inside Mastercam you can create Swarf Milling toolpath using the toolbar in the Toolpaths panel:

Inside the dialog presented you can choose the geometry to follow:

As you would expect controls are available to manage the lead-in/out, direction of cut, step-down and step-over, etc. These are set up in a similar way to the three axis milling.

Fixturing Parts

Holding the work piece steady during milling is critical. Here are some work holding examples from the projects above.

The Origami Table uses MDF spoilboards and heavy duty carpet tape to hold the parts. The tape can be cut through and doesn't affect the wood or the finish.


In the Rhombic Triacontahedron Fabrication project the parts are very small - about 2" x 4". They are held by vacuum pressure and two tiny pins. Without the extra friction from the pins the parts wouldn't hold. With them, they usually hold. Every 10th one would still fly across the room while cutting! The pins could have been pushed further into the wood to completely eliminate that but it would involve more work to remove them (deeper sanding or planing). I chose to leave them.

The Hexagon Table uses milled MDF fixtures with rubber gaskets to hold the work pieces:

Here you can see the MDF held to the pods. Some suction comes through the MDF onto the work piece to hold it to the MDF.

The Torus Knot Table also uses MDF held on pods. In this case the stock block is glued to the MDF.

Once 5 sides have been cut the 6th is cut holding the part in another fixture - in this case by the previously milled dovetail:

In the Wolff Sleigh Bed large MDF fixtures were used to hold curved parts:

Here the faceted part was smoothed on the other side:

You can also simply screw larger boards to the spoilboard. Note that you don't have an automatic tab generator as part of the swarf milling toolpath programming. So you'd have to create those with your own modeled geometry.

Part Origin / Router Alignment

Another key to successful setup is having a consistent and measurable origin point. That is, you tell the router using a work offset where the 0,0,0 point is located in space. That's the point that matches the 0,0,0 point in your Rhino and Mastercam files.

When the part is cut from a large block, as long as you are fully within the block, the accuracy is not super critical. Just make sure you are within the block!

When the parts are already milled and you need to match up to them then more accurate measurement is required. In this case a dial gauge is used to measure the exact position of the fixture to 4 decimal places.

The coordinates can be read off the router screen:

These are then entered as a work offset and the router position and the Mastercam positions are perfectly coordinated.

Reference

Here are some links to other related blog posts:

Taubman College 5-Axis Router Operating Procedure

Mastercam Toolpath Setup