mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 03:13:39 +00:00
Some QoL tweaks (#12700)
* 1. Calculate `FilamentTempType` based on `filament_info.json`, with a fallback to the temperature range. 2. Clean up some strings. * Update src/slic3r/GUI/ObjColorDialog.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -2756,14 +2756,6 @@ Vec2d Print::translate_to_print_space(const Point &point) const {
|
|||||||
|
|
||||||
FilamentTempType Print::get_filament_temp_type(const std::string& filament_type)
|
FilamentTempType Print::get_filament_temp_type(const std::string& filament_type)
|
||||||
{
|
{
|
||||||
// FilamentTempType Temperature-based logic
|
|
||||||
int min_temp, max_temp;
|
|
||||||
if (MaterialType::get_temperature_range(filament_type, min_temp, max_temp)) {
|
|
||||||
if (max_temp <= 250) return FilamentTempType::LowTemp;
|
|
||||||
else if (max_temp < 280) return FilamentTempType::HighLowCompatible;
|
|
||||||
else return FilamentTempType::HighTemp;
|
|
||||||
}
|
|
||||||
|
|
||||||
const static std::string HighTempFilamentStr = "high_temp_filament";
|
const static std::string HighTempFilamentStr = "high_temp_filament";
|
||||||
const static std::string LowTempFilamentStr = "low_temp_filament";
|
const static std::string LowTempFilamentStr = "low_temp_filament";
|
||||||
const static std::string HighLowCompatibleFilamentStr = "high_low_compatible_filament";
|
const static std::string HighLowCompatibleFilamentStr = "high_low_compatible_filament";
|
||||||
@@ -2798,6 +2790,19 @@ FilamentTempType Print::get_filament_temp_type(const std::string& filament_type)
|
|||||||
return HighTemp;
|
return HighTemp;
|
||||||
if (filament_temp_type_map[LowTempFilamentStr].find(filament_type) != filament_temp_type_map[LowTempFilamentStr].end())
|
if (filament_temp_type_map[LowTempFilamentStr].find(filament_type) != filament_temp_type_map[LowTempFilamentStr].end())
|
||||||
return LowTemp;
|
return LowTemp;
|
||||||
|
|
||||||
|
// Orca: prefer explicit definition from JSON, if the filament type is not defined in json, fallback to temperature-based logic to determine the filament temp type.
|
||||||
|
// FilamentTempType Temperature-based logic
|
||||||
|
int min_temp, max_temp;
|
||||||
|
if (MaterialType::get_temperature_range(filament_type, min_temp, max_temp)) {
|
||||||
|
if (max_temp <= 250)
|
||||||
|
return FilamentTempType::LowTemp;
|
||||||
|
else if (max_temp < 280)
|
||||||
|
return FilamentTempType::HighLowCompatible;
|
||||||
|
else
|
||||||
|
return FilamentTempType::HighTemp;
|
||||||
|
}
|
||||||
|
|
||||||
return Undefine;
|
return Undefine;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
# GUI/DeviceTab
|
|
||||||
# usage -- GUI about device tab for BambuStudio
|
|
||||||
# date -- 2025.01.01
|
|
||||||
# status -- Building
|
|
||||||
|
|
||||||
list(APPEND SLIC3R_GUI_SOURCES
|
list(APPEND SLIC3R_GUI_SOURCES
|
||||||
GUI/DeviceTab/uiAmsHumidityPopup.h
|
GUI/DeviceTab/uiAmsHumidityPopup.h
|
||||||
|
|||||||
@@ -48,14 +48,7 @@ wxBoxSizer* ObjColorDialog::create_btn_sizer(long flags,bool exist_error)
|
|||||||
if (!exist_error) {
|
if (!exist_error) {
|
||||||
btn_sizer->AddSpacer(FromDIP(25));
|
btn_sizer->AddSpacer(FromDIP(25));
|
||||||
auto *tips = new HyperLink(this, _L("Wiki Guide")); // ORCA
|
auto *tips = new HyperLink(this, _L("Wiki Guide")); // ORCA
|
||||||
tips->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent &e) {
|
tips->SetURL("https://www.orcaslicer.com/wiki/general-settings/import_export.html#obj");
|
||||||
bool is_zh = wxGetApp().app_config->get("language") == "zh_CN";
|
|
||||||
if (is_zh) {
|
|
||||||
wxLaunchDefaultBrowser("https://wiki.bambulab.com/zh/software/bambu-studio/import_obj");
|
|
||||||
} else {
|
|
||||||
wxLaunchDefaultBrowser("https://wiki.bambulab.com/en/software/bambu-studio/import_obj");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
btn_sizer->Add(tips, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
|
btn_sizer->Add(tips, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
|
||||||
}
|
}
|
||||||
btn_sizer->AddStretchSpacer();
|
btn_sizer->AddStretchSpacer();
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ void wxMediaCtrl2::Load(wxURI url)
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
CallAfter([] {
|
CallAfter([] {
|
||||||
wxMessageBox(_L("Missing BambuSource component registered for media playing! Please re-install BambuStudio or seek after-sales help."), _L("Error"), wxOK);
|
wxMessageBox(_L("Missing BambuSource component registered for media playing! Please re-install OrcaSlicer or seek community help."), _L("Error"), wxOK);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
m_error = clsid != CLSID_BAMBU_SOURCE ? 101 : path.empty() ? 102 : 103;
|
m_error = clsid != CLSID_BAMBU_SOURCE ? 101 : path.empty() ? 102 : 103;
|
||||||
|
|||||||
Reference in New Issue
Block a user