Skip to content

Using BlenderCAM with OpenCAMLib

Jose Luis edited this page Mar 9, 2020 · 20 revisions

OpenCAMLib is an open source CAM library created by Anders Wallin. It offers high quality waterline generation and drop cutter sampling algorithms. For drop cutter algorithms it's more reliable than Bullet Physics (Blender's built-in collision detection library) and offers better performance (up to 30 times faster than regular algorithm on 24-core machine).

To use OpenCAMLib with BlenderCAM, it needs to be built from source and installed for python2.7 available from executable path.

Building from source on Debian GNU/Linux (probably also Ubuntu):

  1. If haven't already, install blenderCAM.

  2. Install dependencies:
    sudo apt install libboost-dev libomp-dev libpython-dev python-dev python-vtk6 g++ cmake git libboost-python-dev For Debian Jessie you have to replace libomp-dev with libiomp-dev (libomp-dev is not in stable yet)

  3. Install optional dependencies:
    sudo apt install amd64-microcode intel-microcode cmake-gui

  4. Get newest OpenCAMLib (this version is patched for VTK6 compatibility):
    git clone https://github.com/ksuprynowicz/opencamlib.git

    • If your system has VTK5, clone original OpenCAMLib instead:
      git clone https://github.com/aewallin/opencamlib.git
  5. Configure and compile:

    mkdir opencamlib/build
    cd opencamlib/build
    cmake -DBUILD_PY_LIB=ON -DBUILD_CXX_LIB=OFF -DUSE_PY_3=ON ..
    make
    
  6. Install (by default in /usr/local): sudo make install

To use OpenCAMLib waterlines, select "Show experimental features" in Blender User Preferences / Addons / CAM - gcode generation tools. Then select Waterline strategy and "Use OpenCAMLib". The current version lacks dialog for waterline resolution and automatic determination of cutter length, those can be adjusted in scripts/addons/cam/opencamlib/oclWaterline.py.

For "parallel" strategy and other drop cutter sampling operations select both "Use exact mode" and "Use OpenCAMLib".