<commit_before>.. _sec-bundledplugins_cura:

Cura
====

The Cura Plugin allows slicing of STL files uploaded to OctoPrint directly via
the `CuraEngine <http://github.com/Ultimaker/CuraEngine>`_ **up to and
including version 15.04.x** and supersedes the slicing support integrated into
OctoPrint so far. It comes bundled with OctoPrint starting with version 1.2.0.

.. note::

   Versions of CuraEngine later than 15.04.x have changed their calling
   parameters in such a way that the current implementation of OctoPrint's Cura plugin
   is not compatible to it. For this reason, please use only CuraEngine versions up to
   and including 15.04 for now, as available in the ``legacy`` branch of the CuraEngine
   repository on Github.

The plugin offers a settings module that allows configuring the path to the
CuraEngine executable to use, as well as importing and managing slicing
profiles to be used. Please note that the Cura Plugin will use the printer
parameters you configured within OctoPrint (meaning bed size and extruder
count and offsets) for slicing.

.. _sec-bundledplugins-cura-firststeps:

First Steps
-----------

Before you can slice from within OctoPrint, you'll need to

  #. :ref:`Install CuraEngine <sec-bundledplugins-cura-installing>`
  #. :ref:`Configure the path to CuraEngine within OctoPrint <sec-bundledplugins-cura-configuring>`
  #. :ref:`Export a slicing profile from Cura and import it within OctoPrint <sec-bundledplugins-cura-profiles>`

.. note::

   OctoPi 0.12.0 and later ships with steps 1 and 2 already done, you only need to
   supply one or more slicing profiles to get going :)

.. _sec-bundledplugins-cura-installing:

Installing CuraEngine
---------------------

You'll need a build of ``legacy`` branch of `CuraEngine <http://github.com/Ultimaker/CuraEngine>`_
in order to be able to use the Cura OctoPrint plugin. You can find the ``legacy`` branch
`here <https://github.com/ultimaker/curaengine/tree/legacy>`_.

If you previously used the `old variant of the Cura integration <https://github.com/foosel/OctoPrint/wiki/Cura-Integration>`_,
you probably still have a fully functional binary lying around in the
installation folder of the full install of Cura you used then -- just put the
path to that in the plugin settings.

.. _sec-bundledplugins-cura-installing-raspbian:

Compiling for Raspbian
++++++++++++++++++++++

.. todo::

   Provide updated binary, verify if makefile patch can finally be dumped on Raspbian
   Jessie.

.. note::

   A binary of CuraEngine 14.12 precompiled on Raspbian 2015-01-31 is available
   `here <http://bit.ly/octopi_cura_engine_1412>`_. Don't forget to make it
   executable after copying it to your preferred destination on your Pi
   (suggestion: ``/usr/local/bin``) with ``chmod +x cura_engine``. Use at your
   own risk.

You'll need to install a new version of gcc and g++ and patch CuraEngine's
Makefile (see `this post <http://umforum.ultimaker.com/index.php?/topic/5943-recent-build-of-curaengine-wont-compile-on-raspberry-pi/#entry58539>`_)
in order for the compilation to work on current Raspbian builds (e.g. OctoPi)::

    sudo apt-get -y install gcc-4.7 g++-4.7
    git clone -b legacy https://github.com/Ultimaker/CuraEngine.git<commit_msg>Docs: Update cura_engine binary + compiling instructions for jessie<commit_after>.. _sec-bundledplugins_cura:

Cura
====

The Cura Plugin allows slicing of STL files uploaded to OctoPrint directly via
the `CuraEngine <http://github.com/Ultimaker/CuraEngine>`_ **up to and
including version 15.04.x** and supersedes the slicing support integrated into
OctoPrint so far. It comes bundled with OctoPrint starting with version 1.2.0.

.. note::

   Versions of CuraEngine later than 15.04.x have changed their calling
   parameters in such a way that the current implementation of OctoPrint's Cura plugin
   is not compatible to it. For this reason, please use only CuraEngine versions up to
   and including 15.04 for now, as available in the ``legacy`` branch of the CuraEngine
   repository on Github.

The plugin offers a settings module that allows configuring the path to the
CuraEngine executable to use, as well as importing and managing slicing
profiles to be used. Please note that the Cura Plugin will use the printer
parameters you configured within OctoPrint (meaning bed size and extruder
count and offsets) for slicing.

.. _sec-bundledplugins-cura-firststeps:

First Steps
-----------

Before you can slice from within OctoPrint, you'll need to

  #. :ref:`Install CuraEngine <sec-bundledplugins-cura-installing>`
  #. :ref:`Configure the path to CuraEngine within OctoPrint <sec-bundledplugins-cura-configuring>`
  #. :ref:`Export a slicing profile from Cura and import it within OctoPrint <sec-bundledplugins-cura-profiles>`

.. note::

   OctoPi 0.12.0 and later ships with steps 1 and 2 already done, you only need to
   supply one or more slicing profiles to get going :)

.. _sec-bundledplugins-cura-installing:

Installing CuraEngine
---------------------

You'll need a build of ``legacy`` branch of `CuraEngine <http://github.com/Ultimaker/CuraEngine>`_
in order to be able to use the Cura OctoPrint plugin. You can find the ``legacy`` branch
`here <https://github.com/ultimaker/curaengine/tree/legacy>`_.

If you previously used the `old variant of the Cura integration <https://github.com/foosel/OctoPrint/wiki/Cura-Integration>`_,
you probably still have a fully functional binary lying around in the
installation folder of the full install of Cura you used then -- just put the
path to that in the plugin settings.

.. _sec-bundledplugins-cura-installing-raspbian:

Compiling for Raspbian
++++++++++++++++++++++

.. note::

   A binary of CuraEngine 15.04.06 precompiled on Raspbian Jessie Lite 2016-03-18 is available
   `here <http://bit.ly/octopi_cura_engine_150406>`_. Don't forget to make it
   executable after copying it to your preferred destination on your Pi
   (suggestion: ``/usr/local/bin``) with ``chmod +x cura_engine``. Use at your
   own risk.

Raspbian Jessie
~~~~~~~~~~~~~~~

Building on Raspbian Jessie is as easy as::

    sudo apt-get -y install gcc-4.7 g++-4.7
    git clone -b legacy https://github.com/Ultimaker/CuraEngine.git
    cd CuraEngine
    make

After this has completed, you'll find your shiny new build of CuraEngine in
the `build` folder (full path for above example:
``~/CuraEngine/build/CuraEngine``).

Raspbian Wheezy
~~~~~~~~~~~~~~~

You'll need to install a new version of gcc and g++ and patch CuraEngine's
Makefile (see `this post <http://umforum.ultimaker.com/index.php?/topic/5943-recent-build-of-curaengine-wont-compile-on-raspberry-pi/#entry58539>`_)
in order for the compilation to work on current Raspbian builds (e.g. OctoPi)::

    sudo apt-get -y install gcc-4.7 g++-4.7
    git clone -b legacy https://github.com/Ultimaker/CuraEngine.git
{'fraction_non_alphanumeric': 0.1001895872830684, 'fraction_numerical': 0.01575032813183608, 'mean_word_length': 3.980392156862745, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5497348', 'n_tokens_mistral': 2199, 'n_tokens_neox': 2031, 'n_words': 831}