ENH: change param name

Jira: none

change filament category to filament adhesiveness category

Signed-off-by: qing.zhang <qing.zhang@bambulab.com>
Change-Id: I267d71b2f968becf4e8f434daafdf1a70c36a823
This commit is contained in:
qing.zhang 2025-02-11 14:31:27 +08:00 committed by lane.wei
parent cca59b8e52
commit faec4160d5
29 changed files with 48 additions and 48 deletions

View File

@ -87,7 +87,7 @@
"textured_plate_temp_initial_layer": [
"100"
],
"filament_category": [
"filament_adhesiveness_category": [
"800"
],
"impact_strength_z":["4.5"],

View File

@ -33,7 +33,7 @@
"slow_down_layer_time": [
"6"
],
"filament_category": [
"filament_adhesiveness_category": [
"703"
]
}

View File

@ -30,7 +30,7 @@
"slow_down_layer_time": [
"8"
],
"filament_category": [
"filament_adhesiveness_category": [
"702"
],
"filament_start_gcode": [

View File

@ -57,7 +57,7 @@
"textured_plate_temp_initial_layer": [
"60"
],
"filament_category": [
"filament_adhesiveness_category": [
"705"
]
}

View File

@ -36,7 +36,7 @@
"slow_down_layer_time": [
"6"
],
"filament_category": [
"filament_adhesiveness_category": [
"701"
]
}

View File

@ -30,7 +30,7 @@
"slow_down_layer_time": [
"8"
],
"filament_category": [
"filament_adhesiveness_category": [
"700"
],
"filament_start_gcode": [

View File

@ -39,7 +39,7 @@
"temperature_vitrification": [
"90"
],
"filament_category": [
"filament_adhesiveness_category": [
"706"
]
}

View File

@ -83,7 +83,7 @@
"textured_plate_temp_initial_layer": [
"70"
],
"filament_category": [
"filament_adhesiveness_category": [
"800"
],
"filament_start_gcode": [

View File

@ -5,7 +5,7 @@
"from": "system",
"filament_id": "GFS97",
"instantiation": "false",
"filament_category": [
"filament_adhesiveness_category": [
"797"
]
}

View File

@ -29,7 +29,7 @@
"temperature_vitrification": [
"70"
],
"filament_category": [
"filament_adhesiveness_category": [
"901"
],
"filament_start_gcode": [

View File

@ -32,7 +32,7 @@
"temperature_vitrification": [
"70"
],
"filament_category": [
"filament_adhesiveness_category": [
"901"
],
"filament_start_gcode": [

View File

@ -85,7 +85,7 @@
"textured_plate_temp_initial_layer": [
"90"
],
"filament_category": [
"filament_adhesiveness_category": [
"200"
],
"filament_end_gcode": [

View File

@ -85,7 +85,7 @@
"textured_plate_temp_initial_layer": [
"90"
],
"filament_category": [
"filament_adhesiveness_category": [
"200"
],
"filament_end_gcode": [

View File

@ -82,7 +82,7 @@
"textured_plate_temp_initial_layer": [
"90"
],
"filament_category": [
"filament_adhesiveness_category": [
"798"
],
"filament_end_gcode": [

View File

@ -85,7 +85,7 @@
"textured_plate_temp_initial_layer": [
"100"
],
"filament_category": [
"filament_adhesiveness_category": [
"400"
],
"filament_end_gcode": [

View File

@ -85,7 +85,7 @@
"textured_plate_temp_initial_layer": [
"110"
],
"filament_category": [
"filament_adhesiveness_category": [
"500"
],
"filament_end_gcode": [

View File

@ -64,7 +64,7 @@
"textured_plate_temp_initial_layer": [
"80"
],
"filament_category": [
"filament_adhesiveness_category": [
"300"
],
"filament_start_gcode": [

View File

@ -76,7 +76,7 @@
"textured_plate_temp_initial_layer": [
"55"
],
"filament_category": [
"filament_adhesiveness_category": [
"100"
],
"impact_strength_z":["10.0"],

View File

@ -85,7 +85,7 @@
"textured_plate_temp_initial_layer": [
"55"
],
"filament_category": [
"filament_adhesiveness_category": [
"902"
],
"filament_start_gcode": [

View File

@ -82,7 +82,7 @@
"textured_plate_temp_initial_layer": [
"110"
],
"filament_category": [
"filament_adhesiveness_category": [
"801"
],
"filament_end_gcode": [

View File

@ -85,7 +85,7 @@
"textured_plate_temp_initial_layer": [
"55"
],
"filament_category": [
"filament_adhesiveness_category": [
"704"
],
"filament_start_gcode": [

View File

@ -79,7 +79,7 @@
"textured_plate_temp_initial_layer": [
"35"
],
"filament_category": [
"filament_adhesiveness_category": [
"600"
],
"filament_start_gcode": [

View File

@ -1414,7 +1414,7 @@ void WipeTower::set_extruder(size_t idx, const PrintConfig& config)
m_filpar[idx].is_support = config.filament_is_support.get_at(idx);
m_filpar[idx].nozzle_temperature = config.nozzle_temperature.get_at(idx);
m_filpar[idx].nozzle_temperature_initial_layer = config.nozzle_temperature_initial_layer.get_at(idx);
m_filpar[idx].category = config.filament_category.get_at(idx);
m_filpar[idx].category = config.filament_adhesiveness_category.get_at(idx);
// If this is a single extruder MM printer, we will use all the SE-specific config values.
// Otherwise, the defaults will be used to turn off the SE stuff.
@ -3302,10 +3302,10 @@ void WipeTower::toolchange_wipe_new(WipeTowerWriter &writer, const box_coordinat
if (is_first_layer()) { writer.append(";" + GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Width) + std::to_string(m_perimeter_width) + "\n"); }
}
WipeTower::WipeTowerBlock &WipeTower::get_block_by_category(int filament_category)
WipeTower::WipeTowerBlock &WipeTower::get_block_by_category(int filament_adhesiveness_category)
{
auto iter = std::find_if(m_wipe_tower_blocks.begin(), m_wipe_tower_blocks.end(), [&filament_category](const WipeTower::WipeTowerBlock &item) {
return item.filament_category == filament_category;
auto iter = std::find_if(m_wipe_tower_blocks.begin(), m_wipe_tower_blocks.end(), [&filament_adhesiveness_category](const WipeTower::WipeTowerBlock &item) {
return item.filament_adhesiveness_category == filament_adhesiveness_category;
});
if (iter != m_wipe_tower_blocks.end()) {
@ -3314,17 +3314,17 @@ WipeTower::WipeTowerBlock &WipeTower::get_block_by_category(int filament_categor
else {
WipeTower::WipeTowerBlock new_block;
new_block.block_id = m_wipe_tower_blocks.size();
new_block.filament_category = filament_category;
new_block.filament_adhesiveness_category = filament_adhesiveness_category;
m_wipe_tower_blocks.emplace_back(new_block);
return m_wipe_tower_blocks.back();
}
}
void WipeTower::add_depth_to_block(int filament_id, int filament_category, float depth, bool is_nozzle_change)
void WipeTower::add_depth_to_block(int filament_id, int filament_adhesiveness_category, float depth, bool is_nozzle_change)
{
std::vector<WipeTower::BlockDepthInfo> &layer_depth = m_all_layers_depth[m_cur_layer_id];
auto iter = std::find_if(layer_depth.begin(), layer_depth.end(), [&filament_category](const WipeTower::BlockDepthInfo &item) {
return item.category == filament_category;
auto iter = std::find_if(layer_depth.begin(), layer_depth.end(), [&filament_adhesiveness_category](const WipeTower::BlockDepthInfo &item) {
return item.category == filament_adhesiveness_category;
});
if (iter != layer_depth.end()) {
@ -3334,7 +3334,7 @@ void WipeTower::add_depth_to_block(int filament_id, int filament_category, float
}
else {
WipeTower::BlockDepthInfo new_block;
new_block.category = filament_category;
new_block.category = filament_adhesiveness_category;
new_block.depth = depth;
if (is_nozzle_change)
new_block.nozzle_change_depth += depth;
@ -3406,8 +3406,8 @@ void WipeTower::generate_wipe_tower_blocks()
for (auto& info : m_plan) {
for (const WipeTowerInfo::ToolChange &tool_change : info.tool_changes) {
if (is_in_same_extruder(tool_change.old_tool, tool_change.new_tool)) {
int filament_category = get_filament_category(tool_change.new_tool);
add_depth_to_block(tool_change.new_tool, filament_category, tool_change.required_depth);
int filament_adhesiveness_category = get_filament_category(tool_change.new_tool);
add_depth_to_block(tool_change.new_tool, filament_adhesiveness_category, tool_change.required_depth);
}
else {
int old_filament_category = get_filament_category(tool_change.old_tool);
@ -3450,12 +3450,12 @@ void WipeTower::generate_wipe_tower_blocks()
for (WipeTowerBlock& block : m_wipe_tower_blocks) {
for (int layer_id = 0; layer_id < all_layer_category_to_depth.size(); ++layer_id) {
std::unordered_map<int, float> &category_to_depth = all_layer_category_to_depth[layer_id];
if (is_approx(category_to_depth[block.filament_category], 0.f)) {
if (is_approx(category_to_depth[block.filament_adhesiveness_category], 0.f)) {
int layer_count = solid_infill_layer;
while (layer_count > 0) {
if (layer_id + layer_count < all_layer_category_to_depth.size()) {
std::unordered_map<int, float>& up_layer_depth = all_layer_category_to_depth[layer_id + layer_count];
if (!is_approx(up_layer_depth[block.filament_category], 0.f)) {
if (!is_approx(up_layer_depth[block.filament_adhesiveness_category], 0.f)) {
block.solid_infill[layer_id] = true;
break;
}
@ -3688,7 +3688,7 @@ void WipeTower::generate_new(std::vector<std::vector<WipeTower::ToolChangeResult
if (wall_idx == -1) {
bool need_insert_solid_infill = false;
for (const WipeTowerBlock &block : m_wipe_tower_blocks) {
if (block.solid_infill[m_cur_layer_id] && (block.filament_category != m_filament_categories[m_current_tool])) {
if (block.solid_infill[m_cur_layer_id] && (block.filament_adhesiveness_category != m_filament_categories[m_current_tool])) {
need_insert_solid_infill = true;
break;
}
@ -3747,7 +3747,7 @@ void WipeTower::generate_new(std::vector<std::vector<WipeTower::ToolChangeResult
}
ToolChangeResult finish_block_tcr;
if (block.solid_infill[m_cur_layer_id] && block.filament_category != m_filament_categories[wall_idx])
if (block.solid_infill[m_cur_layer_id] && block.filament_adhesiveness_category != m_filament_categories[wall_idx])
finish_block_tcr = finish_block_solid(block, finish_layer_filament, layer.extruder_fill);
else
finish_block_tcr = finish_block(block, finish_layer_filament, layer.extruder_fill);

View File

@ -319,7 +319,7 @@ public:
struct WipeTowerBlock
{
int block_id{0};
int filament_category{0};
int filament_adhesiveness_category{0};
std::vector<float> layer_depths;
std::vector<bool> solid_infill;
float depth{0};
@ -341,8 +341,8 @@ public:
int m_last_block_id;
// help function
WipeTowerBlock& get_block_by_category(int filament_category);
void add_depth_to_block(int filament_id, int filament_category, float depth, bool is_nozzle_change = false);
WipeTowerBlock& get_block_by_category(int filament_adhesiveness_category);
void add_depth_to_block(int filament_id, int filament_adhesiveness_category, float depth, bool is_nozzle_change = false);
int get_filament_category(int filament_id);
bool is_in_same_extruder(int filament_id_1, int filament_id_2);
void reset_block_status();

View File

@ -910,7 +910,7 @@ static std::vector<std::string> s_Preset_print_options {
static std::vector<std::string> s_Preset_filament_options {
/*"filament_colour", */ "default_filament_colour","required_nozzle_HRC","filament_diameter", "filament_type", "filament_soluble", "filament_is_support","filament_scarf_seam_type", "filament_scarf_height", "filament_scarf_gap","filament_scarf_length",
"filament_max_volumetric_speed", "impact_strength_z",
"filament_flow_ratio", "filament_density", "filament_category", "filament_cost", "filament_minimal_purge_on_wipe_tower",
"filament_flow_ratio", "filament_density", "filament_adhesiveness_category", "filament_cost", "filament_minimal_purge_on_wipe_tower",
"nozzle_temperature", "nozzle_temperature_initial_layer",
// BBS
"cool_plate_temp", "eng_plate_temp", "hot_plate_temp", "textured_plate_temp", "cool_plate_temp_initial_layer", "eng_plate_temp_initial_layer", "hot_plate_temp_initial_layer","textured_plate_temp_initial_layer",

View File

@ -266,7 +266,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|| opt_key == "filament_map_mode"
|| opt_key == "filament_map"
|| opt_key == "unprintable_filament_map"
|| opt_key == "filament_category"
|| opt_key == "filament_adhesiveness_category"
//|| opt_key == "wipe_tower_bridging"
|| opt_key == "wipe_tower_no_sparse_layers"
|| opt_key == "flush_volumes_matrix"
@ -2714,8 +2714,8 @@ void Print::_make_wipe_tower()
wipe_tower.set_used_filament_ids(std::vector<int>(used_filament_ids.begin(), used_filament_ids.end()));
std::vector<int> categories;
for (size_t i = 0; i < m_config.filament_category.values.size(); ++i) {
categories.push_back(m_config.filament_category.get_at(i));
for (size_t i = 0; i < m_config.filament_adhesiveness_category.values.size(); ++i) {
categories.push_back(m_config.filament_adhesiveness_category.get_at(i));
}
wipe_tower.set_filament_categories(categories);

View File

@ -1773,8 +1773,8 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionPercents{ 100 });
def = this->add("filament_category", coInts);
def->label = L("Category");
def = this->add("filament_adhesiveness_category", coInts);
def->label = L("Adhesiveness Category");
def->tooltip = L("Filament category");
def->min = 0;
def->mode = comDevelop;

View File

@ -1008,7 +1008,7 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionBools, enable_pressure_advance))
((ConfigOptionFloats, pressure_advance))
((ConfigOptionFloats, filament_diameter))
((ConfigOptionInts, filament_category))
((ConfigOptionInts, filament_adhesiveness_category))
((ConfigOptionFloats, filament_density))
((ConfigOptionStrings, filament_type))
((ConfigOptionBools, filament_soluble))

View File

@ -3194,7 +3194,7 @@ void TabFilament::build()
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_category");
optgroup->append_single_option_line("filament_adhesiveness_category");
optgroup->append_single_option_line("filament_flow_ratio", "", 0);
optgroup->append_single_option_line("enable_pressure_advance");
optgroup->append_single_option_line("pressure_advance");