Tutorial: Pocketing and Island Pocketing

This tutorial will cover pocket machine operations in more depth (if you will excuse the pun). Along the way it will also cover - Loading DXF files, CAD drawing, object transformations and Automatic Island Pockets.

Download the files used in this tutorial.

Step 1 - Load a DXF file

I have included a heart DXF in the above zip file. If you are married and fanatical about CNC, this shape can come in very handy indeed!

This shape is a nice and clean, closed polyline. If your DXF files contain many small segments or uses non polyine objects you should tidy the drawing before creating any machining operations.

To convert objects to polylines, select them, then select Convert To - Polyline from the drawing's context menu, or when the drawing window has focus, use the CTRL+P shortcut key.

Step 1 - Load a DXF file


Step 2- Free hand CAD drawing

Use the polyline drawing tool Draw Polyline to draw a random shape around the heart. This will form the outer boundaries of an island pocket. For the last point, press the C key to close the shape, or click on the first polyline point (the cursor should snap to it), then press ENTER or click the middle mouse button.

Step 2 - Free hand CAD drawing


If the polyline does not sit evenly around the heart, you can free hand move objects by selecting them, then hold the SHIFT key and drag objects with the left mouse button. To position objects more accurately, use the Transform - Translate drawing context menu. This will translate an object given an origin and destination point.To make the shape a bit rounded create an offset shape. Select the polyline, then click Edit - Offset from the drawing context menu. This will prompt for a distance to draw an offset polyline. Positive offsets will be outside the polyline shape and negative offsets will be inside.

To rotate a shape, select it then look for the Transform property in the object property window. Click the ellipsis button to the right of the Transform value to open up the transformation dialog.

Transform property Transformation Matrix Dialog


The positive Z axis will be coming out of the screen towards you. If you place your right thumb in the positive Z direction, your fingers will curl in the direction of a positive rotation about the Z axis. This right hand rule applies to rotations about all the axis. Select Z from the Axis drop down list, enter an angle in Amount then click Apply. Multiple rotations can be applied as along as Apply is clicked between each. To reset the transformation, click Identity. Click OK when done.

NOTE: For CamBam free beta version 0.8.2 and previous, transformations need to be applied before generating toolpaths. This is done by selecting all transformed geometry the selecting Edit - Apply Transformations from the top menu. Transformations can still be manually applied in CamBam plus 0.9 onwards but should not be necessary.

Step 2 - Offsets, translations and rotations


Step 3 - Pocket the heart

Select the heart shape then insert a pocket machine operation using the pocket tool CAM Pocket MOP. For pocketing basics, please see the Stepper Mount tutorial in Getting Started.

The important thing to remember is that the TargetDepth should be lower than StockSurface. If stock surface is at zero then the target depth should be negative.

CamBam can cut deep pockets by generating toolpaths at progressively deeper cutting levels. The distance between each cut level is specified in the DepthIncrement property.

To ensure a final light finishing pass at the lowest level cut, enter a small value in the FinalDepthIncrement property (0.1mm , 0.004"). This will be the depth of stock removed at the bottom pass of the pocket.

Another useful parameter is RoughingClearance. Enter a small value here to specify how much stock to leave remaining between the walls of the pocket ans the target geometry. This stock can then be removed using a later finishing profile.

If a negative RoughingClearance value is entered in , the geometry will be over cut by this amount. This is very useful when making inlays or die cutting. The RoughingClearance can be adjusted so the positive and negative shapes fit very closely. I like to adjust roughing clearance while the stock is still mounted in the machine so I can test it with a previously cut inlay.

Step 3 - Inner pocket

Step 4 - Creating an Island Pocket

As of CamBam plus beta 0.9 onwards, island pockets can be created automatically by selecting inner and outer polylines then inserting a pocket as usual.

Two levels of nesting are currently supported, that is if 3 concentric shapes are selected for a pocket, the pocketing routines will interpret this as a pocket within an island within a pocket. In this tutorial we could have used just 1 pocket from all 3 polylines, but for clarity 2 separate pockets were used.

To save entering in all the pocketing parameters for the second pocket, right click the pocket machine operation in the drawing tree then select Copy MOP To Template. This will store all the parameters for the selected machine operation in the currently active machining template, which is shown in the drop down template list on the toolbar. Whenever a new machine operation is created, it will used the information stored in the selected template.

To create a new template, type a new name in the template selection list and press enter. To create a new template, select 'Yes' at the confirmation dialog. No will rename the current template and Cancel will do neither.

To apply a template to an existing machine operation, right click the mop in the drawing tree and select Apply Template to MOP.

With the 2 outer polylines selected, insert another pocket CAM Pocket MOP. Now generate the toolpaths. If all is well, the routines should detect that you intend to do a island pocket and will generate toolpaths in between the 2 curves.

NOTE: The free CamBam version does not yet support automatic island detection. For this version a Region needs to first be defined. Select the 2 outer polylines as before then select Edit - Region - Convert to Region, from the top menu. Now select the region and insert a pocket as before.

Step 4 - Island Pocket


Step 5 - Show Cut Widths

Before we continue, we will turn on the ShowCutWidths machining property to indicate the areas that will be machined. Select the machining folder from the drawing tree, then under ToolpathVisibility find the ShowCutWidths property and set this to True. If you have not done so already, regenerate the toolpaths.

Show cut widths will shade the areas that will be cut. This feature currently only works when the drawing view has not been rotated. It should be easy to spot any areas that are not shaded and will therefore have stock remaining.

For island pockets, the inner island walls will contain pieces of un-cut stock. This is by design and the remaining stock can be trimmed away using an outer profile on the pocket islands. This can often be done at full cutting depth so will be more efficient that tidying the inner profiles at each depth level pass.

Step 5 - Show Cut Widths

Step 6 - Add a Finishing profile to tidy inner islands.

To remove the excess stock identified in the previous step, select the island polyline then insert a profile operation CAM Profile MOP. This should inherit most of the parameters copied to the active template.

Make sure the profile's InsideOutside property is set to Outside. You can also change the DepthIncrement to be the positive target depth so it will cut the profile at full depth.

Regenerate the profile and you should see the remaining stock now shaded.

Step 6 - Finishing Profile


Step 7 - Machine operation renaming.

The drawing is basically complete and ready to save and generate gcode, but first we will do some cosmetic changes to help manage the drawing.

Machine operations can be given a more meaningful name, to help with readability and debugging. To rename a machine operation, select it in the drawing tree and press F2, or click the name a second time. Avoid using special characters in the name such as parenthesis as these currently cause problems due to nested comments.

To change the order of machine operations, right click them in the drawing tree then use the Move Up and Move Down menu commands.

Create the gcode as normal. The new machine operation names will be present in comments within the gcode file. This is very useful for diagnostic purposes.

Step 7 - Renaming MOPs Simulating with CutViewer Mill
Copyright (c) 2018 HexRay Ltd