FIX: Remove unprintable_filament_map

jira: none
Change-Id: I30285d0cc98a974e71f16fd9adb57dfcccb39415
This commit is contained in:
zhimin.zeng 2025-03-13 10:11:11 +08:00 committed by lane.wei
parent 4af6386302
commit 1959fa7d5c
9 changed files with 0 additions and 69 deletions

View File

@ -5731,7 +5731,6 @@ int CLI::run(int argc, char **argv)
else
mode = part_plate->get_real_filament_map_mode(m_print_config);
if (mode < FilamentMapMode::fmmManual) {
part_plate->set_unprintable_filament_ids(unprintable_filament_vec);
std::vector<int> conflict_filament_vector;
for (int index = 0; index < new_extruder_count; index++)
{

View File

@ -300,7 +300,6 @@ static constexpr const char* OTHER_LAYERS_PRINT_SEQUENCE_NUMS_ATTR = "other_laye
static constexpr const char* SPIRAL_VASE_MODE = "spiral_mode";
static constexpr const char* FILAMENT_MAP_MODE_ATTR = "filament_map_mode";
static constexpr const char* FILAMENT_MAP_ATTR = "filament_maps";
static constexpr const char* UNPRINTABLE_FILAMENT_MAP_ATTR = "unprintable_filament_maps";
static constexpr const char* LIMIT_FILAMENT_MAP_ATTR = "limit_filament_maps";
static constexpr const char* GCODE_FILE_ATTR = "gcode_file";
static constexpr const char* THUMBNAIL_FILE_ATTR = "thumbnail_file";
@ -4183,10 +4182,6 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
m_curr_plater->config.set_key_value("filament_map", new ConfigOptionInts(filament_map));
}
}
else if (key == UNPRINTABLE_FILAMENT_MAP_ATTR)
{
m_curr_plater->config.set_key_value("unprintable_filament_map", new ConfigOptionIntsGroups(get_vector_array_from_string(value)));
}
else if (key == GCODE_FILE_ATTR)
{
m_curr_plater->gcode_file = value;
@ -7606,23 +7601,6 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
stream << "\"/>\n";
}
ConfigOptionIntsGroups *unprintable_filament_maps_opt = plate_data->config.option<ConfigOptionIntsGroups>("unprintable_filament_map");
if (unprintable_filament_maps_opt != nullptr) {
stream << " <" << METADATA_TAG << " " << KEY_ATTR << "=\"" << UNPRINTABLE_FILAMENT_MAP_ATTR << "\" " << VALUE_ATTR << "=\"";
const std::vector<std::vector<int>> &values = unprintable_filament_maps_opt->values;
for (size_t i = 0; i < values.size(); ++i) {
if (i > 0)
stream << "#";
std::vector<int> index_values = values[i];
for (int j = 0; j < index_values.size(); ++j) {
if (j > 0)
stream << " ";
stream << index_values[j];
}
}
stream << "\"/>\n";
}
if (save_gcode)
stream << " <" << METADATA_TAG << " " << KEY_ATTR << "=\"" << GCODE_FILE_ATTR << "\" " << VALUE_ATTR << "=\"" << std::boolalpha << xml_escape(plate_data->gcode_file) << "\"/>\n";
if (!plate_data->gcode_file.empty()) {

View File

@ -282,7 +282,6 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n
|| opt_key == "extruder_ams_count"
|| opt_key == "filament_map_mode"
|| opt_key == "filament_map"
|| opt_key == "unprintable_filament_map"
|| opt_key == "filament_adhesiveness_category"
//|| opt_key == "wipe_tower_bridging"
|| opt_key == "wipe_tower_no_sparse_layers"

View File

@ -250,15 +250,6 @@ static t_config_option_keys print_config_diffs(
else if ((plate_index < option_new->values.size())||(plate_index < option_old->values.size()))
print_diff.emplace_back(opt_key);
}
else if (opt_key == "unprintable_filament_map") {
size_t extruder_nums = new_full_config.option<ConfigOptionFloatsNullable>("nozzle_diameter")->values.size();
std::vector<std::vector<int>> old_map = current_config.option<ConfigOptionIntsGroups>("unprintable_filament_map")->values;
std::vector<std::vector<int>> new_map = new_full_config.option<ConfigOptionIntsGroups>("unprintable_filament_map")->values;
old_map.resize(extruder_nums, std::vector<int>());
new_map.resize(extruder_nums, std::vector<int>());
if (old_map != new_map)
print_diff.emplace_back(opt_key);
}
else
print_diff.emplace_back(opt_key);
}
@ -290,18 +281,6 @@ static t_config_option_keys full_print_config_diffs(const DynamicPrintConfig &cu
else if ((plate_index < option_new->values.size())||(plate_index < option_old->values.size()))
full_config_diff.emplace_back(opt_key);
}
else if (opt_key == "unprintable_filament_map") {
size_t extruder_nums = new_full_config.option<ConfigOptionFloatsNullable>("nozzle_diameter")->values.size();
std::vector<std::vector<int>> old_map;
if (opt_old) {
old_map = current_full_config.option<ConfigOptionIntsGroups>("unprintable_filament_map")->values;
}
std::vector<std::vector<int>> new_map = new_full_config.option<ConfigOptionIntsGroups>("unprintable_filament_map")->values;
old_map.resize(extruder_nums, std::vector<int>());
new_map.resize(extruder_nums, std::vector<int>());
if (old_map != new_map)
full_config_diff.emplace_back(opt_key);
}
else
full_config_diff.emplace_back(opt_key);
}

View File

@ -1704,12 +1704,6 @@ void PrintConfigDef::init_fff_params()
def->mode = comDevelop;
def->set_default_value(new ConfigOptionInts{0});
def = this->add("unprintable_filament_map", coIntsGroups);
def->label = L("Unprintable filament map to extruder");
def->tooltip = L("Unprintable filament map to extruder");
def->mode = comDevelop;
def->set_default_value(new ConfigOptionIntsGroups{});
def = this->add("filament_map_mode", coEnum);
def->label = L("filament mapping mode");
def->tooltip = ("filament mapping mode used as plate param");

View File

@ -1041,7 +1041,6 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionInts, required_nozzle_HRC))
((ConfigOptionEnum<FilamentMapMode>, filament_map_mode))
((ConfigOptionInts, filament_map))
((ConfigOptionIntsGroups, unprintable_filament_map))
//((ConfigOptionInts, filament_extruder_id))
((ConfigOptionStrings, filament_extruder_variant))
((ConfigOptionFloat, machine_load_filament_time))

View File

@ -1942,8 +1942,6 @@ bool GLVolumeCollection::check_outside_state(const BuildVolume &build_volume, Mo
unprintable_filament_vec.emplace_back(std::vector<int>(filamnt_ids.begin(), filamnt_ids.end()));
}
curr_plate->set_unprintable_filament_ids(unprintable_filament_vec);
if (object_results && !partly_objects_set.empty()) {
object_results->partly_outside_objects = std::vector<ModelObject*>(partly_objects_set.begin(), partly_objects_set.end());
}

View File

@ -3108,18 +3108,6 @@ void PartPlate::clear_filament_map_mode()
m_config.erase("filament_map_mode");
}
const std::vector<std::vector<int>>& PartPlate::get_unprintable_filament_ids()
{
std::vector<std::vector<int>> & unprintabel_filament_maps = m_config.option<ConfigOptionIntsGroups>("unprintable_filament_map", true)->values;
return unprintabel_filament_maps;
}
void PartPlate::set_unprintable_filament_ids(const std::vector<std::vector<int>> &filament_ids)
{
std::vector<std::vector<int>> &unprintabel_filament_maps = m_config.option<ConfigOptionIntsGroups>("unprintable_filament_map", true)->values;
unprintabel_filament_maps = filament_ids;
}
void PartPlate::on_extruder_count_changed(int extruder_count)
{
if (extruder_count < 2) {

View File

@ -490,9 +490,6 @@ public:
std::map<std::string, std::string> get_diff_object_setting();
std::map<std::string, std::string> get_diff_plate_setting();
const std::vector<std::vector<int>> &get_unprintable_filament_ids();
void set_unprintable_filament_ids(const std::vector<std::vector<int>> &filament_ids);
void on_extruder_count_changed(int extruder_count);
void set_filament_count(int filament_count);
void on_filament_added();