Revert "ENH:instead of prime_volume by filament_prime_volume"

This reverts commit e7e6405ad3.
This commit is contained in:
Noisyfox
2025-10-05 19:16:05 +08:00
parent 6346d3001a
commit da2934d02a
13 changed files with 41 additions and 113 deletions
+2 -3
View File
@@ -2936,7 +2936,7 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
float w = dynamic_cast<const ConfigOptionFloat*>(m_config->option("prime_tower_width"))->value;
float a = dynamic_cast<const ConfigOptionFloat*>(proj_cfg.option("wipe_tower_rotation_angle"))->value;
// BBS
std::vector<double> v = dynamic_cast<const ConfigOptionFloats*>(m_config->option("filament_prime_volume"))->values;
float v = dynamic_cast<const ConfigOptionFloat*>(m_config->option("prime_volume"))->value;
Vec3d plate_origin = ppl.get_plate(plate_id)->get_origin();
const Print* print = m_process->fff_print();
@@ -2946,9 +2946,8 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
float brim_width = print->wipe_tower_data(filaments_count).brim_width;
const DynamicPrintConfig &print_cfg = wxGetApp().preset_bundle->prints.get_edited_preset().config;
double wipe_vol = get_max_element(v);
int nozzle_nums = wxGetApp().preset_bundle->get_printer_extruder_count();
Vec3d wipe_tower_size = ppl.get_plate(plate_id)->estimate_wipe_tower_size(print_cfg, w, wipe_vol, nozzle_nums, 0, false, dynamic_cast<const ConfigOptionBool*>(dconfig.option("enable_wrapping_detection"))->value);
Vec3d wipe_tower_size = ppl.get_plate(plate_id)->estimate_wipe_tower_size(print_cfg, w, v, nozzle_nums, 0, false, dynamic_cast<const ConfigOptionBool*>(dconfig.option("enable_wrapping_detection"))->value);
{
const float margin = WIPE_TOWER_MARGIN + brim_width;
+2 -2
View File
@@ -2061,11 +2061,11 @@ arrangement::ArrangePolygon PartPlate::estimate_wipe_tower_polygon(const Dynamic
float y = dynamic_cast<const ConfigOptionFloats*>(config.option("wipe_tower_y"))->get_at(plate_index);
float w = dynamic_cast<const ConfigOptionFloat*>(config.option("prime_tower_width"))->value;
//float a = dynamic_cast<const ConfigOptionFloat*>(config.option("wipe_tower_rotation_angle"))->value;
std::vector<double> v = dynamic_cast<const ConfigOptionFloats*>(config.option("filament_prime_volume"))->values;
float v = dynamic_cast<const ConfigOptionFloat*>(config.option("prime_volume"))->value;
float tower_brim_width = dynamic_cast<const ConfigOptionFloat*>(config.option("prime_tower_brim_width"))->value;
const ConfigOptionBool * wrapping_opt = dynamic_cast<const ConfigOptionBool *>(config.option("enable_wrapping_detection"));
bool enable_wrapping = (wrapping_opt != nullptr) && wrapping_opt->value;
wt_size = estimate_wipe_tower_size(config, w, get_max_element(v), extruder_count, plate_extruder_size, use_global_objects, enable_wrapping);
wt_size = estimate_wipe_tower_size(config, w, v, extruder_count, plate_extruder_size, use_global_objects, enable_wrapping);
int plate_width=m_width, plate_depth=m_depth;
float depth = wt_size(1);
float margin = WIPE_TOWER_MARGIN + tower_brim_width, wp_brim_width = 0.f;
+4 -14
View File
@@ -4377,7 +4377,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
"nozzle_height", "skirt_type", "skirt_loops", "skirt_speed","min_skirt_length", "skirt_distance", "skirt_start_angle",
"brim_width", "brim_object_gap", "brim_type", "nozzle_diameter", "single_extruder_multi_material", "preferred_orientation",
"enable_prime_tower", "wipe_tower_x", "wipe_tower_y", "prime_tower_width", "prime_tower_brim_width", "prime_tower_skip_points", "prime_tower_enable_framework",
"prime_tower_infill_gap","filament_prime_volume",
"prime_tower_infill_gap", "prime_volume",
"extruder_colour", "filament_colour", "filament_type", "material_colour", "printable_height", "extruder_printable_height", "printer_model", "printer_technology",
// These values are necessary to construct SlicingParameters by the Canvas3D variable layer height editor.
"layer_height", "initial_layer_print_height", "min_layer_height", "max_layer_height",
@@ -5696,17 +5696,6 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
for (int index = 0; index < filament_count; index++)
filament_adhesiveness_category_values[index] = 100;
ConfigOptionFloats *filament_prime_volume_option = config.option<ConfigOptionFloats>("filament_prime_volume", true);
std::vector<double> &filament_prime_volume_values = filament_prime_volume_option->values;
filament_prime_volume_values.resize(filament_count);
for (int index = 0; index < filament_count; index++) {
if (old_filament_prime_volume != 0.)
filament_prime_volume_values[index] = old_filament_prime_volume;
else
filament_prime_volume_values[index] = filament_prime_volume_values[0];
}
std::vector<std::string> &diff_settings = config.option<ConfigOptionStrings>("different_settings_to_system", true)->values;
diff_settings.resize(filament_count + 2);
@@ -5722,7 +5711,6 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
std::vector<std::string> diff_filament_keys;
std::string diff_filament_settings = diff_settings[index + 1];
Slic3r::unescape_strings_cstyle(diff_filament_settings, diff_filament_keys);
diff_filament_keys.emplace_back("filament_prime_volume");
diff_filament_keys.emplace_back("filament_adhesiveness_category");
diff_filament_settings = Slic3r::escape_strings_cstyle(diff_filament_keys);
diff_settings[index + 1] = diff_filament_settings;
@@ -15437,7 +15425,9 @@ void Plater::on_config_change(const DynamicPrintConfig &config)
boost::starts_with(opt_key, "prime_tower") ||
boost::starts_with(opt_key, "wipe_tower") ||
opt_key == "filament_minimal_purge_on_wipe_tower" ||
opt_key == "single_extruder_multi_material") {
opt_key == "single_extruder_multi_material" ||
// BBS
opt_key == "prime_volume") {
update_scheduled = true;
}
else if(opt_key == "extruder_colour") {
+1 -1
View File
@@ -2582,6 +2582,7 @@ void TabPrint::build()
optgroup->append_single_option_line("prime_tower_skip_points", "multimaterial_settings_prime_tower");
optgroup->append_single_option_line("prime_tower_enable_framework", "multimaterial_settings_prime_tower");
optgroup->append_single_option_line("prime_tower_width", "multimaterial_settings_prime_tower#width");
optgroup->append_single_option_line("prime_volume", "multimaterial_settings_prime_tower");
optgroup->append_single_option_line("prime_tower_brim_width", "multimaterial_settings_prime_tower#brim-width");
optgroup->append_single_option_line("prime_tower_infill_gap", "multimaterial_settings_prime_tower");
optgroup->append_single_option_line("wipe_tower_rotation_angle", "multimaterial_settings_prime_tower#wipe-tower-rotation-angle");
@@ -3689,7 +3690,6 @@ void TabFilament::build()
optgroup->append_single_option_line("filament_is_support");
optgroup->append_single_option_line("filament_change_length");
optgroup->append_single_option_line("filament_prime_volume");
//optgroup->append_single_option_line("filament_colour");
optgroup->append_single_option_line("required_nozzle_HRC");
optgroup->append_single_option_line("default_filament_colour");