SolidWorks is a favorite tool of engineering professionals. To fabricate your SolidWorks designs on theBantam Tools™ Desktop PCB Milling Machine, a few steps are required. Because SolidWorks is only a design application, an additional CAM (computer-aided manufacturing) application or plugin is required to generate toolpaths and G-code that the milling machine can follow to mill the design. For more information on the overall CAD and CAM process, see our CAD and CAM guide.
As a SolidWorks user, you have two main options:
Option 1: Model your part in SolidWorks, generate toolpaths and G-code from within SolidWorks using an integrated CAM plugin such as HSMWorks or MasterCAM, and then load the G-code file into the software
Option 2: Model your part in SolidWorks, export it as a STEP file, generate toolpaths and G-code from that file in a separate CAM application such as Fusion 360, and then load the G-code file into the software
Option 1 (using an integrated CAM plugin) is easier, more convenient, and provides a higher-end feature set. It allows you to skip the added steps of exporting a STEP file and loading it into a separate CAM program. The only tradeoff is that it’s often more expensive. However, if you expect to be iterating rapidly and milling a lot of prototypes of your part, the extra speed and convenience may be worth it.
If you choose to go with Option 2 and use a separate CAM application, this guide demonstrates the process of exporting a STEP file from SolidWorks, which you can then import into a CAM application such as Fusion 360. From there, you can generate a G-code file that can be imported into the software and milled on the milling machine.
Option 1: Use an Integrated CAM Plugin (HSMWorks)
This section shows how to use an integrated plugin to generate a G-code file that can be imported into the software to mill your part. Autodesk products have excellent integration with the milling machine, so this guide specifically shows how to use HSMWorks/HSMXpress. (For non-Autodesk integrated plugins, you’ll need to export using a generic post-processor and hand-edit your G-code so it matches up with our G-Code Reference Guide and avoids the unsupported commands. We’re working on making this easier.) For clarity, “HSMWorks” refers to HSMWorks or HSMXpress.
HSMXpress is free and can be found here.
Step 1: Install the milling machine post-processor, if necessary.
Before using HSMWorks to generate G-code for the milling machine, you’ll need to check if the milling machinel post-processor is installed.
In your computer, navigate to C:\Program Files\HSMWorks\Posts and look for a file named othermill.cps. If it’s there, you can skip to Step 2. If it’s not there, continue in this step.
Download and unzip the Othermill post processor.
Put Othermill-tinyg-m3x.cps into your HSMWorks posts directory. It’s typically located at C:\Program Files\HSMWorks\Posts.
Step 2: Switch to CAM mode.
Once you’re done modeling your part in SolidWorks, click the CAMManager icon (highlighted in red below), which will switch to the CAM tab. The CAM tab contains all the available milling strategies that you can use to mill your part.
CAMManger button and CAM tab selected in SolidWorks.
Step 3: Install the Othermill tool library.
The Othermill tool library contains digital versions of all the tools we sell. By accurately representing the geometry of the tools you’ll be using to mill your part, you can produce physical parts that match your digital designs.
Download and unzip the Othermill tool library.
In HSMWorks, click the Tool Library button to open the Tool Library window.
Select My Libraries and click the New Library button.
Tool library window with new library selected.
Right-click the new library and select Import Tools from Library.
Select the Othermill Tool Library .hsmlib file and click Open.
Import Tool Library window with Othermill tool library selected.
- Once you click Open, you’ll see a list of Othermill tools.
Othermill tool library successfully imported into HSMWorks.
Step 4: Choose your machining strategies.
Here is where you decide how you’re going to machine each feature of your part. If you’re new to CAM, there is a bit of a learning curve. CAM is a pretty deep subject, but each CAM application has tutorials to help you learn how to use it. Here are Autodesk’s HSMWorks tutorials.
A Bore and two Contour toolpaths (blue) generated for a part in HSMWorks.
Step 5: Post-process your toolpaths.
Once you’ve generated your toolpaths, select the one you’d like to post process.
- Click the Post Process button.
- Select the Othermill post-processor from the drop down list.
- Click Post.
- Save your file.
If you’re having trouble post-processing your file (if HSM generates a .gcode.failed file, for example), you can see what the errors are by opening the G-code file in the built-in editor. To do this, check the “Open NC file in editor” box before clicking Post.
After saving your file, the NC editor will open your G-code so you can edit it before saving. If there are any errors, they’ll be written here.
Congrats! You’ve successfully generated a G-code file that can now be imported into Bantam Tools™ Desktop Milling Machine Software and milled on the milling machine.
A G-code file imported into the software.
Option 2: Use a Separate CAM Application
If you’d prefer to use a separate application for CAM instead of an integrated plugin, here’s how to export a file from SolidWorks that can then be imported into that CAM application.
Step 1: Save your SolidWorks part as a STEP file.
Once you’ve finished modeling your part in SolidWorks, you’re ready to save it as a STEP file. From the File menu, choose Save As.
In the Save As window, choose STEP AP203 (*.step, *.stp) from the dropdown menu.
Once you save your file, you’re done with SolidWorks and ready for the next step (pun intended).
Step 2: Import your STEP file into a CAM application.
Now that you’ve exported a STEP file from SolidWorks, the next part of the process is to import your STEP file into a CAM application. We like Fusion 360’s ease of use, so if you don’t already have a favorite CAM application, check out Fusion 360 Guide.