NEW: add nozzle_hrc and filament required hrc
hrc determine which filament could be printed by the nozzle if the filament required hrc smaller than the nozzle hrc the fillament could be printed either of it be zero means use other printers or user want to print it anyway Signed-off-by: qing.zhang <qing.zhang@bambulab.com> Change-Id: Ic32dfaed4f9c80774a670c362de612254f3a5ed0
This commit is contained in:
parent
9ec439c8f5
commit
6ca5df9118
21 changed files with 107 additions and 19 deletions
|
@ -30,6 +30,7 @@
|
|||
"Bambu Lab X1 Carbon 0.4 nozzle",
|
||||
"Bambu Lab X1 Carbon 0.6 nozzle",
|
||||
"Bambu Lab X1 Carbon 0.8 nozzle",
|
||||
"Bambu Lab X1 0.4 nozzle",
|
||||
"Bambu Lab X1 0.6 nozzle",
|
||||
"Bambu Lab X1 0.8 nozzle"
|
||||
]
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
"from": "system",
|
||||
"instantiation": "false",
|
||||
"inherits": "fdm_filament_pa",
|
||||
"required_nozzle_HRC": [
|
||||
"55"
|
||||
],
|
||||
"filament_vendor": [
|
||||
"Bambu Lab"
|
||||
],
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
"from": "system",
|
||||
"instantiation": "false",
|
||||
"inherits": "fdm_filament_pet",
|
||||
"required_nozzle_HRC": [
|
||||
"55"
|
||||
],
|
||||
"filament_vendor": [
|
||||
"Bambu Lab"
|
||||
],
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
"Bambu Lab X1 Carbon 0.4 nozzle",
|
||||
"Bambu Lab X1 Carbon 0.6 nozzle",
|
||||
"Bambu Lab X1 Carbon 0.8 nozzle",
|
||||
"Bambu Lab X1 0.4 nozzle",
|
||||
"Bambu Lab X1 0.6 nozzle",
|
||||
"Bambu Lab X1 0.8 nozzle"
|
||||
]
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_pa",
|
||||
"required_nozzle_HRC": [
|
||||
"55"
|
||||
],
|
||||
"filament_type": [
|
||||
"PA-CF"
|
||||
],
|
||||
|
@ -34,6 +37,7 @@
|
|||
"Bambu Lab X1 Carbon 0.4 nozzle",
|
||||
"Bambu Lab X1 Carbon 0.6 nozzle",
|
||||
"Bambu Lab X1 Carbon 0.8 nozzle",
|
||||
"Bambu Lab X1 0.4 nozzle",
|
||||
"Bambu Lab X1 0.6 nozzle",
|
||||
"Bambu Lab X1 0.8 nozzle"
|
||||
]
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
"Bambu Lab X1 Carbon 0.4 nozzle",
|
||||
"Bambu Lab X1 Carbon 0.6 nozzle",
|
||||
"Bambu Lab X1 Carbon 0.8 nozzle",
|
||||
"Bambu Lab X1 0.4 nozzle",
|
||||
"Bambu Lab X1 0.6 nozzle",
|
||||
"Bambu Lab X1 0.8 nozzle"
|
||||
]
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
"filament_type": [
|
||||
"PLA-CF"
|
||||
],
|
||||
"required_nozzle_HRC": [
|
||||
"55"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"12"
|
||||
],
|
||||
|
@ -34,10 +37,11 @@
|
|||
"; filament start gcode\n{if (bed_temperature[current_extruder] >45)||(bed_temperature_initial_layer[current_extruder] >45)}M106 P3 S255\n{elsif(bed_temperature[current_extruder] >35)||(bed_temperature_initial_layer[current_extruder] >35)}M106 P3 S180\n{endif}"
|
||||
],
|
||||
"compatible_printers": [
|
||||
"Bambu Lab X1 Carbon 0.4 nozzle",
|
||||
"Bambu Lab X1 Carbon 0.6 nozzle",
|
||||
"Bambu Lab X1 Carbon 0.8 nozzle",
|
||||
"Bambu Lab X1 0.6 nozzle",
|
||||
"Bambu Lab X1 0.8 nozzle"
|
||||
]
|
||||
"Bambu Lab X1 Carbon 0.4 nozzle",
|
||||
"Bambu Lab X1 Carbon 0.6 nozzle",
|
||||
"Bambu Lab X1 Carbon 0.8 nozzle",
|
||||
"Bambu Lab X1 0.4 nozzle",
|
||||
"Bambu Lab X1 0.6 nozzle",
|
||||
"Bambu Lab X1 0.8 nozzle"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
"compatible_printers": [
|
||||
"Bambu Lab X1 Carbon 0.4 nozzle",
|
||||
"Bambu Lab X1 0.4 nozzle",
|
||||
"Bambu Lab X1 Carbon 0.6 nozzle",
|
||||
"Bambu Lab X1 Carbon 0.8 nozzle",
|
||||
"Bambu Lab X1 0.6 nozzle",
|
||||
"Bambu Lab X1 0.8 nozzle"
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
"name": "fdm_filament_common",
|
||||
"from": "system",
|
||||
"instantiation": "false",
|
||||
"required_nozzle_HRC": [
|
||||
"20"
|
||||
],
|
||||
"cool_plate_temp" : [
|
||||
"60"
|
||||
],
|
||||
|
|
|
@ -29,5 +29,6 @@
|
|||
"machine_load_filament_time": "17",
|
||||
"machine_unload_filament_time": "16",
|
||||
"nozzle_type": "stainless_steel",
|
||||
"nozzle_hrc": "20",
|
||||
"auxiliary_fan": "0"
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -29,5 +29,6 @@
|
|||
"machine_load_filament_time": "17",
|
||||
"machine_unload_filament_time": "16",
|
||||
"nozzle_type": "hardened_steel",
|
||||
"nozzle_hrc": "55",
|
||||
"auxiliary_fan": "1"
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ static const float DEFAULT_TRAVEL_ACCELERATION = 1250.0f;
|
|||
|
||||
static const size_t MIN_EXTRUDERS_COUNT = 5;
|
||||
static const float DEFAULT_FILAMENT_DIAMETER = 1.75f;
|
||||
static const int DEFAULT_FILAMENT_HRC = 0;
|
||||
static const float DEFAULT_FILAMENT_DENSITY = 1.245f;
|
||||
static const int DEFAULT_FILAMENT_VITRIFICATION_TEMPERATURE = 0;
|
||||
static const Slic3r::Vec3f DEFAULT_EXTRUDER_OFFSET = Slic3r::Vec3f::Zero();
|
||||
|
@ -778,6 +779,7 @@ void GCodeProcessorResult::reset() {
|
|||
extruders_count = 0;
|
||||
extruder_colors = std::vector<std::string>();
|
||||
filament_diameters = std::vector<float>(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_DIAMETER);
|
||||
required_nozzle_HRC = std::vector<int>(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_HRC);
|
||||
filament_densities = std::vector<float>(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_DENSITY);
|
||||
custom_gcode_per_print_z = std::vector<CustomGCode::Item>();
|
||||
warnings.clear();
|
||||
|
@ -881,14 +883,17 @@ void GCodeProcessor::apply_config(const PrintConfig& config)
|
|||
m_extruder_offsets.resize(extruders_count);
|
||||
m_extruder_colors.resize(extruders_count);
|
||||
m_result.filament_diameters.resize(extruders_count);
|
||||
m_result.required_nozzle_HRC.resize(extruders_count);
|
||||
m_result.filament_densities.resize(extruders_count);
|
||||
m_result.filament_vitrification_temperature.resize(extruders_count);
|
||||
m_extruder_temps.resize(extruders_count);
|
||||
m_result.nozzle_hrc = static_cast<int>(config.nozzle_hrc.getInt());
|
||||
|
||||
for (size_t i = 0; i < extruders_count; ++ i) {
|
||||
m_extruder_offsets[i] = to_3d(config.extruder_offset.get_at(i).cast<float>().eval(), 0.f);
|
||||
m_extruder_colors[i] = static_cast<unsigned char>(i);
|
||||
m_result.filament_diameters[i] = static_cast<float>(config.filament_diameter.get_at(i));
|
||||
m_result.required_nozzle_HRC[i] = static_cast<int>(config.required_nozzle_HRC.get_at(i));
|
||||
m_result.filament_densities[i] = static_cast<float>(config.filament_density.get_at(i));
|
||||
m_result.filament_vitrification_temperature[i] = static_cast<float>(config.temperature_vitrification.get_at(i));
|
||||
}
|
||||
|
@ -935,6 +940,9 @@ void GCodeProcessor::apply_config(const DynamicPrintConfig& config)
|
|||
if (nozzle_volume != nullptr)
|
||||
m_nozzle_volume = nozzle_volume->value;
|
||||
|
||||
const ConfigOptionInt *nozzle_HRC = config.option<ConfigOptionInt>("nozzle_hrc");
|
||||
if (nozzle_HRC != nullptr) m_result.nozzle_hrc = nozzle_HRC->value;
|
||||
|
||||
const ConfigOptionEnum<GCodeFlavor>* gcode_flavor = config.option<ConfigOptionEnum<GCodeFlavor>>("gcode_flavor");
|
||||
if (gcode_flavor != nullptr)
|
||||
m_flavor = gcode_flavor->value;
|
||||
|
@ -978,6 +986,18 @@ void GCodeProcessor::apply_config(const DynamicPrintConfig& config)
|
|||
}
|
||||
}
|
||||
|
||||
const ConfigOptionInts *filament_HRC = config.option<ConfigOptionInts>("required_nozzle_HRC");
|
||||
if (filament_HRC != nullptr) {
|
||||
m_result.required_nozzle_HRC.clear();
|
||||
m_result.required_nozzle_HRC.resize(filament_HRC->values.size());
|
||||
for (size_t i = 0; i < filament_HRC->values.size(); ++i) { m_result.required_nozzle_HRC[i] = static_cast<float>(filament_HRC->values[i]); }
|
||||
}
|
||||
|
||||
if (m_result.required_nozzle_HRC.size() < m_result.extruders_count) {
|
||||
for (size_t i = m_result.required_nozzle_HRC.size(); i < m_result.extruders_count; ++i) { m_result.required_nozzle_HRC.emplace_back(DEFAULT_FILAMENT_HRC);
|
||||
}
|
||||
}
|
||||
|
||||
const ConfigOptionFloats* filament_densities = config.option<ConfigOptionFloats>("filament_density");
|
||||
if (filament_densities != nullptr) {
|
||||
m_result.filament_densities.clear();
|
||||
|
@ -3996,6 +4016,20 @@ void GCodeProcessor::update_slice_warnings()
|
|||
if (!warning.params.empty()) {
|
||||
warning.msg = BED_TEMP_TOO_HIGH_THAN_FILAMENT;
|
||||
m_result.warnings.push_back(warning);
|
||||
|
||||
//bbs:HRC checker
|
||||
if (m_result.nozzle_hrc!=0) {
|
||||
for (size_t i = 0; i < used_extruders.size(); i++) {
|
||||
int HRC=0;
|
||||
if (used_extruders[i] < m_result.required_nozzle_HRC.size())
|
||||
HRC = m_result.required_nozzle_HRC[used_extruders[i]];
|
||||
if (HRC != 0 && (m_result.nozzle_hrc<HRC)) {
|
||||
GCodeProcessorResult::SliceWarning warning;
|
||||
warning.level = 1;
|
||||
warning.msg = THE_ACTUAL_NOZZLE_HRC_SMALLER_THAN__THE_REQUAIRED_NOZZLE_HRC;
|
||||
m_result.warnings.emplace_back(std::move(warning));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_result.warnings.shrink_to_fit();
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
namespace Slic3r {
|
||||
|
||||
// slice warnings enum strings
|
||||
#define THE_ACTUAL_NOZZLE_HRC_SMALLER_THAN__THE_REQUAIRED_NOZZLE_HRC "the_actual_nozzle_hrc_smaller_than_the_required_nozzle_hrc"
|
||||
#define BED_TEMP_TOO_HIGH_THAN_FILAMENT "bed_temperature_too_high_than_filament"
|
||||
|
||||
enum class EMoveType : unsigned char
|
||||
|
@ -86,6 +87,7 @@ namespace Slic3r {
|
|||
|
||||
struct GCodeProcessorResult
|
||||
{
|
||||
|
||||
struct SettingsIds
|
||||
{
|
||||
std::string print;
|
||||
|
@ -152,12 +154,14 @@ namespace Slic3r {
|
|||
size_t extruders_count;
|
||||
std::vector<std::string> extruder_colors;
|
||||
std::vector<float> filament_diameters;
|
||||
std::vector<int> required_nozzle_HRC;
|
||||
std::vector<float> filament_densities;
|
||||
std::vector<int> filament_vitrification_temperature;
|
||||
PrintEstimatedStatistics print_statistics;
|
||||
std::vector<CustomGCode::Item> custom_gcode_per_print_z;
|
||||
//BBS
|
||||
std::vector<SliceWarning> warnings;
|
||||
int nozzle_hrc;
|
||||
|
||||
#if ENABLE_GCODE_VIEWER_STATISTICS
|
||||
int64_t time{ 0 };
|
||||
|
@ -575,7 +579,6 @@ namespace Slic3r {
|
|||
std::vector<Vec3f> m_extruder_offsets;
|
||||
GCodeFlavor m_flavor;
|
||||
float m_nozzle_volume;
|
||||
|
||||
AxisCoords m_start_position; // mm
|
||||
AxisCoords m_end_position; // mm
|
||||
AxisCoords m_origin; // mm
|
||||
|
@ -832,7 +835,6 @@ namespace Slic3r {
|
|||
float get_filament_load_time(size_t extruder_id);
|
||||
float get_filament_unload_time(size_t extruder_id);
|
||||
int get_filament_vitrification_temperature(size_t extrude_id);
|
||||
|
||||
void process_custom_gcode_time(CustomGCode::Type code);
|
||||
void process_filaments(CustomGCode::Type code);
|
||||
|
||||
|
|
|
@ -734,7 +734,8 @@ static std::vector<std::string> s_Preset_print_options {
|
|||
};
|
||||
|
||||
static std::vector<std::string> s_Preset_filament_options {
|
||||
/* "filament_colour",*/ "default_filament_colour", "filament_diameter", "filament_type", "filament_soluble", "filament_is_support", "filament_max_volumetric_speed",
|
||||
/*"filament_colour", */ "default_filament_colour","required_nozzle_HRC","filament_diameter", "filament_type", "filament_soluble", "filament_is_support",
|
||||
"filament_max_volumetric_speed",
|
||||
"filament_flow_ratio", "filament_density", "filament_cost", "filament_minimal_purge_on_wipe_tower",
|
||||
"nozzle_temperature", "nozzle_temperature_initial_layer",
|
||||
// BBS
|
||||
|
@ -771,7 +772,7 @@ static std::vector<std::string> s_Preset_printer_options {
|
|||
"silent_mode",
|
||||
// BBS
|
||||
"scan_first_layer", "machine_load_filament_time", "machine_unload_filament_time", "machine_pause_gcode", "template_custom_gcode",
|
||||
"nozzle_type", "auxiliary_fan", "nozzle_volume",
|
||||
"nozzle_type", "nozzle_hrc","auxiliary_fan", "nozzle_volume",
|
||||
//SoftFever
|
||||
"host_type", "print_host", "printhost_apikey",
|
||||
"printhost_cafile","printhost_port","printhost_authorization_type",
|
||||
|
|
|
@ -130,7 +130,9 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|
|||
// BBS
|
||||
"wipe_distance",
|
||||
"curr_bed_type",
|
||||
"nozzle_volume"
|
||||
"nozzle_volume",
|
||||
"nozzle_hrc",
|
||||
"required_nozzle_HRC"
|
||||
};
|
||||
|
||||
static std::unordered_set<std::string> steps_ignore;
|
||||
|
|
|
@ -1089,6 +1089,15 @@ void PrintConfigDef::init_fff_params()
|
|||
def->mode = comDevelop;
|
||||
def->set_default_value(new ConfigOptionStrings{ "#00AE42" });
|
||||
|
||||
//bbs
|
||||
def = this->add("required_nozzle_HRC", coInts);
|
||||
def->label = L("Required nozzle HRC");
|
||||
def->tooltip = L("the HRC of nozzle when print the filament. zeros means the setting not be used");
|
||||
def->min = 0;
|
||||
def->max = 500;
|
||||
def->mode = comDevelop;
|
||||
def->set_default_value(new ConfigOptionInts{0});
|
||||
|
||||
def = this->add("filament_max_volumetric_speed", coFloats);
|
||||
def->label = L("Max volumetric speed");
|
||||
def->tooltip = L("This setting stands for how much volume of filament can be melted and extruded per second. "
|
||||
|
@ -1434,6 +1443,15 @@ void PrintConfigDef::init_fff_params()
|
|||
def->mode = comDevelop;
|
||||
def->set_default_value(new ConfigOptionEnum<NozzleType>(ntUndefine));
|
||||
|
||||
def = this->add("nozzle_hrc", coInt);
|
||||
def->label = L("Nozzle HRC");
|
||||
def->tooltip = L("The hardness of nozzle. zeros means the setting not be used");
|
||||
def->sidetext = L("HRC");
|
||||
def->min = 0;
|
||||
def->max = 500;
|
||||
def->mode = comDevelop;
|
||||
def->set_default_value(new ConfigOptionInt{0});
|
||||
|
||||
def = this->add("auxiliary_fan", coBool);
|
||||
def->label = L("Auxiliary part cooling fan");
|
||||
def->tooltip = L("Enable this option if machine has auxiliary part cooling fan");
|
||||
|
|
|
@ -759,6 +759,7 @@ PRINT_CONFIG_CLASS_DEFINE(
|
|||
((ConfigOptionStrings, default_filament_colour))
|
||||
((ConfigOptionInts, temperature_vitrification)) //BBS
|
||||
((ConfigOptionFloats, filament_max_volumetric_speed))
|
||||
((ConfigOptionInts, required_nozzle_HRC))
|
||||
((ConfigOptionFloat, machine_load_filament_time))
|
||||
((ConfigOptionFloat, machine_unload_filament_time))
|
||||
((ConfigOptionFloats, filament_minimal_purge_on_wipe_tower))
|
||||
|
@ -792,6 +793,7 @@ PRINT_CONFIG_CLASS_DEFINE(
|
|||
((ConfigOptionString, template_custom_gcode))
|
||||
//BBS
|
||||
((ConfigOptionEnum<NozzleType>, nozzle_type))
|
||||
((ConfigOptionInt, nozzle_hrc))
|
||||
((ConfigOptionBool, auxiliary_fan))
|
||||
)
|
||||
|
||||
|
|
|
@ -2424,6 +2424,8 @@ void TabFilament::build()
|
|||
optgroup->append_single_option_line("filament_soluble");
|
||||
// BBS
|
||||
optgroup->append_single_option_line("filament_is_support");
|
||||
//optgroup->append_single_option_line("filament_colour");
|
||||
optgroup->append_single_option_line("required_nozzle_HRC");
|
||||
optgroup->append_single_option_line("default_filament_colour");
|
||||
optgroup->append_single_option_line("filament_diameter");
|
||||
optgroup->append_single_option_line("filament_flow_ratio");
|
||||
|
@ -2852,6 +2854,7 @@ void TabPrinter::build_fff()
|
|||
|
||||
optgroup = page->new_optgroup(L("Accessory") /*, L"param_accessory"*/);
|
||||
optgroup->append_single_option_line("nozzle_type");
|
||||
optgroup->append_single_option_line("nozzle_hrc");
|
||||
optgroup->append_single_option_line("auxiliary_fan");
|
||||
|
||||
const int gcode_field_height = 15; // 150
|
||||
|
|
Loading…
Reference in a new issue