Tuesday, November 1, 2016

File Preparation and Layout for CNC Routing

This topic discusses preparing a 3D model for 3-axis CNC routing. It's geared towards working with sheet goods (plywood) and toolpath programming in Mastercam. The comments about CAD software are specific to Rhino. It also is written assuming someone else is going to be routing your job.

Preparing to Model

Measure your material before you begin. For typical Baltic Birch plywood it's going to be around 18mm (0.71"). You need to know what your material is exactly.  This has a big impact on how your parts will fit together.

Make sure you use this value in your drawings. For example if you have a mortise sized to accept the material you'll want to draw it to the material thickness exactly. In general I recommend not modeling in joint tolerances (extra offsets to allow the parts to slide past one another). Draw them as exact fits - then accomplish the offset in the toolpath programming portion of the setup. More on this later...

Laying Out for Nesting on the Sheet

There are some very useful commands in Rhino to extract the contour and pocket curves from your 3D model. These are:

  • Make2D: This can generate 2D projections of your 3D model. I personally find this less useful than using the command below on a part by part basis. 
  • DupFaceBorder: This will give you back the curves from the entire face of a part. This includes the outer contour and any interior curves for joints. 
  • DupEdge: This creates curves from any selected edge of a surface or solid. 
  • SelDup: Use this command, followed by the Delete key, to remove any duplicate lines. Those can confound Mastercam at times (it tries to chain them end to end). This is useful for example after you use Make2D which sometimes introduces lines on top of each other. 
  • Orient3Pt: This command moves or copies and rotates objects using three reference and three target points. This lets you lay a 3D part down flat. 

Corner Preparation

Cylindrical router bits can't cut square corners. You need to clear out that corner material another way. The usual method is to drill out the corners. I've written a utility that runs in Rhino for this purpose. You can find it here: CNC Corner Fix Utility. It lets you pick the lines which meet in a corner and it'll will add the drill point automatically.

You can also draw your geometry to move past the corners to remove material. This is usually more problematic because the router has to slow down to get into the corner and change direction. When the cutting slows down the friction goes up. So the cutters get hotter. This reduces tool life and can possibly result in the workpiece or spoilboard starting on fire.

Setting Z heights is Important

Draw the sheet boundary at Z of 0. Have your contours, pockets and drill locations in the negative Z direction. For example if you have a contour you want fully through the material draw it at the material thickness of -0.71" in Z. If you want you can tell the toolpath programmer to use a small extra amount to cut through the material.

Draw your partial depth pockets at the correct depth in -Z. This way the toolpath programmer can just set the depth to "incremental" and the cut depth will be correct. This gives you control of the depths and not the toolpath programmer (who would otherwise have to type in the Z offset). If you like you can also have in mind a small Mastercam "Floor to leave" setting to make any fine tune adjustments in depth. A positive value will make the pocket less deep. A negative value will make it deeper.

If your drill holes don't go all the way through draw them at their correct depth in Z. Note that the person doing to setup should measure the tool to the tips of the edge of the drill bit, not to the center brad point. Otherwise the holes won't be drilled deep enough.

Preparing for Cutting

What info you should have before you visit the CNC assistant to set up cutting your job?

Make a list of tools you'll need. For a simple job it might look like this:

  1. 3/8" compression bit
  2. 1/4" downshear endmill
  3. 3/8" brad point drill bit
  4. 1/4" brad point drill bit

Inform them of your exact material thickness.

Layer Naming

Have your Rhino file organized by layer based on the type of cutting that you'll do. You'll likely want Contour, Pocket and Drill layers. And you'll want to encode knowledge about the tool and the offsets you'll need. Here's an example:

In this case all the contours will be cut with the same size compression bit. So no information is needed about the tool. However some of the contours will be offset to the outside of the line, and some will not be offset at all. Put those curves on separate layers.

The pockets will all be cut with a 1/4" downshear bit. However the offsetting differs based on the joint. Thus there are layers for offsetting inside, outside and not at all.

These offset are based on knowing how much extra material you want to remove for a good fit. You typically want to have mortises or pockets 0.01" larger than the tenon they accept. So this is 0.005" per side (0.01" overall). You need to think about this carefully.

Having your file organized in this way will make it much easier to understand for the toolpath programmer who sets up your job to cut. And much less error prone. The toolpath programmer will use the Mastercam "Stock to Leave" setting to account for these offsets.

Example Joint 1

This joint has two identical parts which half-lap over one another. This joint provides a lot of glue surface area and racking resistance.

The curves for cutting the joint are shown below.

There are two tenons which nest in two mortises. The tenons should be cut slightly smaller and the mortises slightly larger. This is due to the high degree of curvature in the joint. Thus both sides of the joint are offset slightly.

The orange lines are for a pocket. This should be cut slightly outside the line - outside the boundary of the curve. So the Mastercam setting would have a negative Stock to Leave value. This will make the pocket slightly larger than drawn.

The blue lines are for the joint portion of the contour. These lines should be offset inside - towards the center of the piece. This will make the opening slightly larger than drawn. These will have a negative Stock to Leave setting.

Example Joint 2

This joint joins two boards together edge to edge using dovetails on each side of the parts.

The curves for cutting the joint are shown below.

When the parts are straight and simple the offset can be tighter. There is a high degree of curvature to this joint. There needs to be extra space between the parts (more than the usual 0.01"). Offset the mortise outside to make it larger by 0.01". Offset the tenon towards the inside to make them smaller by 0.01". This leaves a gap of 0.02" which is larger than usual but necessary to accommodate the curvature. The orange line is a pocket which is offset towards the outside marking larger mortises. The blue line is a contour which is offset towards the inside of the piece resulting in smaller tenons.

Example Joint 3

This corner joint features a dovetailed key to hold the parts together. There are three tenons and three mortises.  

The tenons should be cut slightly smaller or the mortises slightly bigger. Because these parts are fairly simple without a lot of curvature a single offset on one of the mating parts of 0.01" is sufficient.

Many More Joint Examples

More on specific wood joints can be found in this post: CNC Cut Wood Joinery.

1 comment:

  1. Nice writeup, I found this site after asking CNC router parts about 4th axis setup. I finally found the site that originated all of those pinterest "CNC jointing" posts. None of them ever brought me here.
    I am about to order a 4th axis and your site convinced me that it might be worth the time. The cost is very little, shockingly.