Skip to content

Instantly share code, notes, and snippets.

@BenRoe
Forked from nickoala/curaengine.md
Last active July 9, 2021 05:07
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BenRoe/f166e8b65fe62edda4427fd419059695 to your computer and use it in GitHub Desktop.
Save BenRoe/f166e8b65fe62edda4427fd419059695 to your computer and use it in GitHub Desktop.
Build CuraEngine on Raspbian or Ubuntu

Build CuraEngine on Raspbian or Ubuntu

CuraEngine requires libArcus which requires protobuf. Let's build them in turn.

Make sure python3 is Python 3.4 or higher.

Install utilities used by the build process:

sudo apt-get update && sudo apt-get install -y dh-autoreconf cmake git

Additionally, protobuf requires python3-setuptools and libArcus requires python3-sip-dev. Install them:

sudo apt-get install -y python3-setuptools python3-sip-dev

I download everything to home directory and start from there. You may adapt to your preferred location.

protobuf

Download protobuf's latest release. Choose the one with Python. The filename should be like protobuf-python-N.N.N.tar.gz, where N.N.N is the version number.

I use 3.1.0 as an example. You should use the latest version.

cd ~
wget https://github.com/google/protobuf/releases/download/v3.5.1/protobuf-python-3.5.1.tar.gz
tar zxf protobuf-python-3.5.1.tar.gz

Build and install for C++:

cd protobuf-3.5.1
./autogen.sh
./configure
make
sudo make install

Build and install for Python:

cd python
python3 setup.py build
sudo python3 setup.py install

Make sure shared libraries can be found:

sudo ldconfig

libArcus

Clone repository:

cd ~
git clone https://github.com/Ultimaker/libArcus.git

Build and install:

cd libArcus
mkdir build
cd build
cmake ..
make
sudo make install

Make sure shared libraries can be found:

sudo ldconfig

CuraEngine, finally

Clone repository:

cd ~
git clone https://github.com/Ultimaker/CuraEngine.git

Build:

cd CuraEngine
mkdir build
cd build
cmake ..
make

Copy executable to opt folder

mkdir /opt/curaengine && cp -a --no-preserve=owner ~/CuraEngine/build/CuraEngine /opt/curaengine/

Create a symlink to make it global executable

ln -s /opt/curaengine/CuraEngine /usr/local/bin/CuraEngine

Download default settings JSON files downloading a definition file,

cd /opt/curaengine/
wget https://raw.githubusercontent.com/Ultimaker/Cura/master/resources/definitions/fdmprinter.def.json
wget https://raw.githubusercontent.com/Ultimaker/Cura/master/resources/definitions/fdmextruder.def.json

try it:

CuraEngine slice -v -p -j /opt/curaengine/fdmprinter.def.json -o example.gcode -l example.stl --next
@simar1998
Copy link

simar1998 commented Jun 17, 2019

Hi, when I slice a file the file does not seem to centre itself on the bed. Even though I have changed the fdmprinter.def.json file to include the command line option and enabled the centre boolean value. this is the command I am using . CuraEngine slice -v -p -j /opt/curaengine/ender3.def.json -o /home/simar/cube.gcode -l /opt/stl_upload/cube.stl --next .
Any insight will be helpfull. I have also attached my def.json file.

def file link

Sorry for the pastebin, github was not letting my upload my file directly onto this post even though i modified it to be a text file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment