Skip to content

Profiles & Settings

5axes edited this page Sep 8, 2022 · 12 revisions

Original Source from : Jaime van Kessel / Ultimaker Modified by : 5@xes

Cura uses a stacked profile system. A schematic overview of this can be seen in the image below.

schematic overview

Settings

Each of the entries in the stack (eg; User, Quality, Material, etc) describes a profile. When we want to find out how much infill percentage should be used ("infill_sparse_density"), we simply ask the extruder stack what value it has. The extruder stack will then ask each of the profiles that it has (in sequence) if they have a value for the requested setting. The first profile to give an answer will define what the result is.

A slightly more complicated situation occurs when the value of a setting is defined by a function. Let's take the following example into consideration. We have a setting "wall_thickness" which value is defined by the formula "=line_width*3". This is defined in the quality profile of extruder. The value of "line_width" is defined in the quality only and is set to 0.4.

When we ask for the value of "layer_thickness", we expect to get 1.2 as a result. The following calls will be made in order:

  • extruder_stack.getProperty("wall_thickness", "value") -> Returns 1.2

  • user.getProperty("wall_thickness", "value") -> Returns None

  • quality_changes.getProperty("wall_thickness", "value") -> Returns None

  • intent.getProperty("wall_thickness", "value") -> Returns None

  • quality.getProperty("wall_thickness", "value") -> Returns "=line_width*3"

  • user.getProperty("line_width", "value") -> returns None

  • quality_changes.getProperty("line_width", "value) -> Returns None

  • intent.getProperty("line_width", "value) -> Returns None

  • quality.getProperty("line_width", "value) -> Returns 0.4

  • material.getProperty("line_width", "value) -> Returns None

Profiles

The profiles have some interdependency with one other, as can be seen in the picture below.

Profile Structure

User

The user settings are all changes that are not stored to any profile. In the interface, a circular reset icon is shown for each of these settings. They are completely independant of the quality, quality_changes or intent. They are only "tied" to a machine.

circular reset icon

Quality Changes

Quality changes contain the settings that the user changed and stored to a profile. As such, a single profile generated by a user contains at least 2 files (one quality_change for the extruder and one for the global stack). The quality changes are only tied to the quality_type, since they describe a "delta" to be applied over a quality. So even if a quality changes because a material changes, the quality changes profile could stay the same (since it's only link, the quality_type remained the same)

There is often a confusion in the language of Cura users. When a user talks about "Profile" he is actually referring to that section which corresponds to the settings he himself has modified and saved under a "Custom Profiles".

Quality Changes Custom profile

Intent

Intent profiles contain settings that modify the quality by giving them an intent (eg: "Engineering" or "Smooth").). These profiles depend on the material, variant and quality_type.

Existing Intent Profiles for an Ultimaker S3 can be seen in the image below.

Intent profiles

Quality

Quality profiles hold the resolution of the print by setting the layer height. Since all extruders must have the same layer height, this value is set in the global_stack part of the quality.

Quality

This settings are known to Cura users as the "Standard Default Profiles". They are generally of the type "Fast", "Extrafast", "Fine", "Extra Fine", "Draft", "Coarse". Defined in connection with a printer, it is often the source of problems of exchanges of "Profile" between users or versions. Indeed if the Quality Profile does not exist or no longer exists following an update of the printer definition, Cura will not be able to link the user profile to the active printer.

Material

Hold all the settings as defined by the active material.

The material settings are visible in the material management of Cura. Note that not all settings you see in this part of the software are necessarily related to the Material profile. Generally only the parameters with the circular reset icon are stored in this part. The other values comes from the settings defined in the default parameters of the printer or its variants.

Material

Variant

The variant, in case of the extruder, hold settings that have to do with nozzle size or specific settings that relate to this.

Variant nozzle size

Definition changes

If a user makes changes to a certain machine, but not to such a degree that it should be considered an entirely new type of machines, the settings are stored here.

Definition changes

Machine

The machine default settings.

Code

All of this logic is handled by a number of classes. This section will explain how these work together. Make sure that you understand the previous sections before continuing on with this. If you're not planning to write python code / create custom plugins, it's likely that you won't need to read this.

ContainerStack

A ContainerStack is the basic "stack" concept. As the name implies, it's a stack of containers (InstanceContainer, DefinitionContainer, etc). As a rule of thumb, the bottom container in the stack is a DefinitionContainer and the stacks above it are InstanceContainers. This ensures that if no InstanceContainer overrides a value that the default value as set by the definition is used.

ExtruderStack

The ExtruderStack is a specialized ContainerStack that represents a single extruder. It always has a GlobalStack set as it's next stack.

GlobalStack

The GlobalStack is a specialized Containerstack that represents the basic / global settings of a machine / printer. Because it represents the global defaults of a machine, it does not have a material set.

Containers

InstanceContainer

An InstanceContainer is an unsorted set of SettingInstance objects that together form a profile. Looking at the image at the top of the page, you can see a number of InstanceContainer. "User", "quality_changes", etc; All of these are InstanceContainers. These will be serialized (stored) to .inst.cfg files. Instance containers can only change the "value" of a given SettingInstance!

DefinitionContainer

A DefinitionContainer is an unsorted set of SettingDefinition objects that together form the definition of an extruder or a printer. In order to define a single 3D printer, you will need two of these profiles (one to be used in the ExtruderStack and one to be used in the GlobalStack). Note that settings that are defined in the DefinitionContainer of an extruder should not be defined in the global DefinitionContainer; If the value of a property is asked of the ExtruderStack and it exists in it's SettingDefinition, it will never continue asking the next stack. Definition containers are serialized (stored) to .def.json files. More information about the file format can be found here.

SettingDefinition

The SettingDefinition defines a single setting (for example: "layer_height") with all its properties ("value", "min_value_warning", "label", etc). The SettingDefinition must always be inside a DefinitionContainer. The SettingDefinition class contains a concept of "supported properties". These are the properties that are supported when serializing or deserializing a setting. Each property can be any of the following types: "Any", "String", "TranslatedString" and "Function"

Sample definition in a des.json file

SettingInstance

The SettingInstance keeps track of the (changed) state of a single setting (for example: "layer_height") and must be inside an InstanceContainer. In order to keep track of the state, it needs to know what SettingDefinition it is matched with. When the value of a SettingInstance is changed, it will also notify SettingInstances that have formulas that rely on it's value.

If there are two known settings ("wall_thickness" with the value "=line_width*3" and "line_width" with the value "0.4") and the value of "line_width" is changed to be 0.5, a signal is emitted that the value of "line_width" is changed, but a signal is also emitted that the value of "wall_thickness" is changed since it's value depends on the value of "line_width".

Per Object stacks

Schematic drawing of PerObjectStacks

Schematic drawing of PerObjectStacks

It's also possible for 3D models to have specific setting overrides set per model. Only settings that have the property "settable_per_mesh" set to true can be modified in this way. Each CuraSceneNode will automatically have a ContainerStack, which only contains a single InstanceContainer, created for it.

Clone this wiki locally