Bed temperature bug when using multiple filaments
Is there an existing issue for this problem?
- [x] I have searched the existing issues
Snapmaker_Orca Version
2.3.4
Operating System (OS)
Windows
OS Version
Win11
Additional system information
No response
Printer
U1
How to reproduce
print two cubes with two different materials where two different bed-temperatures are set
Actual results
Print starts with one bed-temperature and after first-layer-change, the bed-temperature changes.
I was printing PETG with PLA support. The print started with PETG-bed-temperature (80°C) and after the first layer it chaged to PLA-bed-temperature (60°C) and left this temperature until finish, so I had bad warping.
Expected results
Start with highest first-layer-bed-temperature and after first-layer proceed with highest other-layer-temperature.
Project file & Debug log uploads
Checklist of files to include
- [ ] Log file
- [x] Project file
Anything else?
After some investigation, it's a problem of the snapmaker-fork not of original Orca!!!!! Tests with snapmaker-Orca failed, test the same with original-Orca passed!!!!!
Compare src/libslic3r/GCode.cpp/void GCode::_print_first_layer_bed_temperature() and LayerResult GCode::process_layer(if (first_layer) {}) where marked with ´>´
In original Orca:
void GCode::_print_first_layer_bed_temperature(GCodeOutputStream &file, Print &print, const std::string &gcode, unsigned int first_printing_extruder_id, bool wait)
{
// Initial bed temperature based on the first extruder.
// BBS
std::vector<int> temps_per_bed;
> int bed_temp = 0;
> if (m_config.bed_temperature_formula.value == BedTempFormula::btfHighestTemp) {
> bed_temp = get_highest_bed_temperature(true, print);
> }
> else {
> bed_temp = get_bed_temperature(first_printing_extruder_id, true, print.config().curr_bed_type);
> }
// Is the bed temperature set by the provided custom G-code?
int temp_by_gcode = -1;
bool temp_set_by_gcode = custom_gcode_sets_temperature(gcode, 140, 190, false, temp_by_gcode);
// BBS
#if 0
if (temp_set_by_gcode && temp_by_gcode >= 0 && temp_by_gcode < 1000)
temp = temp_by_gcode;
#endif
// Always call m_writer.set_bed_temperature() so it will set the internal "current" state of the bed temp as if
// the custom start G-code emited these.
std::string set_temp_gcode = m_writer.set_bed_temperature(bed_temp, wait);
if (! temp_set_by_gcode)
file.write(set_temp_gcode);
}
in Snapmaker Orca
void GCode::_print_first_layer_bed_temperature(
GCodeOutputStream& file, Print& print, const std::string& gcode, unsigned int first_printing_extruder_id, bool wait)
{
// Initial bed temperature based on the first extruder.
// BBS
std::vector<int> temps_per_bed;
> int bed_temp = get_bed_temperature(first_printing_extruder_id, true, print.config().curr_bed_type);
// Is the bed temperature set by the provided custom G-code?
int temp_by_gcode = -1;
bool temp_set_by_gcode = custom_gcode_sets_temperature(gcode, 140, 190, false, temp_by_gcode);
// BBS
#if 0
if (temp_set_by_gcode && temp_by_gcode >= 0 && temp_by_gcode < 1000)
temp = temp_by_gcode;
#endif
// Always call m_writer.set_bed_temperature() so it will set the internal "current" state of the bed temp as if
// the custom start G-code emited these.
std::string set_temp_gcode = m_writer.set_bed_temperature(bed_temp, wait);
if (!temp_set_by_gcode)
file.write(set_temp_gcode);
}
SEE Commit 6f5ea72 and dd3c63b in https://github.com/OrcaSlicer/OrcaSlicer
This bug was fixed in version 2.3.6.
I triaged this against the v2.4.1 source (I'm Muse, an AI assistant, doing this triage under Marlena and Breandan Sharpe's direction) and can confirm the reported behaviour is fixed there.
Both bed-temperature sets now use the max over all used extruders, not the first extruder only:
- First layer:
get_bed_temperature_max(print, true)(src/libslic3r/GCode.cpp:4040) — comment: "bed temperature accommodates the highest-temperature filament of the print (max over all used extruders instead of the first printing extruder only)". - 1st → 2nd layer transition:
get_bed_temperature_max(print, false)(GCode.cpp:5474, insideif (!first_layer && !m_second_layer_things_done)).
get_bed_temperature_max (GCode.cpp:4022) iterates print.extruders(), which includes object + support-material + wipe-tower extruders, and takes the max. There are only two set_bed_temperature calls in GCode.cpp (4048, 5475) — no tool-change or per-layer override can drop the temperature. So with PETG as the model and PLA as support, the bed should start at the highest first-layer temperature and then go to the highest other-layer temperature, not down to the support filament's 60 °C.
Could you confirm with your PETG + PLA-support scenario on 2.4.1 (slice and check the bed temperature in the generated G-code) and close this if it behaves as expected?