Ultimaker / Cura

3D printer / slicing GUI built on top of the Uranium framework
GNU Lesser General Public License v3.0
6.2k stars 2.08k forks source link

PP-528: Unused Extruder Influences Settings #19666

Open Frederic98 opened 1 month ago

Frederic98 commented 1 month ago

Description

Ever since the dawn of ~time~ Cura, having a material in Extruder 2 active influences the settings in Extruder 1. This is a necessary compromise for multi-material printing. However, in Cura, this is also when you only use the material in Extruder 1.

For example, PLA needs a buildplate temperature of 60°C on S-line, while ABS needs 80°C. Because there is only 1 bed to set the temperature of, the highest of the two is used to make sure the object sticks well to the bed. This, however, results in the PLA being quite droopy because it stays quite soft at that temperature - a compromise needed when printing the two materials together.

If, however, you only use the PLA in Extruder 1, you have to remember to manually disable Extruder 2, as otherwise the PLA uses a bed temperature of 80°C for no good reason.

This problem also applies to various other settings that cannot be set per extruder, like the Build Volume Temperature, Adhesion Type, Materials Shrinkage Compensation, Support Structure, …

See also PP-528, CURA-3499, CURA-3151, CURA-7226, CURA-9233

Solution

Turns out, Cura already has a function ExtruderManager.getUsedExtruderStacks(), which goes over a bunch of settings to check which extruders are actually used, not just the enabled ones. For example, it checks:

The result of this function is now saved in new setting (extruder_used). This setting lives in the machine section, so is not settable by the user and is driven by Cura.
The function extruderValues that is available in SettingFunctions then only gives the values of the actually used extruders. If there are no used extruders (yet), like when there is no mesh loaded, it falls back to the old behaviour of using all the enabled extruders.

Type of change

How Has This Been Tested?

Test Configuration:

Checklist: