Cura Engine

Cura Engine is a C ++ console application for generating G-code in 3D printing. It was made as a better and faster alternative to the Skeinforge application. The download of the application is done via https://github.com/Ultimaker/CuraEngine. It can be used separately or within other applications.


Cura is structured from .h files. The preparation process consists of the following steps:

  • loading 3D models,
  • analysis and modification of 3D models,
  • slicing 3D models into 2D layers,
  • forming parts of layers from “cut” layers,
  • generating internal shapes,
  • generating upper / lower areas of the mask,
  • generating fill areas,
  • generating a G-code for each layer.

All application data is stored in “SliceDataStorage”. It is necessary to remember that only the data from the previous step in the procedures are valid. The coordinates are stored in 64bit numbers as microns in the code. If you see a value of 1000, then that means 1 mm distance.
While the whole process of generating G-code is usually called “slicing”, the slicer in the Cura application is the part of the code that generates the layers. Each layer contains closed 2D polygons. These polygons were generated in a 2-step process. First, all triangles are cut into lines by layer, for each layer, a “line segment” is added to that layer. Next, all these line segments are connected to each other to make polygons. After the cutting process, we have closed polygons that can be used in the Clipper because the Clipper can only function on closed 2D polygons. Generating internal shapes is also called perimeters or loops sometimes. The area code generates a lot of filled areas and applies the steps used from different layers to get the process done. The result of this step is a list of polygons that surface to be filled. Exporting a G-code is a 2-step process. First, it collects all the steps for the layer that needs to be printed; this includes all the steps, printing, extrusion width. And then, it generates the final G-code. This is just a piece of code that has knowledge of G-code keywords and syntax to generate different G-code settings that will be the only part that needs customization. Some of the disadvantages of Cura software:

  • the possibility of changing the bridge settings leaves only the option of using support and more than necessary,
  • the possibility to adjust the speed for many parts of the building,
  • the possibility of adjusting the temperature between the first layer and the rest of the object,
  • the possibility of changing the filling form and the orientation of the filling form,
  • the possibility of cutting the object into two parts is a much better solution in printing more demanding objects.