CNC Toolkit

CNC Toolkit - Multi-Axis Creative Machining

Although primarily developed and tested under 3DS MAX, the CNC Toolkit also works with Autodesk's Design Max and GMAX, which share the same core code.

(GMAX is a free, limited version of 3DS MAX, but it can still use most of the CNC functions. The primary limitation of GMAX is no file export, although you can manually copy and paste the G-Code commands from the program's script listener to an external file approx. 10,000 characters at a time.
Download GMAX here.)

The CNC Toolkit is available for download from:
http://code.google.com/p/cnctoolkit

VERY BASIC INTRODUCTION

Installation

Copy the script to your script directory, i.e.. C:\3DSMAX\Scripts.
Run the script from Menu, MaxScript, RunScript. On any error just run the script again.

Overview

cnctk1

1. Start with a Spline
The Spline shapes are Bezier Curves which can be created from scratch or imported from DXF, AI, HPGL, GCode, etc.
These splines can be edited at the vertex level and have any number of modifiers applied to them. Editing and modifying the splines on a vertex level allows for a great deal of control over the final toolpath.

2. Convert the Spline to a Toolpath
To create the toolpath the splines are subdivided into incremental moves and each point has an associated yellow vector which determines the tool angle.
The toolpath and vectors can still be edited on a vertex level at this stage.

3. Export the Toolpath
The toolpath can then be exported to GCode, DXF, AI, HPGL or Roland CNC.
Each vertex point on the toolpath becomes a move and each vector translates to the angle that the point is machined at.
The post-processor options determine how these moves translate to the kinematics of the machine tool.

cnctk12

This section is very out of date but gives a brief overview.
Please see Danny's manual

4 Axis Tutorial - Machinining a gunstock

Introduction to full 4-axis cutting, keeping the tool perpendicular to the objects surface.
This tutorial uses version 3.07w and a fairly low resolution toolpath to reduce file sizes and processing time.


1. Gunstock imported into GMAX as a 3DS file positioned along the X-axis.

Getting the part to lie along the X-Axis
Move the part’s pivot/centre point to the part's centre
Click 'Select and Move' button
- Hierarchy Panel – Affect Pivot Only – Center to Object – Click off Affect Pivot Only
However in the case of an object like a gunstock we want all the stock lying along the X-Axis so move the Pivot Point up a bit.
Use the XYZ coordinate boxes at the bottom of the screen to move the part to Y0, Z0, the X coord depends on where you want the part in relation to your zero point.

Running the CNC Toolkit Script
Goto the MAXScript Menu - Run Script - choose 'CNC_Toolkit_Beta_MaxScript_3.07w.mse' (if you havn't downloaded and copied this to your GMAX, Scripts directory then do that first)


2. A 'Parallel Spline' Helix is created surrounding the Gunstock.

Create Parallel Splines
Go to ‘Parallel Splines tab’ and enter:
Stepover Distance 0.05
X Dimension: 33 (this will overlap the part a little)
Y Dimension: Not used
Radius: 4
Method: Helix
Click 'Make Parallel Spines'
Should result in a spline called ‘Helix01’

Project Spline
Go to ‘Project Spline’ tab
Click on ‘Pick Reference Surface’ then click on the part which should then show the part name.
Make sure that the spline (Helix01) is selected as the spline to be projected.
(For actual cutting you'll probably want to increase the spline resolution, if so then adjust the 'Spline Subdivision' settings)
Click ‘Project Around X-Axis’
Should result in a spline called ‘Projected01’
If there’s nothing for the spline to project onto then it stays as it was, so at the ends of the part you may have some cleanup to do.
You can delete ‘Helix01’ if you want

Edit the Projected Spline
Select ‘Projected01’, Go to Modify Panel, Vertex Selection and delete unwanted points from the overlap at the start and end of the spline.
Hint: You can click and hold down the left mouse button to select multiple vertices.
Come out of sub-object editing mode, click on Editable Spline in the modifier panel.

Adjust the Zero Point position
Move the Zero Point up say 4”

Choose Vector Calculations Method
Choose ‘Use Reference Surface’ and select the part if it’s not already showing in the Reference Surface pick box.

Make Toolpath
Make sure you have selected ‘Projected01’
Go to ‘Toolpath from Spline’
Tool Clearance: 2
Cut Depth: 0
Tool Diameter: 0.75
Calculate Vectors: On
Subdivide Toolpath: Off
Click ‘Make Toolpath’
(This can be slow with complex toolpaths)

Export Toolpath
Select ‘4-Axis: XYZA’ under ‘Export Options’
Select Feedrate under ‘Toolpath Export’
Select 'Script Listener' under 'Export Destination' (GMAX can't export to file)
Click ‘Export Toolpath’
Copy and Paste the GCode from the Listener window

Press ‘Play’ from the bottom right of the screen or ‘/’ on the keyboard to view the tool motion