Computer-Controlled Machining

This week, Christophe Reyntiens, a former Fab Academy student, explains us how to use Fusion360 to create the G-code for our milling machine.
It's is a High-Z S-1000/T by CNC-STEP; controlled with LinuxCNC.

He gave us a demo piece, that use the basic milling operations:

It has several pockets, with different depths, an open pocket on one side and holes.
We used the Manufacture Workspace from Fusion360 to create the G-code.
Manufacture Workspace
In this workspace, we need to use MILLING tab.
Setup
In the SETUP menu, select New Setup.
In the dialog box:
- Select the Stock tab (the "stock" is the piece of material (wood in our case) that will be manufactured).
It appears as a translucent yellow box.

- In Mode, select Fixed size Box
- Define the dimension of your material: Width (X) (should be the longest side), Depth (Y) and Height (Z)
- Change the Model Position to Offset from bottom (-Z) and set the Offset to zero.
This ensures that all milling will be done on the top.
This suppose that milling should only be done on one side.
- In Work Coordinate System (WCS), for Orientation, choose Z axis/plane and X axis
For Z Axis, select a vertical edge on your model.
if the Z axis points to the bottom, check Flip Z Axis

For X Axis, select an horizontal edge along the longest side of your model.
It will be align with the longest axis of the milling machine.

For origin, select Stock box point.
Click on Box Point, points should appears on the stock box.
Select the point in the middle of the top of the Stock.

Select the Front view and zoom on the origin.
You can (and should) check that the model is at the bottom of the stock and that the origin is at the top of the stock.

Tool creation
Before defining the milling operation, we need to define the tools we'll use.
In Manage menu, select Tool Library.
First, we need to create a library to store our tools In the left panel, click on your username in Hub Libraries and select New Library in the menu.

- Click on the '+' icon (New Tool).
Select the desired tool. Here, we 'll create a Flat end mill.

The Generaltab contains documentation informations that has no influence on the milling process.

The Cutter tab contains all the geometric data of the tool.
These data can be found in the manufacturer documentation.

The Cutting data tab contains all the geometric data of the tool.
These data can be found in the manufacturer documentation.

You need to enter some of them, the others are automatically computed. They are indicated by the 'Fx' in their value field.
For our 6 mm wood milling tool, parameters are:
- spindle speed: 20.000 rpm
- cutting feedrate: 2.000 mm/min
- ramp feedrate: 1.000 mm/min
2D operation: Face
In general, the first operation to perform is milling the stock down to the highest surface of the piece.
The right tool for this operation is Face, in the 2D menu.
Select the desired tool in the drop-down menu. I chose the tool defined in the previous section.
The Feed & Speed values are automatically displayed, and can be edited if needed. However, if the tool was correctly defined in the library, no need to change anything here.

By default, the Face operation will remove matter on the whole stock surface.
You can reduce its working surface by selecting a closed contour defining the area to mill.
Here, I took the bottom contour (in yellow). It encloses the all piece.

Check that the Feed Height is from Top Height with a positive Offset (at least 5 mm) and that the Top Height is From Stock top with no Offset.
In our case, we will clamp the stock with countersunk screws. If clamps are used, check that the Retract Height is high enough for the tool to travel above them.
It ensures that the tool will start its work 5 mm above the stock.

Set Stock Offset to the tool width to increase the milled area. This will be useful for the final contouring. Check that the Stepover is smaller than the tool width.

When the operation parameters are set, Fusion computes the tool travel.
The result is shown by selecting the operation in the browser tree

2D Pocket
Next, we used 2D Pocket in the 2D menu, to mill the central pocket.
As for the Face operation, simply select the desired tool in the drop-down menu.

To define the pocket to mill, select its bottom face. Alternatively, a contour can be used.

Check that the Feed Height is from Top Height with a positive Offset (at least 5 mm). The Top Height can beset to Model top with no Offset. Indeed, thanks to the Face, we don't need to start at the stock's top.

Check Multiple Depths. Set Maximum Roughing Stepdown to an acceptable value for your tool. In our case, it's half its diameter.

When the operation parameters are set, Fusion computes the tool travel.
The result is shown by selecting the operation in the browser tree

The other closed pocket can be milled the same way. If the tool is too big for some parts of the pocket, another 2D Pocket operation can be applied with a smaller tool.
In this case, the Rest Machining box, on the Geometry tab can be checked to ensure that only the remaining matter will be milled.
2D Adaptive Clearing
This operation is used for open pockets. It's similar to 2D Pocket
The main difference is in the Geometry tab. You select the bottom face (or contour) of the pocket to mill, as in 2D Pocket.
Then you have the choice to check or uncheck the Stock Contour checkbox.
If it's checked, the milling operation will start outside the stock and extend the pocket to the edge of the stock. Both results are shown below:



Holes
If the hole is circular, Circular operation (in 2D menu) can be used.
Otherwise, use the 2D Pocket operation.
In both case, in the Heights tab, the Bottom Height must be set to Model Bottom with a small negative offset (-0.3 mm) to ensure that all matter will be removed.
Trainig piece
Before starting our main assignment, Christophe asked us to design and manufacture a smaller object to practice our new skills.
I decided to make a decorative plate with a rocket, as it's the subject of our students' project this year:

I used Adaptive Clearing to mill the rocket and 2D Contour to cut the plate from the stock. They have the same tabs as the other operations.
However, for the 2D contour, we need to change parameters on the Linking tab.
Indeed, for the operations, the tool enter the matter in a spiral movement, as a milling tool can't move purely vertically. For contouring, it makes more sense to enter following a ramp along the contour.
As shown above, in the Linking tab, uncheck Lead-in and Lead-out boxes, check Ramp box, define the ramp angle and the stepdown.
Post-process
Last step is to create the G-code for the milling machine.
This is done using Post Process in the Actions menu:

Choose the Post-processor for your machine. In our case it's linuxCNC and give a name to your G-code file.
Milling
The use of linuxCNC and the G-code problem we encounter with our first piece are very well documented on Fabio's website.
Here is a check-list to use the milling machine:
- mark the center of stock's top face (zero of the piece)
- screw the stock on the "martyr"
- mount the right tool on the holder
- Check the tool motor speed
- turn machine on (the button is on the controller)
- make it do homing
- use jog actions to move the tool above the marked center (x,y)
- Put a piece of paper under the tool
- use carefully (0.1 mm steps) the jog action to move the tool down (z) until you can't freely move the paper
- zero-touch each axis. For the z-axis, put the position at 0.1 mm (paper's thickness)
- move the tool up 2 cm to be in a safe place
- start the milling
- when there is too much chips, pause the milling and use the vacuum cleaner to remove the chips. Turn the tool off with the switch
After the milling
- if needed, move the tool out of the way
- clean the chips
- unscrew the stock
- use a wood chisel to tear off the tabs
Here is the rocket plate at the end of the milling:

I used MDF and we can see that the edges are pretty messy. It's due to the structure of the MDF and can be fixed by a good sanding.
After the sanding, I apply varnish to protect it (and make it prettier):

Assignment
For my assignment, I decided to design a chair, based on this model:

However, there is no right angles between the pieces. It leads to complicated geometric computation. I avoid this problem by making all connections between pieces at right angles.
Here is the final result:

I have to add dogbones to the pockets to ba able ton connect the pieces. For example, here is a piece of the chair's back:

Here is the detail of one pocket, in the sketch:

I added a arc tangent to the small side. It's radius is equal to the tool's one.
Manufacturing
Our fab lab have only one CNC machine, but it also have a Shaper Origin. It's a handheld CNC router:

It works as a classical handheld router with one major twist:
It uses image recognition to create a workspace where it knows its position. The milling motor is mounted on a motorized holder. This allows the router to correct the movement of the operator. That replaces the need of guides.
First step to use the Shaper Origin is to mount the tool:
- Disconnect the power plug
- Loosen the spindle mount bolt
- Lift the spindle out
- Press the collet lock and loosen the collet nut to remove the previous tool
- Insert the new tool and tighten the collet nut
- re-install the spindle and re-connect the power plug. Check that the power switch is in the "OFF" position.
Next, we need to prepare the workspace:
- Hold the stock in place with screws or clamps
- Place ShaperTape on the stock:

Distance between strips of tape should be 8 cm. They don't have to be parallel and can be put in the milled zone.
Next step is to scan the workspace. On the right of the screen, we have 3 menus. Select Scan

- On the left of the screen, select NEW SCAN and move the router around the workspace. It detects the patterns on the tape and creates an image of the stock:

We can see the strips it has scanned (in blue) and other not yet scanned (in black). In the top-right corner, a "Quality meter" indicates if, at the actual position it can see enough strips to be able to position itself in the workspace. On the picture, it' red, meaning that we should add some strips in this area.
If needed, we can use ADD TO SCAN to add strips after the initial scan.
The router expect .svg files to describe the piece to cut. It uses the following color code:

I started by the chair's back, as it has a simple form (a rounded rectangle). Moreover, it also has pockets, which allow me to try both cutting and "pocketing".
Fusion360 has a add-in to create Shaper compatible svg. It can be found on the Autodesk app store.
Once installed, it can be found in the Utilities toolbar (the white triangle in the black circle icon).
It fairly simple to use: select the face that will be on top during milling and click OK.
It creates a svg file with the color code:
We can see that the main body is black, meaning that it should be cut on the outside and the pockets are filled in gray as expected.
The router has a port for a USB key.
In the DESIGN menu of the router, you can place your piece on the workspace, using IMPORT

In the CUT menu, you can select the tool diameter and the cut depth. If multiple passes are needed, increase the depth between each pass.
Obviously, it's a good idea to start with the pockets, before actually cutting the piece.
I encounter a problem for the pocket: the router seems to add an offset to the pocket contour, leading to a smaller pocket that intended:

We can see that the pocket is 2 mm too small (38 mm instead of 40 mm)
I added an 1 mm offset in the CUT menu, it allows me to mill up to the intended contour and also in the dogbones:

After finishing the piece, I checked in the documentation to find that the router automatically adds an offset to avoid that unwanted movement causes an overmilling.
They advice to use an Inside cut cut on the pocket contour after the pocket cut.
I then cut the contour of the piece without problem.
I remove the offset.
I made the first pass with a depth of 3 mm. It goes smoothly, leading me to try a 6 mm pass next.
It also goes well.
For the last pass, I used 19 mm, as the stock is 18 mm thick. I intentionally forgot some of the contour to create tabs.

I used a wood chisel to break the tabs and used a file to smooth the edges.