mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
fix+feat: Snapmaker U1 — 5 bug fixes and 0.6mm / mixed-nozzle profiles (#12244 #12390 #12652 #12073 #12797 #11424) (#12824)
This commit is contained in:
@@ -30,7 +30,21 @@ void GCodeWriter::apply_print_config(const PrintConfig &print_config)
|
||||
m_single_extruder_multi_material = print_config.single_extruder_multi_material.value;
|
||||
bool use_mach_limits = print_config.gcode_flavor.value == gcfMarlinLegacy || print_config.gcode_flavor.value == gcfMarlinFirmware ||
|
||||
print_config.gcode_flavor.value == gcfKlipper || print_config.gcode_flavor.value == gcfRepRapFirmware;
|
||||
m_max_acceleration = std::lrint(use_mach_limits ? print_config.machine_max_acceleration_extruding.values.front() : 0);
|
||||
if (use_mach_limits) {
|
||||
// For Klipper, SET_VELOCITY_LIMIT ACCEL= applies to all moves, so the effective cap
|
||||
// is the minimum of the extruding limit and the per-axis X/Y limits.
|
||||
// This ensures user-configured Motion Ability limits are honoured (#12244).
|
||||
unsigned int extruding_limit = std::lrint(print_config.machine_max_acceleration_extruding.values.front());
|
||||
if (print_config.gcode_flavor.value == gcfKlipper) {
|
||||
unsigned int x_limit = std::lrint(print_config.machine_max_acceleration_x.values.front());
|
||||
unsigned int y_limit = std::lrint(print_config.machine_max_acceleration_y.values.front());
|
||||
if (x_limit > 0) extruding_limit = std::min(extruding_limit, x_limit);
|
||||
if (y_limit > 0) extruding_limit = std::min(extruding_limit, y_limit);
|
||||
}
|
||||
m_max_acceleration = extruding_limit;
|
||||
} else {
|
||||
m_max_acceleration = 0;
|
||||
}
|
||||
m_max_travel_acceleration = static_cast<unsigned int>(
|
||||
std::round((use_mach_limits && supports_separate_travel_acceleration(print_config.gcode_flavor.value)) ?
|
||||
print_config.machine_max_acceleration_travel.values.front() :
|
||||
|
||||
@@ -46,6 +46,14 @@ bool try_pop_up_before_slice(bool is_slice_all, Plater* plater_ref, PartPlate* p
|
||||
if (nozzle_diameters->size() <= 1)
|
||||
return true;
|
||||
|
||||
// The filament-grouping dialog is specifically designed for BBL dual-nozzle printers
|
||||
// (e.g. H2D) where filaments must be assigned to a left or right nozzle.
|
||||
// For toolchangers (≥3 tools) and all non-BBL printers the dialog is irrelevant and
|
||||
// confusing; skip it entirely so slicing proceeds without interruption. (#12390)
|
||||
PresetBundle* preset = wxGetApp().preset_bundle;
|
||||
if (!preset || !preset->is_bbl_vendor() || nozzle_diameters->size() != 2)
|
||||
return true;
|
||||
|
||||
bool sync_plate = true;
|
||||
|
||||
std::vector<std::string> filament_colors = full_config.option<ConfigOptionStrings>("filament_colour")->values;
|
||||
|
||||
@@ -9714,7 +9714,9 @@ void GLCanvas3D::_set_warning_notification(EWarning warning, bool state)
|
||||
wxString region = L"en";
|
||||
if (language.find("zh") == 0)
|
||||
region = L"zh";
|
||||
wxGetApp().open_browser_with_warning_dialog(wxString::Format(L"https://wiki.bambulab.com/%s/filament-acc/filament/h2d-pla-and-petg-mutual-support", region));
|
||||
// Use the generic dual-nozzle PLA+PETG guide rather than the H2D-specific page
|
||||
// so the link is relevant for all dual-extrusion printers, not just Bambu H2D. (#12073)
|
||||
wxGetApp().open_browser_with_warning_dialog(wxString::Format(L"https://wiki.bambulab.com/%s/filament-acc/filament/pla-and-petg-dual-extrusion", region));
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1871,26 +1871,59 @@ bool PartPlate::check_mixture_of_pla_and_petg(const DynamicPrintConfig &config)
|
||||
bool has_pla = false;
|
||||
bool has_petg = false;
|
||||
|
||||
std::vector<int> used_filaments = get_extruders(true); // 1 base
|
||||
// On a toolchanger (machine_tool_change_time > 0) each filament slot maps to a
|
||||
// separate physical nozzle: only one nozzle is ever mounted or heated at a time, so
|
||||
// there is no cross-nozzle contamination between PLA and PETG. Track which physical
|
||||
// nozzle each material is on; warn only when PLA and PETG would pass through the
|
||||
// *same* nozzle.
|
||||
//
|
||||
// NOTE: if MMU-on-toolchanger support is added (#10586), the nozzle-mapping logic
|
||||
// will need to be revisited because multiple filaments may then share one tool slot.
|
||||
bool is_toolchanger = false;
|
||||
auto *tool_change_time = config.option<ConfigOptionFloat>("machine_tool_change_time");
|
||||
if (tool_change_time && tool_change_time->value > 0)
|
||||
is_toolchanger = true;
|
||||
|
||||
// nozzle index → whether it carries PLA / PETG
|
||||
std::map<int, bool> nozzle_has_pla;
|
||||
std::map<int, bool> nozzle_has_petg;
|
||||
|
||||
std::vector<int> used_filaments = get_extruders(true); // 1-based
|
||||
if (!used_filaments.empty()) {
|
||||
const auto *filament_types = config.option<ConfigOptionStrings>("filament_type");
|
||||
for (auto filament_idx : used_filaments) {
|
||||
int filament_id = filament_idx - 1;
|
||||
if (filament_id < config.option<ConfigOptionStrings>("filament_type")->values.size()) {
|
||||
std::string filament_type = config.option<ConfigOptionStrings>("filament_type")->values.at(filament_id);
|
||||
if (filament_type == "PLA")
|
||||
int filament_id = filament_idx - 1;
|
||||
if (filament_id < (int)filament_types->values.size()) {
|
||||
const std::string &filament_type = filament_types->values[filament_id];
|
||||
if (filament_type == "PLA") {
|
||||
has_pla = true;
|
||||
if (filament_type == "PETG")
|
||||
nozzle_has_pla[filament_id] = true;
|
||||
}
|
||||
if (filament_type == "PETG") {
|
||||
has_petg = true;
|
||||
nozzle_has_petg[filament_id] = true;
|
||||
}
|
||||
} else {
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " check error:array bound";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (has_pla && has_petg)
|
||||
return false;
|
||||
if (!has_pla || !has_petg)
|
||||
return true; // no mixture — no warning
|
||||
|
||||
return true;
|
||||
if (is_toolchanger) {
|
||||
// Warn only if any single nozzle slot carries both PLA and PETG (e.g. future MMU
|
||||
// on toolchanger). On a pure toolchanger each slot is independent, so this loop
|
||||
// will never fire and the warning is correctly suppressed. (#12073)
|
||||
for (const auto &kv : nozzle_has_pla) {
|
||||
if (nozzle_has_petg.count(kv.first))
|
||||
return false; // same nozzle → warn
|
||||
}
|
||||
return true; // different nozzles → safe, no warning
|
||||
}
|
||||
|
||||
return false; // non-toolchanger with both PLA and PETG → warn
|
||||
}
|
||||
|
||||
bool PartPlate::check_mixture_filament_compatible(const DynamicPrintConfig &config, std::string &error_msg)
|
||||
|
||||
Reference in New Issue
Block a user