Here are my notes about how to get cnc-tookit running on a modern Windows 10 and create 4 and 5 axis toolpathes with it.
I may add screenshots to illustrate my notes at a later point.
ObjectiveI'm trying to figure out if and how to generate 4 and 5 axis G-Code in CNC-Toolkit to run on my heavily modified YooCNC 6040 machine.
Getting the software
- get GMax
- get CNC-Toolkit
- The registration website for the (always free) GMax software no longer exists... GMax registration workaround
- I haven't looked at these yet
Setting up GmaxBefore you start, you should select the system unit of meassurement in Gmax using Customize-Preferences... and then General-System Unit Scale.
Geometric assumptionsSome assumptions I do about the CNC machine:
- We use a 4 axis machine with the A axis mounted on the bed of a carthesian CNC mill.
- The A axis is running along the X axis (along Y it would be the B axis after all)
- The center of rotation is at Y=0 Z=0
- The stock starts at X=0 and ends at X>0
- The stock is cylindrical.
- positive Z mean "up" from the center of rotation towards the spindle.
- We use a ball nose cutter
- We are only interested in FINISH-passes. (For roughing 3 axis milling of X+A+Z is enough)
- STL-file and tool sizes and machine coordinates are in millimeter
From STL to G-CodeI used this tutorial to make these notes.
- Make sure your object is already scaled to the right size.
- Orient your object along the Y axis.
Convert STL to 3DSGMax doesn't seem to understand STL or the unual CAD file formats.
So we need a converter.
3D Exploration 1.5 can be found here : cnczone.com/forums/attachment.php?...
(Yes, you need a user account in the CNCZone forum.)
In Windows 10 you need to install this using compatiility settings.
It is discontinued but you should of cause still register it for 40.77 € +19% sales tax = 48.52 €.
If objects in the original file exceed the 64,000 faces per object limit for .3DS, it splits info face groups that you need to reunite inside Gmax using the Editable Mesh 'Attach' or 'Attach List function.
- Open "3D Exploration 1.5".
- Select your file on the right side.
- Select File-Save As... and the 3ds file format.
combine face groupsOn the right side you have a number of tabs,
- In the first tab, you can assign a name to your objects to identify them.
- In the "view" tab with the monitor icon, you can hide objects that clutter your view and render them as solid objects.
- In the tools tab, you can "attach" and "attach list" multiple face groups into a single mesh.
- File-Import your convertes mesh.
- Make sure it's oriented along the X axis due to limitations of cnc-toolkit.
- Note down the size of your stock.
- Select your object and in the top right panel, give it a name.
- Run the "CNC-Toolkit-4.34b.ms" MaxScript file using the menu.
- XYZ is a 3 axis mill
- XYZA has
- a 4th axis mounted on the work-surface that rotates around X
- XYZAB has
- a 4th axis mounted on the work-surface that rotates around X and
- an additional 5th axis "B" mounted on the Y gantry, rotating the spindle around Y
- XYZABC has a trunnion arm mounted on the Y gantry
- C mounted on the trunnion rotating around the vertical axis
- B mounted on the C axis to rotate perpendular to to C
- XYZAC has a 4th and 5th axis combination mounted on the work surface.
- A rotating the table and
- B rotating the part on the table surface
For an axis mounted to the work table, as with XYZA and XYZAC I assume it's the distance from center of rotation to the origin point.
Create a cylinder of splines
- In the "parallel splines" section choose "helical" or "cylindrical"
- Enter apropriate X, Y and Radio -dimensions for your stock.
- Click "Make parallel splines" and wait a second for them to apear.
- "Stepover Distance" controls the distance of parallel toolpathes at the outher diameter.(Oviously the closer they are to the center, the closer they get. Keep that in mind for stock that can melt or catch fire.)
- Despite the name "Stepover" is an absolute distance between tool passes and ignoring the tool diameter.
- "Stepover" also ignores any changes in radius during the later projection. As the spline gets near the center of rotation during projection, the resulting toolpathes are much closer then the initial "Stepover" distance.
Project splines onto surface
- In the "project spline" section, click "object" and select your object.
- Select the spline.
- Click "project around X axis"
- Delete the unprojected spline using edit-delete (it's no longer needed and can be re-created with just 1 button)
- Height offset is otherwise known as a skin depth and allows for roughing passes
Create tool vectors along projected spline
- Up in the "angle control" section, choose "Use Reference Surface".
- Then "Pick Reference Surface".
- Select your object and the button should not read "Ref Mesh =
- Select the projected spline. (Not the original spline. You can delete that one.)
- In the "toolpath generator" section, choose "Toolpath from Shape".
Generate g-code and show animation
Now you can use the "Tool Control" and "Postprocessor Options" sections to export your g-code to the "Script listener window" to copy and paste it.
(The other options here work in 3D Studio MAX but not in GMAX)
You can find that windows with F11 or in "MaxScript"- "MAXScript Listener..." .
After postprocessing, you can use "/" or the play-button in the lower right to see an animation of the milling process.
TODOI have not yet fully understood how to compensate for the tool shape.
The tangent mode seems to use the entered tool diameter and offset it along the surface normal.
This simple method would of cause be problematic in pockets narrower then 1.0x the tool diameter that can not be milled with a tool of this size. However an infinitely small tool will try and the applied offset will cut widen the pocket beyond the intended geometry.
As an alternative I should test importing an existing 3 axis toolpath and having cnc-toolkit perform the too-orientation only. Aparently toolpathes from CamBam (trial versions) can be exported as DXF and imported into GMAX. I don't think that works for gcode -toolpathes of my favorite 3 axis CAM software.
I have also not understood yet how to use your own geometry to represent your machine for better visualision and for collision detection. Aparently you can "link" your own geometry to follow the path of the generated stand-ins and then hide the stand-ins.