top of page
  • ZackW

3D Contour Milling with FreeCAD

Updated: Sep 27, 2022

Recently I set up a CNC mill for some small manufacturing work and prototyping. It's not mine (not yet anyway) but I do have access to it for my own projects. Upon configuring the machine and getting it running, I needed some test cut files. What could be more better than doing some 3d machining?


I have used FreeCAD's Path workbench in the past for several different projects. None of them (as far as I can remember) required the use of 3D machining, just pockets and profiles pretty much. It took me a bit to figure out how to access the 3D surface tools, since evidentially they are a feature disabled by default. The wiki actually has a page on doing this, something I missed the first time around. If you are using FreeCAD from an AppImage, it has the required 'OpenCamLib' bundled with it already. If you aren't using an AppImage (understandable!), you'll have to install OpenCamLib yourself.


In linux, I essentially just used the below commands to install it. In windows, the wiki claims it's installed by default.

git clone git@github.com:aewallin/opencamlib.git 
cd opencamlib
mkdir build
cd build
cmake ../src
make -j4
sudo make install

Make sure to install the dependencies first. After OpenCamLib is installed and you enable OCL dependent features, you can use the advanced 3d path generation tools. I did have to load the path workbench before the advanced settings would show up in preferences. You'll want to set your units to something that includes a speed, like mm/min or inch/min; but the path workbench will warn you of that.


I also had to set up tools and other things related to the Path workbench. You can create a path object (like a part object) based on an existing body, which is what I normally do. It's a good idea to set up as much as possible when first creating the path container/project, but everything can be changed later if need be.


In the 'Setup' tab, you'll probably want to define your stock and not leave the default bounds. If you know your exact stock dimensions, it's a good idea to model it so you don't have to do extra cutting. Otherwise, I just make the stock large enough that the cutting operations will not run out of space.


Also in the Setup tab, you'll want to assign a sensible zero point. By default the gcode zero point is the zero point from your CAD model, which is rarely what you want.


In the output tab, you can set your post-processor and some other other options. My machine is controlled by Mach3, so that's the post processor I chose. I also learned that you have to select Tool in the 'Order by' dropdown, otherwise the tool change gcode (M6 and G43) doesn't seem to be inserted.

End result of the test gcode ran in a piece of wood

For the sake of demonstration, here's what a potential 3d-surface operation may look like:

Note you'll probably have to uncheck "Boundary Enforcement" if you're trying to make a part like I've shown. The waterline operation may be more appropriate for this, but the 3d surfacing worked well. Using the waterline operation first, and then the 3d surface tool, may be the way to go. Also turning on "Multi-pass" in Layer Mode will help clear out material and not just about everything at once (like I chose to do with the wood).

Multi-Pass enabled
Single-pass enabled

You can simulate the tool path with FreeCAD's neat path CAM simulation tool, here's what part of that tool path ends up looking like:


67 views0 comments

Recent Posts

See All

Commentaires


bottom of page