diff --git a/CLAUDE.md b/CLAUDE.md index a6e48cd862..da7f9fcb53 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -25,6 +25,25 @@ cmake --build build/arm64 --config RelWithDebInfo --target all -- ```bash cmake --build build/arm64 --config RelWithDebInfo --target all -- +``` +### Build test: + +**Always use this command to build the project when testing build issues on Windows.** +```bash +cmake --build . --config %build_type% --target ALL_BUILD -- -m +``` + +### Building on macOS +**Always use this command to build the project when testing build issues on macOS.** +```bash +cmake --build build/arm64 --config RelWithDebInfo --target all -- +``` + +### Building on Linux + **Always use this command to build the project when testing build issues on Linux.** +```bash +cmake --build build/arm64 --config RelWithDebInfo --target all -- + ``` diff --git a/resources/profiles/Snapmaker/process/fdm_process_U1_common.json b/resources/profiles/Snapmaker/process/fdm_process_U1_common.json index 81666a9184..829a552feb 100644 --- a/resources/profiles/Snapmaker/process/fdm_process_U1_common.json +++ b/resources/profiles/Snapmaker/process/fdm_process_U1_common.json @@ -72,6 +72,6 @@ "wipe_tower_extra_rib_length": "0", "prime_tower_width": "35", "prime_volume": "30", - "wall_generator": "classic", + "wall_generator": "arachne", "compatible_printers": [] } \ No newline at end of file diff --git a/resources/web/guide/22/22.js b/resources/web/guide/22/22.js index abc887653d..0283936ee0 100644 --- a/resources/web/guide/22/22.js +++ b/resources/web/guide/22/22.js @@ -514,14 +514,14 @@ function ResponseFilamentResult() let FilaArray=new Array(); for(let n=0;nSetLabel(humidity_str); - const wxString& temp_str = wxString::Format(u8"%d\u2103" /* °C */, (int)std::round(m_current_temperature)); + const wxString& temp_str = wxString::Format(wxString::FromUTF8(u8"%d\u2103" /* °C */), (int)std::round(m_current_temperature)); m_temperature_label->SetLabel(temp_str); if (m_left_dry_time > 0) diff --git a/src/slic3r/GUI/WebGuideDialog.cpp b/src/slic3r/GUI/WebGuideDialog.cpp index ee07b06ce0..ef1c6c34c8 100644 --- a/src/slic3r/GUI/WebGuideDialog.cpp +++ b/src/slic3r/GUI/WebGuideDialog.cpp @@ -838,14 +838,67 @@ bool GuideFrame::apply_config(AppConfig *app_config, PresetBundle *preset_bundle // Not switch filament //get_first_added_material_preset(AppConfig::SECTION_FILAMENTS, first_added_filament); + // For each @System filament, check if a vendor-specific override exists + // in the loaded profiles. If so, replace the @System variant with the + // override (e.g. replace "Generic ABS @System" with BBL "Generic ABS"). + // When printers from the default bundle are also selected, keep @System + // too since those printers need it. + static const std::string system_suffix = " @System"; + auto it_default = enabled_vendors.find(PresetBundle::ORCA_DEFAULT_BUNDLE); + bool has_default_bundle_printer = it_default != enabled_vendors.end() && !it_default->second.empty(); + bool has_filament_profiles = m_ProfileJson.contains("filament"); + + // Check if any non-default vendor has selected printers + bool has_vendor_printer = false; + for (const auto& [vendor, models] : enabled_vendors) { + if (vendor != PresetBundle::ORCA_DEFAULT_BUNDLE && !models.empty()) { + has_vendor_printer = true; + break; + } + } + + std::map supplemented_filaments; + for (const auto& [name, value] : enabled_filaments) { + if (name.size() > system_suffix.size() && + name.compare(name.size() - system_suffix.size(), system_suffix.size(), system_suffix) == 0) { + std::string short_name = name.substr(0, name.size() - system_suffix.size()); + if (has_vendor_printer && has_filament_profiles && m_ProfileJson["filament"].contains(short_name)) { + supplemented_filaments[short_name] = value; + BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " Replacing @System filament: '" << name << "' -> '" << short_name << "'"; + if (has_default_bundle_printer) { + supplemented_filaments[name] = value; + BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " Also keeping '" << name << "' for default bundle printers"; + } + continue; + } + } + supplemented_filaments[name] = value; + } + //update the app_config - app_config->set_section(AppConfig::SECTION_FILAMENTS, enabled_filaments); + app_config->set_section(AppConfig::SECTION_FILAMENTS, supplemented_filaments); app_config->set_vendors(m_appconfig_new); if (check_unsaved_preset_changes) preset_bundle->load_presets(*app_config, ForwardCompatibilitySubstitutionRule::Enable, {preferred_model, preferred_variant, first_added_filament, std::string()}); + // If the active filament is not in the wizard-selected filaments, switch to the first + // compatible wizard-selected filament. This handles the first-run case where load_presets + // falls back to "Generic PLA" even though the user selected a different filament. + bool active_filament_selected = supplemented_filaments.empty() + || supplemented_filaments.count(preset_bundle->filament_presets.front()) > 0; + if (!active_filament_selected) { + for (const auto& [filament_name, _] : supplemented_filaments) { + const Preset* preset = preset_bundle->filaments.find_preset(filament_name); + if (preset && preset->is_visible && preset->is_compatible) { + preset_bundle->filaments.select_preset_by_name(filament_name, true); + preset_bundle->filament_presets.front() = preset_bundle->filaments.get_selected_preset_name(); + break; + } + } + } + // Update the selections from the compatibilty. preset_bundle->export_selections(*app_config);