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.
Training 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):

Personal 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 one side of the pocket. It's radius is equal to the tool's one.
Using the Shaper Origin
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.
Mounting the tool
First step to use the Shaper Origin is to mount the tool:
-
It's good practice to un-power a machine while performing dangerous operation, such as tool changing.
Moreover, it's way easier to work on the unmounted spindle, when unplugged as the cable is quite short.

-
No need to completely remove the screw (in the red circle). Loosen it until you can lift the spindle upwards, and out of its holder.
The port for a USBkey can be seen on the picture.

This picture shows the unmounted spindle and the associated tool: the 4 mm hexagonal wrench to loosen the holder and the 19 mm wrench to loosen the collet.

- 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.
Workspace preparation
There are 2 possible way to use the Shaper in our fab lab:
- Use the Shaper Workstation
- Use the Shaperape
Shaper Workstation

It has a plate with markers (black rounded rectangle with white dots). The Shaper uses these markers to position itself on the workspace (more on that in the next section).
The front part is where the stock goes. It has 2 clamps to secure the stock.
The maximum size for the stock is 10 cm x 40 cm.
Stock alignment
The stock's top face must be flush with the plate's top.
ShaperTape
Alternatively, if the piece doesn't fit in the limited space of the workstation, ShaperTape can be used:

- Hold the stock in place on your workbench, with screws or clamps
- Place ShaperTape strips on the stock.
Distance between strips should be at most 8 cm. They don't have to be parallel and can be put in the milled zone.
Workspace scanning
Next step is to scan the workspace, so that the router discovers its work area.
- Turn the router on
- On the right of the screen, select the Scan menu

- On the left of the screen, select NEW SCAN

The screen show the field of view of the router's camera, as a trapezoid.
The blue markers are the ones already scanned by the router, the black ones still have to be scanned.
- Move the router around the workspace
It combines several pictures it took to create a complete image of its workspace.

- When the workspace is completely scanned, push the green button on the right handle to save the workspace
If needed, we can use ADD TO SCAN to add new strips or a new area to an existing workspace.
Exporting a Fusion360 part for the Shaper
The Shaper expect .svg files to describe the part to cut.
It uses the following color code:
| Cut type | contour color | infill color |
|---|---|---|
| inside cut (holes) | black | white |
| outside cut (contour) | black | black |
| on-line cut | gray | white |
| gray | gray | |
| Guide | blue | blue or white |
Guide is an uncuttable feature in the svg file that can be used to align the part with another feature on the workspace.
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.
Importing a part in the Shaper
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

The Shaper shows the svg on the USB key

After the part was selected, you can move the Shaper to position the part on the workspace

Checking the part position
After the part placement, select the CUT menu

The screen zooms on the tool position in the workspace.
the white dor is the center of the tool.
The circle represents the zone where the shaper can correct our errors.
Here, we see a hole. The Shaper knows that it must cut on then inside.
The dotted line is the tool trajectory.
The green line is the edge of the hole.
- Follow the tool trajectories for your part to check if the Shaper can move freely (without bumping on clamps for example).
- in the top-right corner of the image, a marker shows the accuracy of the position estimation.
If it turns red, it means that the camera doesn't see enough markers to precisely determine its position in the workspace.
If it happens during your check, ShaperTape strips should be added on the workspace and scanned.
Cut parameters
In the CUT menu, you can entre the parameters for the cut, in the tabs on the left.
Cut depth
- Enter the cut depth.
If multiple passes are needed, increase the depth between each pass.

Cut type
This should be automatically set by the svg colors.
However, it's possible to change it if needed.

Offset
This tab allows to add an offset.

Select the tool diameter and 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.