Skip to content

Print3r: Cura

Rene K. Mueller edited this page Sep 2, 2019 · 18 revisions

Print3r can use Cura - more precisely the CuraEngine, which is embedded in Cura, which isn't easy to use in command-line mode but it's doable with these few hints.

Use CuraEngine as slicer with --slicer=cura when calling print3r.

Install

Note: As of Ubuntu 18.04 LTS or equivalent Debian, the cura-engine package is outdated and not supported, but the current CuraEngine is, which is a bit of a hassle to build:

  • sudo apt remove libprotobuf-dev libarcus-dev
  • build libprotobuf and libArcus according the build instructions at CuraEngine

CuraEngine 3.x (cura)

Install a particular version (3.5.0) of CuraEngine from github:

git clone https://github.com/Ultimaker/CuraEngine
cd CuraEngine
git reset --hard f6cad3aad0a000e99ea64c031d0b06cdb4482599

and then build it.

Eventually sudo make install within CuraEngine build/ to install CuraEngine system-wide and print3r will use it when you --slicer=cura.

CuraEngine 4.x (cura4)

Since print3r 0.2.8 CuraEngine-4.2.0 is supported:

wget https://github.com/Ultimaker/CuraEngine/archive/4.2.0.tar.gz
tar xfvz 4.2.0.tar.gz
cd CuraEngine-4.2.0/

In case you build another version than 4.2.0, make sure you download the corresponding fdmprinter.def.json as well:

cd settings/slicer/cura4/ 
wget https://github.com/Ultimaker/Cura/blob/master/resources/definitions/fdmprinter.def.json

Eventually install CuraEngine-4.2.0 (or later) system-wide with sudo cp build/CuraEngine /usr/local/bin/CuraEngine4 and print3r will use it when you --slicer=cura4.

Usage

As mentioned, CuraEngine is hard to use via command-line, because hardly any documentation is available despite being Open Source, and the actual settings are interdependent which are defined in the definitions like fdmprinter.def.json and requires a script-engine executing the dependencies.

Start Gcode

CuraEngine and Cura (GUI/App) 3.5.0 append the Start Gcode (machine_start_gcode) to an existing Gcode which heats up the bed (machine_bed_temperature_layer_0) and the nozzle (material_print_temperature_layer_0) for the 1st layer:

M190 S60 ; heat up bed and wait until temperature is reached 
M109 S200 ; heat up nozzle and wait until temperature is reached
<START GCODE COMES HERE>

So, your Start Gcode only takes effect when the bed and nozzle has heated up in sequence (not in parallel), which can be several minutes - that time is wasted essentially as you could use that time to home and reposition head for printing.

Slicer Specific Settings

See cura/base.ini

Infill vs Infill Line Distance

By default the infill density aka infill_spars_density [%] isn't available directly instead (fixed since 0.1.0) the infill_line_distance is the low-level setting with this relation as stated in fdmprinter.def.json, rewritten in pseudo code for readability:

infill_line_distance = infill_sparse_density == 0 ? 0 :
   (infill_line_width * 100) / infill_sparse_density * 
      (infill_pattern == 'grid' ? 2 : 
         (infill_pattern == 'triangles' || 
         infill_pattern == 'trihexagon' || 
         infill_pattern == 'cubic' || 
         infill_pattern == 'cubicsubdiv') ? 3 :
            (infill_pattern == 'tetrahedral' || infill_pattern == 'quarter_cubic' ? 2 : 
               infill_pattern == 'cross' || infill_pattern == 'cross_3d' ? 1 : 1
            )
         )
      )
   )

For 0.4mm nozzle printing a 0.4mm line width in general:

infill_line_distance = (0.4 * 100) / infill_sparse_density * 2

so for 20% infill you get infill_line_distance = 4mm if infill_pattern = grid

Since 0.1.0 Print3r calculates that internally from fill_density [%], so you no longer require to calculate that.