mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-02-21 12:02:17 -07:00
Material Type standarization + Technical Filament Types (#10553)
* New materials * Temps * Full filament type list * Improve nozzle temperature range validation messages Separates minimum and maximum recommended temperature warnings for nozzle configuration + generig °c usage. Co-Authored-By: Alexandre Folle de Menezes <afmenez@gmail.com> * Material Updates Co-Authored-By: Rodrigo <162915171+RF47@users.noreply.github.com> * petg-cf10 should be petg-cf options. * Pla reduced range * Adjust some temps * FilamentTempType Temperature-based logic * chamber temps * Fromatting * Filament chamber temperature range support Introduces get_filament_chamber_temp_range to retrieve safe chamber temperature limits for filament types. Updates ConfigManipulation to use these limits instead of hardcoded values. * add adhesion coefficient and yield strength Replaces hardcoded material checks for adhesion coefficient and yield strength with lookup functions using extended FilamentType struct. * Thermal length * Fix * Refactor filament type data to MaterialType class Moved filament type properties and related lookup functions from PrintConfig.cpp into a new MaterialType class. * Fix adhesion_coefficient Co-Authored-By: SoftFever <softfeverever@gmail.com> --------- Co-authored-by: Alexandre Folle de Menezes <afmenez@gmail.com> Co-authored-by: Rodrigo <162915171+RF47@users.noreply.github.com> Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
parent
2a3e761ab9
commit
a48235691e
9 changed files with 269 additions and 89 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#include "libslic3r/Config.hpp"
|
||||
#include "libslic3r/Model.hpp"
|
||||
#include "libslic3r/PresetBundle.hpp"
|
||||
#include "libslic3r/MaterialType.hpp"
|
||||
#include "MsgDialog.hpp"
|
||||
#include "libslic3r/PrintConfig.hpp"
|
||||
|
||||
|
|
@ -59,10 +60,29 @@ void ConfigManipulation::check_nozzle_recommended_temperature_range(DynamicPrint
|
|||
int temperature_range_low, temperature_range_high;
|
||||
if (!get_temperature_range(config, temperature_range_low, temperature_range_high)) return;
|
||||
|
||||
// Get the selected filament type
|
||||
std::string filament_type = "";
|
||||
if (config->has("filament_type") && config->option<ConfigOptionStrings>("filament_type")->values.size() > 0) {
|
||||
filament_type = config->option<ConfigOptionStrings>("filament_type")->values[0];
|
||||
}
|
||||
|
||||
int min_recommended_temp = 190;
|
||||
int max_recommended_temp = 300;
|
||||
|
||||
if (!MaterialType::get_temperature_range(filament_type, min_recommended_temp, max_recommended_temp)){
|
||||
filament_type = "Unknown";
|
||||
}
|
||||
|
||||
wxString msg_text;
|
||||
bool need_check = false;
|
||||
if (temperature_range_low < 190 || temperature_range_high > 300) {
|
||||
msg_text += _L("The recommended minimum temperature is less than 190°C or the recommended maximum temperature is greater than 300°C.\n");
|
||||
if (temperature_range_low < min_recommended_temp) {
|
||||
msg_text += wxString::Format(_L("A minimum temperature above %d\u2103 is recommended for %s.\n"),
|
||||
min_recommended_temp, filament_type);
|
||||
need_check = true;
|
||||
}
|
||||
if (temperature_range_high > max_recommended_temp) {
|
||||
msg_text += wxString::Format(_L("A maximum temperature below %d\u2103 is recommended for %s.\n"),
|
||||
max_recommended_temp, filament_type);
|
||||
need_check = true;
|
||||
}
|
||||
if (temperature_range_low > temperature_range_high) {
|
||||
|
|
@ -145,23 +165,14 @@ void ConfigManipulation::check_filament_max_volumetric_speed(DynamicPrintConfig
|
|||
|
||||
void ConfigManipulation::check_chamber_temperature(DynamicPrintConfig* config)
|
||||
{
|
||||
const static std::map<std::string, int>recommend_temp_map = {
|
||||
{"PLA",45},
|
||||
{"PLA-CF",45},
|
||||
{"PVA",45},
|
||||
{"TPU",50},
|
||||
{"PETG",55},
|
||||
{"PCTG",55},
|
||||
{"PETG-CF",55}
|
||||
};
|
||||
bool support_chamber_temp_control=GUI::wxGetApp().preset_bundle->printers.get_selected_preset().config.opt_bool("support_chamber_temp_control");
|
||||
if (support_chamber_temp_control&&config->has("chamber_temperatures")) {
|
||||
std::string filament_type = config->option<ConfigOptionStrings>("filament_type")->get_at(0);
|
||||
auto iter = recommend_temp_map.find(filament_type);
|
||||
if (iter!=recommend_temp_map.end()) {
|
||||
if (iter->second < config->option<ConfigOptionInts>("chamber_temperatures")->get_at(0)) {
|
||||
int chamber_min_temp, chamber_max_temp;
|
||||
if (MaterialType::get_chamber_temperature_range(filament_type, chamber_min_temp, chamber_max_temp)) {
|
||||
if (chamber_max_temp < config->option<ConfigOptionInts>("chamber_temperatures")->get_at(0)) {
|
||||
wxString msg_text = wxString::Format(_L("Current chamber temperature is higher than the material's safe temperature, this may result in material softening and clogging. "
|
||||
"The maximum safe temperature for the material is %d"), iter->second);
|
||||
"The maximum safe temperature for the material is %d"), chamber_max_temp);
|
||||
MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | wxOK);
|
||||
is_msg_dlg_already_exist = true;
|
||||
dialog.ShowModal();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue