From fb4cc66f83ae8f44b83bb717721488ccd0341f2b Mon Sep 17 00:00:00 2001 From: supermerill Date: Thu, 13 Jun 2024 10:47:49 +0200 Subject: [PATCH] Update to acceleration: move to object/region & cleaning alongside it. * fix all step invalidation incoherence * rename bridge_internal_* settings to internal_bridge (like orca) * reorder entries when they weren't sorted by alphanumeric order. --- src/libslic3r/Fill/Fill.cpp | 42 ++++-- src/libslic3r/Format/BBConfig.cpp | 2 +- src/libslic3r/GCode.cpp | 18 +-- src/libslic3r/GCode/CoolingBuffer.cpp | 4 +- src/libslic3r/Layer.cpp | 7 +- src/libslic3r/Preset.cpp | 6 +- src/libslic3r/Print.cpp | 83 ++++++------ src/libslic3r/Print.hpp | 2 + src/libslic3r/PrintConfig.cpp | 87 ++++++------ src/libslic3r/PrintConfig.hpp | 45 +++---- src/libslic3r/PrintObject.cpp | 183 ++++++++++++++++---------- src/slic3r/GUI/ConfigManipulation.cpp | 2 +- src/slic3r/GUI/PresetHints.cpp | 8 +- 13 files changed, 276 insertions(+), 213 deletions(-) diff --git a/src/libslic3r/Fill/Fill.cpp b/src/libslic3r/Fill/Fill.cpp index f78bd1103a7..98c82035867 100644 --- a/src/libslic3r/Fill/Fill.cpp +++ b/src/libslic3r/Fill/Fill.cpp @@ -71,13 +71,19 @@ struct SurfaceFillParams : FillParams assert(this->config != nullptr); assert(rhs.config != nullptr); if (config != nullptr && rhs.config != nullptr) { + RETURN_COMPARE_NON_EQUAL(config->infill_acceleration); RETURN_COMPARE_NON_EQUAL(config->infill_speed); + RETURN_COMPARE_NON_EQUAL(config->solid_infill_acceleration); RETURN_COMPARE_NON_EQUAL(config->solid_infill_speed); + RETURN_COMPARE_NON_EQUAL(config->top_solid_infill_acceleration); RETURN_COMPARE_NON_EQUAL(config->top_solid_infill_speed); - RETURN_COMPARE_NON_EQUAL(config->ironing_speed); + RETURN_COMPARE_NON_EQUAL(config->default_acceleration); RETURN_COMPARE_NON_EQUAL(config->default_speed); + RETURN_COMPARE_NON_EQUAL(config->bridge_acceleration); RETURN_COMPARE_NON_EQUAL(config->bridge_speed); - RETURN_COMPARE_NON_EQUAL(config->bridge_speed_internal); + RETURN_COMPARE_NON_EQUAL(config->internal_bridge_acceleration); + RETURN_COMPARE_NON_EQUAL(config->internal_bridge_speed); + RETURN_COMPARE_NON_EQUAL(config->gap_fill_acceleration); RETURN_COMPARE_NON_EQUAL(config->gap_fill_speed); RETURN_COMPARE_NON_EQUAL(config->print_extrusion_multiplier); RETURN_COMPARE_NON_EQUAL(config->region_gcode.value); @@ -93,14 +99,23 @@ struct SurfaceFillParams : FillParams if ((config != nullptr) != (rhs.config != nullptr)) return false; if(config != nullptr && ( - config->infill_speed != rhs.config->infill_speed + config->infill_acceleration != rhs.config->infill_acceleration + || config->infill_speed != rhs.config->infill_speed + || config->solid_infill_acceleration != rhs.config->solid_infill_acceleration || config->solid_infill_speed != rhs.config->solid_infill_speed + || config->top_solid_infill_acceleration != rhs.config->top_solid_infill_acceleration || config->top_solid_infill_speed != rhs.config->top_solid_infill_speed - || config->ironing_speed != rhs.config->ironing_speed + || config->default_acceleration != rhs.config->default_acceleration || config->default_speed != rhs.config->default_speed + || config->bridge_acceleration != rhs.config->bridge_acceleration || config->bridge_speed != rhs.config->bridge_speed - || config->bridge_speed_internal != rhs.config->bridge_speed_internal - || config->gap_fill_speed != rhs.config->gap_fill_speed)) + || config->internal_bridge_acceleration != rhs.config->internal_bridge_acceleration + || config->internal_bridge_speed != rhs.config->internal_bridge_speed + || config->gap_fill_acceleration != rhs.config->gap_fill_acceleration + || config->gap_fill_speed != rhs.config->gap_fill_speed + || config->print_extrusion_multiplier != rhs.config->print_extrusion_multiplier + || config->region_gcode != rhs.config->region_gcode + )) return false; // then check params return this->extruder == rhs.extruder && @@ -786,6 +801,7 @@ void Layer::make_ironing() double line_spacing; // Height of the extrusion, to calculate the extrusion flow from. double height; + double acceleration; double speed; double angle; IroningType type; @@ -807,6 +823,10 @@ void Layer::make_ironing() return true; if (this->height > rhs.height) return false; + if (this->acceleration < rhs.acceleration) + return true; + if (this->acceleration > rhs.acceleration) + return false; if (this->speed < rhs.speed) return true; if (this->speed > rhs.speed) @@ -818,11 +838,12 @@ void Layer::make_ironing() return false; } - bool operator==(const IroningParams &rhs) const { + bool operator==(const IroningParams &rhs) const + { return this->extruder == rhs.extruder && this->just_infill == rhs.just_infill && - this->line_spacing == rhs.line_spacing && this->height == rhs.height && this->speed == rhs.speed && - this->angle == rhs.angle && - this->type == rhs.type; + this->line_spacing == rhs.line_spacing && this->height == rhs.height && + this->acceleration == rhs.acceleration && this->speed == rhs.speed && + this->angle == rhs.angle && this->type == rhs.type; } LayerRegion *layerm = nullptr; @@ -869,6 +890,7 @@ void Layer::make_ironing() ironing_params.just_infill = false; ironing_params.line_spacing = config.ironing_spacing; ironing_params.height = default_layer_height * 0.01 * config.ironing_flowrate; + ironing_params.acceleration = config.ironing_acceleration; ironing_params.speed = config.ironing_speed; if (config.ironing_angle.value >= 0) { ironing_params.angle = float(Geometry::deg2rad(config.ironing_angle.value)); diff --git a/src/libslic3r/Format/BBConfig.cpp b/src/libslic3r/Format/BBConfig.cpp index ffb22ab40e2..78e81ae23a8 100644 --- a/src/libslic3r/Format/BBConfig.cpp +++ b/src/libslic3r/Format/BBConfig.cpp @@ -96,7 +96,7 @@ void init() //key_translation_map["bridge_angle"] = "bridge_angle"; key_translation_map["bridge_density"] = "bridge_overlap_min"; key_translation_map["bridge_no_support"] = "dont_support_bridges"; - key_translation_map["internal_bridge_speed"] = "bridge_speed_internal"; + //key_translation_map["internal_bridge_speed"] = "internal_bridge_speed"; //key_translation_map["brim_ears"] = "brim_ears"; //key_translation_map["brim_ears_detection_length"] = "brim_ears_detection_length"; //key_translation_map["brim_ears_max_angle"] = "brim_ears_max_angle"; diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index b8d7c3ae555..a56dff4dc1b 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -1106,7 +1106,7 @@ namespace DoExport { excluded.insert(erTopSolidInfill); if (config->option("bridge_speed") != nullptr && config->get_computed_value("bridge_speed") != 0) excluded.insert(erBridgeInfill); - if (config->option("bridge_speed_internal") != nullptr && config->get_computed_value("bridge_speed_internal") != 0) + if (config->option("internal_bridge_speed") != nullptr && config->get_computed_value("internal_bridge_speed") != 0) excluded.insert(erInternalBridgeInfill); if (config->option("support_material_speed") != nullptr && config->get_computed_value("support_material_speed") != 0) excluded.insert(erSupportMaterial); @@ -5827,8 +5827,8 @@ double_t GCode::_compute_speed_mm_per_sec(const ExtrusionPath &path, double spee speed = m_config.get_computed_value("bridge_speed"); if(comment) *comment = "bridge_speed"; } else if (path.role() == erInternalBridgeInfill) { - speed = m_config.get_computed_value("bridge_speed_internal"); - if(comment) *comment = "bridge_speed_internal"; + speed = m_config.get_computed_value("internal_bridge_speed"); + if(comment) *comment = "internal_bridge_speed"; } else if (path.role() == erOverhangPerimeter) { speed = m_config.get_computed_value("overhangs_speed"); if(comment) *comment = "overhangs_speed"; @@ -5906,8 +5906,8 @@ double_t GCode::_compute_speed_mm_per_sec(const ExtrusionPath &path, double spee speed = m_config.bridge_speed.get_abs_value(vol_speed); if(comment) *comment = std::string("bridge_speed ") + *comment; } else if (path.role() == erInternalBridgeInfill) { - speed = m_config.bridge_speed_internal.get_abs_value(vol_speed); - if(comment) *comment = std::string("bridge_speed_internal ") + *comment; + speed = m_config.internal_bridge_speed.get_abs_value(vol_speed); + if(comment) *comment = std::string("internal_bridge_speed ") + *comment; } else if (path.role() == erOverhangPerimeter) { speed = m_config.overhangs_speed.get_abs_value(vol_speed); if(comment) *comment = std::string("overhangs_speed ") + *comment; @@ -6150,10 +6150,10 @@ std::string GCode::_before_extrude(const ExtrusionPath &path, const std::string } break; case erInternalBridgeInfill: - if (m_config.bridge_internal_acceleration.value > 0) { - double bridge_internal_acceleration = m_config.get_computed_value("bridge_internal_acceleration"); - if (bridge_internal_acceleration > 0) { - acceleration = bridge_internal_acceleration; + if (m_config.internal_bridge_acceleration.value > 0) { + double internal_bridge_acceleration = m_config.get_computed_value("internal_bridge_acceleration"); + if (internal_bridge_acceleration > 0) { + acceleration = internal_bridge_acceleration; break; } } diff --git a/src/libslic3r/GCode/CoolingBuffer.cpp b/src/libslic3r/GCode/CoolingBuffer.cpp index f366d24d2ff..3d9d48e0893 100644 --- a/src/libslic3r/GCode/CoolingBuffer.cpp +++ b/src/libslic3r/GCode/CoolingBuffer.cpp @@ -902,7 +902,7 @@ std::string CoolingBuffer::apply_layer_cooldown( } //set the fan controls default_fan_speed[ExtrusionRole::erBridgeInfill] = EXTRUDER_CONFIG(bridge_fan_speed); - default_fan_speed[ExtrusionRole::erInternalBridgeInfill] = EXTRUDER_CONFIG(bridge_internal_fan_speed); + default_fan_speed[ExtrusionRole::erInternalBridgeInfill] = EXTRUDER_CONFIG(internal_bridge_fan_speed); default_fan_speed[ExtrusionRole::erTopSolidInfill] = EXTRUDER_CONFIG(top_fan_speed); default_fan_speed[ExtrusionRole::erIroning] = default_fan_speed[ExtrusionRole::erTopSolidInfill]; default_fan_speed[ExtrusionRole::erSupportMaterialInterface] = EXTRUDER_CONFIG(support_material_interface_fan_speed); @@ -984,7 +984,7 @@ std::string CoolingBuffer::apply_layer_cooldown( fan_speeds[ExtrusionRole::erBridgeInfill] = fan_speeds[0]; } - // if bridge_internal_fan is disabled, it takes the value of bridge_fan + // if internal_bridge_fan is disabled, it takes the value of bridge_fan if (!fan_control[ExtrusionRole::erInternalBridgeInfill] && fan_control[ExtrusionRole::erBridgeInfill]) { fan_control[ExtrusionRole::erInternalBridgeInfill] = true; fan_speeds[ExtrusionRole::erInternalBridgeInfill] = fan_speeds[ExtrusionRole::erBridgeInfill]; diff --git a/src/libslic3r/Layer.cpp b/src/libslic3r/Layer.cpp index 2d02c084321..c406ed76e7d 100644 --- a/src/libslic3r/Layer.cpp +++ b/src/libslic3r/Layer.cpp @@ -171,6 +171,7 @@ void Layer::make_perimeters() /// if you don't do that, objects will share the same region, and the same settings. if (config.perimeter_extruder == other_config.perimeter_extruder && config.perimeters == other_config.perimeters + && config.external_perimeter_acceleration == other_config.external_perimeter_acceleration && config.external_perimeter_extrusion_width == other_config.external_perimeter_extrusion_width && config.external_perimeter_overlap == other_config.external_perimeter_overlap && config.external_perimeter_speed == other_config.external_perimeter_speed // it os mandatory? can't this be set at gcode.cpp? @@ -182,6 +183,7 @@ void Layer::make_perimeters() && config.extra_perimeters_overhangs == other_config.extra_perimeters_overhangs && config.gap_fill_enabled == other_config.gap_fill_enabled && ((config.gap_fill_speed == other_config.gap_fill_speed) || !config.gap_fill_enabled) + && config.gap_fill_acceleration == other_config.gap_fill_acceleration && config.gap_fill_last == other_config.gap_fill_last && config.gap_fill_flow_match_perimeter == other_config.gap_fill_flow_match_perimeter && config.gap_fill_extension == other_config.gap_fill_extension @@ -196,10 +198,12 @@ void Layer::make_perimeters() && (this->id() == 0 || config.only_one_perimeter_first_layer == other_config.only_one_perimeter_first_layer) && config.only_one_perimeter_top == other_config.only_one_perimeter_top && config.only_one_perimeter_top_other_algo == other_config.only_one_perimeter_top_other_algo + && config.overhangs_acceleration == other_config.overhangs_acceleration && config.overhangs_width_speed == other_config.overhangs_width_speed && config.overhangs_width == other_config.overhangs_width && config.overhangs_reverse == other_config.overhangs_reverse && config.overhangs_reverse_threshold == other_config.overhangs_reverse_threshold + && config.perimeter_acceleration == other_config.perimeter_acceleration && config.perimeter_extrusion_width == other_config.perimeter_extrusion_width && config.perimeter_loop == other_config.perimeter_loop && config.perimeter_loop_seam == other_config.perimeter_loop_seam @@ -211,11 +215,12 @@ void Layer::make_perimeters() && config.small_perimeter_min_length == other_config.small_perimeter_min_length && config.small_perimeter_max_length == other_config.small_perimeter_max_length && config.thin_walls == other_config.thin_walls + && config.thin_walls_acceleration == other_config.thin_walls_acceleration && config.thin_walls_min_width == other_config.thin_walls_min_width && config.thin_walls_overlap == other_config.thin_walls_overlap + && config.thin_walls_speed == other_config.thin_walls_speed && config.thin_perimeters == other_config.thin_perimeters && config.thin_perimeters_all == other_config.thin_perimeters_all - && config.thin_walls_speed == other_config.thin_walls_speed && config.infill_overlap == other_config.infill_overlap && config.perimeter_loop == other_config.perimeter_loop && config.region_gcode == other_config.region_gcode diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 7fafaaf9250..668257eea6f 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -532,7 +532,7 @@ static std::vector s_Preset_print_options { // speeds "default_speed", "bridge_speed", - "bridge_speed_internal", + "internal_bridge_speed", "brim_speed", "external_perimeter_speed", "first_layer_speed", @@ -568,7 +568,6 @@ static std::vector s_Preset_print_options { "fuzzy_skin_thickness", // acceleration "bridge_acceleration", - "bridge_internal_acceleration", "brim_acceleration", "default_acceleration", "external_perimeter_acceleration", @@ -576,6 +575,7 @@ static std::vector s_Preset_print_options { "first_layer_acceleration_over_raft", "gap_fill_acceleration", "infill_acceleration", + "internal_bridge_acceleration", "ironing_acceleration", "overhangs_acceleration", "perimeter_acceleration", @@ -770,10 +770,10 @@ static std::vector s_Preset_filament_options { "default_fan_speed", "max_fan_speed", "bridge_fan_speed", - "bridge_internal_fan_speed", "external_perimeter_fan_speed", "gap_fill_fan_speed", "infill_fan_speed", + "internal_bridge_fan_speed", "overhangs_fan_speed", "perimeter_fan_speed", "solid_infill_fan_speed", diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 73921321f5d..cbf6f656965 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -61,27 +61,25 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver& /* ne if (opt_keys.empty()) return false; + // Cache the plenty of parameters, which influence the G-code generator only, // or they are only notes not influencing the generated G-code. static std::unordered_set steps_gcode = { + "allow_empty_layers", "avoid_crossing_perimeters", "avoid_crossing_perimeters_max_detour", "avoid_crossing_not_first_layer", - "avoid_crossing_top", "bed_shape", "bed_temperature", "before_layer_gcode", "between_objects_gcode", - "bridge_acceleration", - "bridge_internal_acceleration", "bridge_fan_speed", - "bridge_internal_fan_speed", - "brim_acceleration", "chamber_temperature", + "color_change_gcode", "colorprint_heights", "complete_objects_sort", - "cooling", - "default_acceleration", + "complete_objects_one_brim", + //"cooling", "default_fan_speed", "deretract_speed", "disable_fan_first_layers", @@ -89,8 +87,6 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver& /* ne "enforce_retract_first_layer", "end_gcode", "end_filament_gcode", - "external_perimeter_acceleration", - "external_perimeter_cut_corners", "external_perimeter_fan_speed", "extrusion_axis", "extruder_clearance_height", @@ -105,62 +101,59 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver& /* ne "fan_kickstart", "fan_speedup_overhangs", "fan_speedup_time", + "feature_gcode", "fan_percentage", "fan_printer_min_speed", "filament_colour", "filament_custom_variables", "filament_diameter", "filament_density", + "filament_load_time", "filament_notes", "filament_cost", "filament_spool_weight", - "first_layer_acceleration", - "first_layer_acceleration_over_raft", + "filament_unload_time", + "filament_wipe_advanced_pigment", "first_layer_bed_temperature", - "first_layer_flow_ratio", - "first_layer_speed", // ? delete y prusa here in 2.4 - "first_layer_speed_over_raft", - "first_layer_infill_speed", - "first_layer_min_speed", "full_fan_speed_layer", - "gap_fill_acceleration", "gap_fill_fan_speed", - "gap_fill_flow_match_perimeter", - "gap_fill_speed", "gcode_ascii", "gcode_comments", "gcode_filename_illegal_char", "gcode_label_objects", "gcode_precision_xyz", "gcode_precision_e", - "infill_acceleration", + "gcode_substitutions", "infill_fan_speed", - "ironing_acceleration", + "internal_bridge_fan_speed", "layer_gcode", + "lift_min", "max_fan_speed", "max_gcode_per_second", "max_print_height", "max_print_speed", + "max_speed_reduction", "max_volumetric_speed", "min_length", "min_print_speed", + "milling_diameter", "milling_toolchange_end_gcode", "milling_toolchange_start_gcode", - "milling_offset", - "milling_z_offset", - "milling_z_lift", "max_volumetric_extrusion_rate_slope_positive", "max_volumetric_extrusion_rate_slope_negative", "notes", "only_retract_when_crossing_perimeters", "output_filename_format", - "overhangs_acceleration", "overhangs_fan_speed", - "perimeter_acceleration", + "parallel_objects_step", + "pause_print_gcode", "post_process", - "gcode_substitutions", + "print_custom_variables", + "printer_custom_variables", "perimeter_fan_speed", "printer_notes", + "remaining_times", + "remaining_times_type", "retract_before_travel", "retract_before_wipe", "retract_layer_change", @@ -175,9 +168,9 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver& /* ne "retract_restart_extra", "retract_restart_extra_toolchange", "retract_speed", + "silent_mode", "single_extruder_multi_material_priming", "slowdown_below_layer_time", - "solid_infill_acceleration", "solid_infill_fan_speed", "support_material_acceleration", "support_material_fan_speed", @@ -187,8 +180,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver& /* ne "start_gcode", "start_gcode_manual", "start_filament_gcode", - "thin_walls_acceleration", - "thin_walls_speed", + "template_custom_gcode", "thumbnails", "thumbnails_color", "thumbnails_custom_color", @@ -203,17 +195,16 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver& /* ne "tool_name", "toolchange_gcode", "top_fan_speed", - "top_solid_infill_acceleration", "threads", - "travel_acceleration", - "travel_deceleration_use_target", - "travel_speed", - "travel_speed_z", "use_firmware_retraction", "use_relative_e_distances", "use_volumetric_e", "variable_layer_height", "wipe", + "wipe_advanced", + "wipe_advanced_algo", + "wipe_advanced_multiplier", + "wipe_advanced_nozzle_melted_volume", "wipe_extra_perimeter", "wipe_inside_depth", "wipe_inside_end", @@ -229,6 +220,9 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver& /* ne bool invalidated = false; for (const t_config_option_key &opt_key : opt_keys) { + //this one isn't even use in slicing, only for import. + if (opt_key == "init_z_rotate") + continue; if (steps_gcode.find(opt_key) != steps_gcode.end()) { // These options only affect G-code export or they are just notes without influence on the generated G-code, // so there is nothing to invalidate. @@ -241,10 +235,11 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver& /* ne || opt_key == "min_skirt_length" || opt_key == "ooze_prevention" || opt_key == "skirts" - || opt_key == "skirt_height" || opt_key == "skirt_brim" || opt_key == "skirt_distance" || opt_key == "skirt_distance_from_brim" + || opt_key == "skirt_extrusion_width" + || opt_key == "skirt_height" || opt_key == "wipe_tower_x" || opt_key == "wipe_tower_y" || opt_key == "wipe_tower_rotation_angle" @@ -253,12 +248,9 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver& /* ne } else if ( opt_key == "bridge_precision" || opt_key == "filament_shrink" - || opt_key == "first_layer_height" || opt_key == "nozzle_diameter" - || opt_key == "model_precision" || opt_key == "resolution" || opt_key == "resolution_internal" - || opt_key == "slice_closing_radius" // Spiral Vase forces different kind of slicing than the normal model: // In Spiral Vase mode, holes are closed and only the largest area contour is kept at each layer. // Therefore toggling the Spiral Vase on / off requires complete reslicing. @@ -268,14 +260,13 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver& /* ne } else if ( opt_key == "complete_objects" || opt_key == "filament_type" - || opt_key == "filament_soluble" - || opt_key == "first_layer_temperature" || opt_key == "filament_loading_speed" || opt_key == "filament_loading_speed_start" || opt_key == "filament_unloading_speed" || opt_key == "filament_unloading_speed_start" || opt_key == "filament_toolchange_delay" || opt_key == "filament_cooling_moves" + || opt_key == "filament_max_wipe_tower_speed" || opt_key == "filament_minimal_purge_on_wipe_tower" || opt_key == "filament_cooling_initial_speed" || opt_key == "filament_cooling_final_speed" @@ -293,9 +284,9 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver& /* ne || opt_key == "filament_toolchange_part_fan_speed" || opt_key == "filament_dip_insertion_speed" || opt_key == "filament_dip_extraction_speed" //skinnydip params end + || opt_key == "first_layer_temperature" || opt_key == "gcode_flavor" || opt_key == "high_current_on_filament_swap" - || opt_key == "infill_first" || opt_key == "single_extruder_multi_material" || opt_key == "temperature" || opt_key == "wipe_tower" @@ -303,8 +294,10 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver& /* ne || opt_key == "wipe_tower_brim_width" || opt_key == "wipe_tower_bridging" || opt_key == "wipe_tower_no_sparse_layers" + || opt_key == "wipe_tower_per_color_wipe" || opt_key == "wipe_tower_speed" || opt_key == "wipe_tower_wipe_starting_speed" + || opt_key == "wiping_volumes_extruders" || opt_key == "wiping_volumes_matrix" || opt_key == "parking_pos_retraction" || opt_key == "cooling_tube_retraction" @@ -312,7 +305,6 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver& /* ne || opt_key == "extra_loading_move" || opt_key == "travel_speed" || opt_key == "travel_speed_z" - || opt_key == "first_layer_speed" || opt_key == "z_offset") { steps.emplace_back(psWipeTower); steps.emplace_back(psSkirtBrim); @@ -323,8 +315,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver& /* ne //FIXME Killing supports on any change of "filament_soluble" is rough. We should check for each object whether that is necessary. osteps.emplace_back(posSupportMaterial); } else if ( - opt_key == "first_layer_extrusion_width" - || opt_key == "arc_fitting" + opt_key == "arc_fitting" || opt_key == "arc_fitting_tolerance" || opt_key == "min_layer_height" || opt_key == "max_layer_height" @@ -335,6 +326,8 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver& /* ne osteps.emplace_back(posSimplifyPath); osteps.emplace_back(posSupportMaterial); steps.emplace_back(psSkirtBrim); + } else if (opt_key == "seam_gap" || opt_key == "seam_gap_external") { + osteps.emplace_back(posInfill); } else if (opt_key == "posSlice") osteps.emplace_back(posSlice); diff --git a/src/libslic3r/Print.hpp b/src/libslic3r/Print.hpp index a353f0b8d0f..ba6e9fe0136 100644 --- a/src/libslic3r/Print.hpp +++ b/src/libslic3r/Print.hpp @@ -46,6 +46,7 @@ namespace FillLightning { using GeneratorPtr = std::unique_ptr; }; // namespace FillLightning + // Print step IDs for keeping track of the print state. // The Print steps are applied in this order. enum PrintStep { @@ -59,6 +60,7 @@ enum PrintStep { // should be refreshed. psSlicingFinished = psSkirtBrim, psGCodeExport, + //TODO: psGCodeLoader (for params that are only used for time display and such) psCount, }; diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 8633f4fe5ea..e0a16ddcaf6 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -712,20 +712,6 @@ void PrintConfigDef::init_fff_params() def->mode = comAdvancedE | comPrusa; def->set_default_value(new ConfigOptionFloatOrPercent(0,false)); - def = this->add("bridge_internal_acceleration", coFloatOrPercent); - def->label = L("Internal bridges "); - def->full_label = L("Internal bridges acceleration"); - def->category = OptionCategory::speed; - def->tooltip = L("This is the acceleration your printer will use for internal bridges. " - "\nCan be a % of the default acceleration" - "\nSet zero to use bridge acceleration for internal bridges."); - def->sidetext = L("mm/s² or %"); - def->ratio_over = "bridge_acceleration"; - def->min = 0; - def->max_literal = { -200, false }; - def->mode = comExpert | comSuSi; - def->set_default_value(new ConfigOptionFloatOrPercent(0,false)); - def = this->add("bridge_angle", coFloat); def->label = L("Bridging"); def->full_label = L("Bridging angle"); @@ -751,19 +737,6 @@ void PrintConfigDef::init_fff_params() def->is_vector_extruder = true; def->set_default_value(new ConfigOptionInts{ 100 }); - def = this->add("bridge_internal_fan_speed", coInts); - def->label = L("Infill bridges fan speed"); - def->category = OptionCategory::cooling; - def->tooltip = L("This fan speed is enforced during all infill bridges. It won't slow down the fan if it's currently running at a higher speed." - "\nSet to -1 to disable this override (Internal bridges will use Bridges fan speed)." - "\nCan be disabled by disable_fan_first_layers and increased by low layer time."); - def->sidetext = L("%"); - def->min = -1; - def->max = 100; - def->mode = comAdvancedE | comSuSi; - def->is_vector_extruder = true; - def->set_default_value(new ConfigOptionInts{ -1 }); - def = this->add("bridge_type", coEnum); def->label = L("Bridge flow baseline"); def->category = OptionCategory::width; @@ -865,17 +838,6 @@ void PrintConfigDef::init_fff_params() def->mode = comAdvancedE | comPrusa; def->set_default_value(new ConfigOptionFloatOrPercent(60, true)); - def = this->add("bridge_speed_internal", coFloatOrPercent); - def->label = L("Internal bridges"); - def->full_label = L("Internal bridge speed"); - def->category = OptionCategory::speed; - def->tooltip = L("Speed for printing the bridges that support the top layer.\nCan be a % of the bridge speed."); - def->sidetext = L("mm/s or %"); - def->ratio_over = "bridge_speed"; - def->min = 0; - def->mode = comExpert | comSuSi; - def->set_default_value(new ConfigOptionFloatOrPercent(150,true)); - def = this->add("brim_inside_holes", coBool); def->label = L("Brim inside holes"); def->category = OptionCategory::skirtBrim; @@ -3313,6 +3275,47 @@ void PrintConfigDef::init_fff_params() def->mode = comExpert | comPrusa; def->set_default_value(new ConfigOptionBool(false)); + def = this->add("internal_bridge_acceleration", coFloatOrPercent); + def->label = L("Internal bridges "); + def->full_label = L("Internal bridges acceleration"); + def->category = OptionCategory::speed; + def->tooltip = L("This is the acceleration your printer will use for internal bridges. " + "\nCan be a % of the default acceleration" + "\nSet zero to use bridge acceleration for internal bridges."); + def->sidetext = L("mm/s² or %"); + def->ratio_over = "bridge_acceleration"; + def->min = 0; + def->max_literal = { -200, false }; + def->mode = comExpert | comSuSi; + def->set_default_value(new ConfigOptionFloatOrPercent(0,false)); + def->aliases = { "bridge_internal_acceleration" }; + + def = this->add("internal_bridge_fan_speed", coInts); + def->label = L("Infill bridges fan speed"); + def->category = OptionCategory::cooling; + def->tooltip = L("This fan speed is enforced during all infill bridges. It won't slow down the fan if it's currently running at a higher speed." + "\nSet to -1 to disable this override (Internal bridges will use Bridges fan speed)." + "\nCan be disabled by disable_fan_first_layers and increased by low layer time."); + def->sidetext = L("%"); + def->min = -1; + def->max = 100; + def->mode = comAdvancedE | comSuSi; + def->is_vector_extruder = true; + def->set_default_value(new ConfigOptionInts{ -1 }); + def->aliases = { "bridge_internal_fan_speed" }; + + def = this->add("internal_bridge_speed", coFloatOrPercent); + def->label = L("Internal bridges"); + def->full_label = L("Internal bridge speed"); + def->category = OptionCategory::speed; + def->tooltip = L("Speed for printing the bridges that support the top layer.\nCan be a % of the bridge speed."); + def->sidetext = L("mm/s or %"); + def->ratio_over = "bridge_speed"; + def->min = 0; + def->mode = comExpert | comSuSi; + def->set_default_value(new ConfigOptionFloatOrPercent(150,true)); + def->aliases = { "bridge_speed_internal" }; + def = this->add("mmu_segmented_region_max_width", coFloat); def->label = L("Maximum width of a segmented region"); def->tooltip = L("Maximum width of a segmented region. Zero disables this feature."); @@ -3332,7 +3335,7 @@ void PrintConfigDef::init_fff_params() def = this->add("ironing_acceleration", coFloatOrPercent); def->label = L("Ironing"); def->full_label = L("Ironing acceleration"); - def->category = OptionCategory::speed; + def->category = OptionCategory::ironing; def->tooltip = L("This is the acceleration your printer will use for ironing. " "\nCan be a % of the top solid infill acceleration" "\nSet zero to use top solid infill acceleration for ironing."); @@ -8257,12 +8260,9 @@ std::unordered_set prusa_export_to_remove_keys = { "avoid_crossing_not_first_layer", "avoid_crossing_top", "bridge_fill_pattern", -"bridge_internal_acceleration", -"bridge_internal_fan_speed", "bridge_precision", "bridge_overlap", "bridge_overlap_min", -"bridge_speed_internal", "bridge_type", "bridged_infill_margin", "brim_acceleration", @@ -8369,6 +8369,9 @@ std::unordered_set prusa_export_to_remove_keys = { "infill_extrusion_spacing", "infill_fan_speed", "init_z_rotate", +"internal_bridge_acceleration", +"internal_bridge_fan_speed", +"internal_bridge_speed", "ironing_acceleration", "ironing_angle", "lift_min", diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 6f93e406c30..5cca571ff41 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -706,6 +706,7 @@ protected: \ PRINT_CONFIG_CLASS_DEFINE( PrintObjectConfig, + ((ConfigOptionFloatOrPercent, brim_acceleration)) ((ConfigOptionBool, brim_inside_holes)) ((ConfigOptionFloat, brim_width)) ((ConfigOptionFloat, brim_width_interior)) @@ -725,12 +726,16 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionFloatOrPercent, extrusion_width)) ((ConfigOptionFloatOrPercent, extrusion_spacing)) ((ConfigOptionBool, fill_angle_follow_model)) + ((ConfigOptionFloatOrPercent, first_layer_acceleration)) ((ConfigOptionFloatOrPercent, first_layer_acceleration_over_raft)) ((ConfigOptionFloatOrPercent, first_layer_height)) ((ConfigOptionFloatOrPercent, first_layer_extrusion_width)) ((ConfigOptionFloatOrPercent, first_layer_extrusion_spacing)) + ((ConfigOptionFloatOrPercent, first_layer_infill_speed)) + ((ConfigOptionFloat, first_layer_min_speed)) ((ConfigOptionFloat, first_layer_size_compensation)) /* elefant_foot_compensation */ ((ConfigOptionInt, first_layer_size_compensation_layers)) + ((ConfigOptionFloatOrPercent, first_layer_speed)) ((ConfigOptionFloatOrPercent, first_layer_speed_over_raft)) ((ConfigOptionFloat, hole_size_compensation)) ((ConfigOptionFloat, hole_size_threshold)) @@ -817,6 +822,7 @@ PRINT_CONFIG_CLASS_DEFINE( PrintRegionConfig, ((ConfigOptionBool, avoid_crossing_top)) + ((ConfigOptionFloatOrPercent, bridge_acceleration)) ((ConfigOptionFloat, bridge_angle)) ((ConfigOptionEnum, bridge_fill_pattern)) ((ConfigOptionEnum, bridge_type)) @@ -829,15 +835,16 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionEnum, bottom_fill_pattern)) ((ConfigOptionFloatOrPercent, bridged_infill_margin)) ((ConfigOptionFloatOrPercent, bridge_speed)) - ((ConfigOptionFloatOrPercent, bridge_speed_internal)) ((ConfigOptionFloat, curve_smoothing_precision)) ((ConfigOptionFloat, curve_smoothing_cutoff_dist)) ((ConfigOptionFloat, curve_smoothing_angle_convex)) ((ConfigOptionFloat, curve_smoothing_angle_concave)) + ((ConfigOptionFloatOrPercent, default_acceleration)) ((ConfigOptionFloatOrPercent, default_speed)) ((ConfigOptionBool, ensure_vertical_shell_thickness)) ((ConfigOptionBool, enforce_full_fill_volume)) ((ConfigOptionFloatOrPercent, external_infill_margin)) + ((ConfigOptionFloatOrPercent, external_perimeter_acceleration)) ((ConfigOptionFloatOrPercent, external_perimeter_extrusion_width)) ((ConfigOptionFloatOrPercent, external_perimeter_extrusion_spacing)) ((ConfigOptionFloatOrPercent, external_perimeter_extrusion_change_odd_layers)) @@ -867,6 +874,7 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionPercent, fill_top_flow_ratio)) ((ConfigOptionPercent, fill_smooth_distribution)) ((ConfigOptionFloatOrPercent, fill_smooth_width)) + ((ConfigOptionFloatOrPercent, gap_fill_acceleration)) ((ConfigOptionBool, gap_fill_enabled)) ((ConfigOptionFloatOrPercent, gap_fill_extension)) ((ConfigOptionPercent, gap_fill_flow_match_perimeter)) @@ -882,6 +890,7 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionBool, hole_to_polyhole)) ((ConfigOptionFloatOrPercent, hole_to_polyhole_threshold)) ((ConfigOptionBool, hole_to_polyhole_twisted)) + ((ConfigOptionFloatOrPercent, infill_acceleration)) ((ConfigOptionInt, infill_extruder)) ((ConfigOptionFloatOrPercent, infill_extrusion_width)) ((ConfigOptionFloatOrPercent, infill_extrusion_spacing)) @@ -897,8 +906,11 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionBool, infill_dense)) ((ConfigOptionEnum, infill_dense_algo)) ((ConfigOptionBool, infill_first)) + ((ConfigOptionFloatOrPercent, internal_bridge_acceleration)) + ((ConfigOptionFloatOrPercent, internal_bridge_speed)) // Ironing options ((ConfigOptionBool, ironing)) + ((ConfigOptionFloatOrPercent, ironing_acceleration)) ((ConfigOptionFloat, ironing_angle)) ((ConfigOptionEnum, ironing_type)) ((ConfigOptionPercent, ironing_flowrate)) @@ -911,6 +923,7 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionFloat, milling_speed)) ((ConfigOptionFloatOrPercent, min_width_top_surface)) // Detect bridging perimeters + ((ConfigOptionFloatOrPercent, overhangs_acceleration)) ((ConfigOptionFloatOrPercent, overhangs_max_slope)) ((ConfigOptionFloat, overhangs_bridge_threshold)) ((ConfigOptionInt, overhangs_bridge_upper_layers)) @@ -921,6 +934,7 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionBool, overhangs_reverse)) ((ConfigOptionFloatOrPercent, overhangs_reverse_threshold)) ((ConfigOptionEnum, no_perimeter_unsupported_algo)) + ((ConfigOptionFloatOrPercent, perimeter_acceleration)) ((ConfigOptionBool, perimeter_round_corners)) ((ConfigOptionInt, perimeter_extruder)) ((ConfigOptionFloatOrPercent, perimeter_extrusion_width)) @@ -942,6 +956,7 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionFloatOrPercent, small_perimeter_min_length)) ((ConfigOptionFloatOrPercent, small_perimeter_max_length)) ((ConfigOptionEnum, solid_fill_pattern)) + ((ConfigOptionFloatOrPercent, solid_infill_acceleration)) ((ConfigOptionFloat, solid_infill_below_area)) ((ConfigOptionFloat, solid_infill_below_layer_area)) ((ConfigOptionFloatOrPercent, solid_infill_below_width)) @@ -958,6 +973,7 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionPercent, thin_perimeters)) ((ConfigOptionPercent, thin_perimeters_all)) ((ConfigOptionBool, thin_walls)) + ((ConfigOptionFloatOrPercent, thin_walls_acceleration)) ((ConfigOptionFloatOrPercent, thin_walls_min_width)) ((ConfigOptionFloatOrPercent, thin_walls_overlap)) ((ConfigOptionFloatOrPercent, thin_walls_speed)) @@ -966,10 +982,12 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionFloatOrPercent, top_infill_extrusion_spacing)) ((ConfigOptionInt, top_solid_layers)) ((ConfigOptionFloat, top_solid_min_thickness)) + ((ConfigOptionFloatOrPercent, top_solid_infill_acceleration)) ((ConfigOptionPercent, top_solid_infill_overlap)) ((ConfigOptionFloatOrPercent, top_solid_infill_speed)) + ((ConfigOptionFloatOrPercent, travel_acceleration)) + ((ConfigOptionBool, travel_deceleration_use_target)) ((ConfigOptionBool, wipe_into_infill)) - ) PRINT_CONFIG_CLASS_DEFINE( @@ -1174,12 +1192,8 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE( ((ConfigOptionFloatOrPercent, avoid_crossing_perimeters_max_detour)) ((ConfigOptionPoints, bed_shape)) ((ConfigOptionInts, bed_temperature)) - ((ConfigOptionFloatOrPercent, bridge_acceleration)) - ((ConfigOptionFloatOrPercent, bridge_internal_acceleration)) ((ConfigOptionInts, bridge_fan_speed)) - ((ConfigOptionInts, bridge_internal_fan_speed)) ((ConfigOptionFloatOrPercent, bridge_precision)) - ((ConfigOptionFloatOrPercent, brim_acceleration)) ((ConfigOptionInts, chamber_temperature)) ((ConfigOptionBool, complete_objects)) ((ConfigOptionFloat, parallel_objects_step)) @@ -1188,13 +1202,11 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE( ((ConfigOptionEnum, complete_objects_sort)) ((ConfigOptionFloats, colorprint_heights)) //((ConfigOptionBools, cooling)) - ((ConfigOptionFloatOrPercent, default_acceleration)) ((ConfigOptionInts, disable_fan_first_layers)) ((ConfigOptionInts, default_fan_speed)) ((ConfigOptionEnum, draft_shield)) ((ConfigOptionFloat, duplicate_distance)) ((ConfigOptionBool, enforce_retract_first_layer)) - ((ConfigOptionFloatOrPercent, external_perimeter_acceleration)) ((ConfigOptionInts, external_perimeter_fan_speed)) ((ConfigOptionFloat, extruder_clearance_height)) ((ConfigOptionFloat, extruder_clearance_radius)) @@ -1207,18 +1219,12 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE( ((ConfigOptionStrings, filament_notes)) ((ConfigOptionPercents, filament_max_overlap)) ((ConfigOptionPercents, filament_shrink)) - ((ConfigOptionFloatOrPercent, first_layer_acceleration)) ((ConfigOptionInts, first_layer_bed_temperature)) - ((ConfigOptionFloatOrPercent, first_layer_speed)) - ((ConfigOptionFloatOrPercent, first_layer_infill_speed)) - ((ConfigOptionFloat, first_layer_min_speed)) ((ConfigOptionInts, first_layer_temperature)) ((ConfigOptionInts, full_fan_speed_layer)) - ((ConfigOptionFloatOrPercent, gap_fill_acceleration)) ((ConfigOptionInts, gap_fill_fan_speed)) - ((ConfigOptionFloatOrPercent, infill_acceleration)) ((ConfigOptionInts, infill_fan_speed)) - ((ConfigOptionFloatOrPercent, ironing_acceleration)) + ((ConfigOptionInts, internal_bridge_fan_speed)) ((ConfigOptionFloat, lift_min)) ((ConfigOptionInts, max_fan_speed)) ((ConfigOptionFloatsOrPercents, max_layer_height)) @@ -1227,8 +1233,6 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE( ((ConfigOptionFloats, milling_diameter)) ((ConfigOptionStrings, milling_toolchange_end_gcode)) ((ConfigOptionStrings, milling_toolchange_start_gcode)) - //((ConfigOptionPoints, milling_offset)) - //((ConfigOptionFloats, milling_z_offset)) //((ConfigOptionInts, min_fan_speed)) // now fan_printer_min_speed ((ConfigOptionFloatsOrPercents, min_layer_height)) ((ConfigOptionFloats, min_print_speed)) @@ -1238,9 +1242,7 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE( ((ConfigOptionBool, only_retract_when_crossing_perimeters)) ((ConfigOptionBool, ooze_prevention)) ((ConfigOptionString, output_filename_format)) - ((ConfigOptionFloatOrPercent, overhangs_acceleration)) ((ConfigOptionInts, overhangs_fan_speed)) - ((ConfigOptionFloatOrPercent, perimeter_acceleration)) ((ConfigOptionInts, perimeter_fan_speed)) ((ConfigOptionStrings, post_process)) ((ConfigOptionString, print_custom_variables)) @@ -1262,7 +1264,6 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE( ((ConfigOptionInt, skirts)) ((ConfigOptionFloats, slowdown_below_layer_time)) ((ConfigOptionBool, spiral_vase)) - ((ConfigOptionFloatOrPercent, solid_infill_acceleration)) ((ConfigOptionInts, solid_infill_fan_speed)) ((ConfigOptionInt, standby_temperature_delta)) ((ConfigOptionFloatOrPercent, support_material_acceleration)) @@ -1270,7 +1271,6 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE( ((ConfigOptionFloatOrPercent, support_material_interface_acceleration)) ((ConfigOptionInts, support_material_interface_fan_speed)) ((ConfigOptionInts, temperature)) - ((ConfigOptionFloatOrPercent, thin_walls_acceleration)) ((ConfigOptionInt, threads)) ((ConfigOptionPoints, thumbnails)) ((ConfigOptionString, thumbnails_color)) @@ -1284,9 +1284,6 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE( ((ConfigOptionFloat, time_start_gcode)) ((ConfigOptionFloat, time_toolchange)) ((ConfigOptionInts, top_fan_speed)) - ((ConfigOptionFloatOrPercent, top_solid_infill_acceleration)) - ((ConfigOptionFloatOrPercent, travel_acceleration)) - ((ConfigOptionBool, travel_deceleration_use_target)) ((ConfigOptionBools, wipe)) ((ConfigOptionBool, wipe_tower)) ((ConfigOptionFloatOrPercent, wipe_tower_brim_width)) diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 300b5d30e5b..c029b894982 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -706,7 +706,7 @@ FillLightning::GeneratorPtr PrintObject::prepare_lightning_infill_data() // Called by Print::apply(). // This method only accepts PrintObjectConfig and PrintRegionConfig option keys. -bool PrintObject::invalidate_state_by_config_options( + bool PrintObject::invalidate_state_by_config_options( const ConfigOptionResolver &old_config, const ConfigOptionResolver &new_config, const std::vector &opt_keys) { if (opt_keys.empty()) @@ -716,13 +716,13 @@ bool PrintObject::invalidate_state_by_config_options( bool invalidated = false; for (const t_config_option_key& opt_key : opt_keys) { if ( - opt_key == "gap_fill_enabled" - || opt_key == "gap_fill_extension" + opt_key == "gap_fill_extension" || opt_key == "gap_fill_last" || opt_key == "gap_fill_max_width" || opt_key == "gap_fill_min_area" || opt_key == "gap_fill_min_length" || opt_key == "gap_fill_min_width" + || opt_key == "min_width_top_surface" || opt_key == "only_one_perimeter_first_layer" || opt_key == "only_one_perimeter_top" || opt_key == "only_one_perimeter_top_other_algo" @@ -731,22 +731,21 @@ bool PrintObject::invalidate_state_by_config_options( || opt_key == "overhangs_reverse" || opt_key == "overhangs_reverse_threshold" || opt_key == "overhangs_speed_enforce" + || opt_key == "perimeter_bonding" || opt_key == "perimeter_extrusion_change_odd_layers" || opt_key == "perimeter_extrusion_spacing" || opt_key == "perimeter_extrusion_width" || opt_key == "perimeter_reverse" - || opt_key == "infill_overlap" + || opt_key == "perimeter_round_corners" || opt_key == "thin_perimeters" || opt_key == "thin_perimeters_all" - || opt_key == "thin_walls" + || opt_key == "thin_walls_merge" || opt_key == "thin_walls_min_width" || opt_key == "thin_walls_overlap" || opt_key == "external_perimeters_first" || opt_key == "external_perimeters_hole" || opt_key == "external_perimeters_nothole" || opt_key == "external_perimeter_extrusion_change_odd_layers" - || opt_key == "external_perimeter_extrusion_spacing" - || opt_key == "external_perimeter_extrusion_width" || opt_key == "external_perimeters_vase" || opt_key == "perimeter_loop" || opt_key == "perimeter_loop_seam") { @@ -773,34 +772,49 @@ bool PrintObject::invalidate_state_by_config_options( steps.emplace_back(posSlice); steps.emplace_back(posPerimeters); } else if ( - opt_key == "layer_height" - || opt_key == "first_layer_height" - || opt_key == "mmu_segmented_region_max_width" // || opt_key == "exact_last_layer_height" - || opt_key == "raft_contact_distance" - || opt_key == "raft_interface_layer_height" - || opt_key == "raft_layers" - || opt_key == "raft_layer_height" + opt_key == "bridge_type" || opt_key == "clip_multipart_objects" + || opt_key == "curve_smoothing_angle_concave" + || opt_key == "curve_smoothing_angle_convex" + || opt_key == "curve_smoothing_cutoff_dist" + || opt_key == "curve_smoothing_precision" + || opt_key == "dont_support_bridges" + || opt_key == "elephant_foot_min_width" //sla ? || opt_key == "first_layer_size_compensation" || opt_key == "first_layer_size_compensation_layers" - || opt_key == "elephant_foot_min_width" - || opt_key == "dont_support_bridges" + || opt_key == "first_layer_height" + || opt_key == "hole_size_compensation" + || opt_key == "hole_size_threshold" + || opt_key == "hole_to_polyhole" + || opt_key == "hole_to_polyhole_threshold" + || opt_key == "hole_to_polyhole_twisted" + || opt_key == "layer_height" + || opt_key == "min_bead_width" + || opt_key == "min_feature_size" + || opt_key == "mmu_segmented_region_max_width" + || opt_key == "model_precision" || opt_key == "overhangs_max_slope" || opt_key == "overhangs_bridge_threshold" || opt_key == "overhangs_bridge_upper_layers" + || opt_key == "raft_contact_distance" + || opt_key == "raft_interface_layer_height" + || opt_key == "raft_layers" + || opt_key == "raft_layer_height" + || opt_key == "perimeter_generator" || opt_key == "slice_closing_radius" || opt_key == "slicing_mode" || opt_key == "support_material_contact_distance_type" - || opt_key == "support_material_contact_distance_top" - || opt_key == "support_material_contact_distance_bottom" + || opt_key == "support_material_contact_distance" + || opt_key == "support_material_bottom_contact_distance" || opt_key == "support_material_interface_layer_height" || opt_key == "support_material_layer_height" - || opt_key == "xy_size_compensation" - || opt_key == "hole_size_compensation" - || opt_key == "hole_size_threshold" - || opt_key == "hole_to_polyhole" - || opt_key == "hole_to_polyhole_threshold") { + || opt_key == "wall_transition_length" + || opt_key == "wall_transition_filter_deviation" + || opt_key == "wall_transition_angle" + || opt_key == "wall_distribution_count" + || opt_key == "xy_inner_size_compensation" + || opt_key == "xy_size_compensation") { steps.emplace_back(posSlice); } else if (opt_key == "support_material") { steps.emplace_back(posSupportMaterial); @@ -822,17 +836,15 @@ bool PrintObject::invalidate_state_by_config_options( || opt_key == "support_material_enforce_layers" || opt_key == "support_material_extruder" || opt_key == "support_material_extrusion_width" - || opt_key == "support_material_bottom_contact_distance" || opt_key == "support_material_interface_layers" || opt_key == "support_material_bottom_interface_layers" || opt_key == "support_material_interface_angle" || opt_key == "support_material_interface_angle_increment" - || opt_key == "support_material_interface_pattern" || opt_key == "support_material_interface_contact_loops" || opt_key == "support_material_interface_extruder" + || opt_key == "support_material_interface_pattern" || opt_key == "support_material_interface_spacing" || opt_key == "support_material_pattern" - || opt_key == "support_material_interface_pattern" || opt_key == "support_material_style" || opt_key == "support_material_xy_spacing" || opt_key == "support_material_spacing" @@ -843,8 +855,7 @@ bool PrintObject::invalidate_state_by_config_options( steps.emplace_back(posSupportMaterial); } else if (opt_key == "bottom_solid_layers") { steps.emplace_back(posPrepareInfill); - if (m_print->config().spiral_vase - || opt_key == "z_step") { + if (m_print->config().spiral_vase) { // Changing the number of bottom layers when a spiral vase is enabled requires re-slicing the object again. // Otherwise, holes in the bottom layers could be filled, as is reported in GH #5528. steps.emplace_back(posSlice); @@ -860,9 +871,10 @@ bool PrintObject::invalidate_state_by_config_options( || opt_key == "infill_every_layers" || opt_key == "infill_dense" || opt_key == "infill_dense_algo" - || opt_key == "infill_not_connected" || opt_key == "infill_only_where_needed" + || opt_key == "ironing" || opt_key == "ironing_type" + || opt_key == "over_bridge_flow_ratio" || opt_key == "solid_infill_below_area" || opt_key == "solid_infill_below_layer_area" || opt_key == "solid_infill_below_width" @@ -873,10 +885,10 @@ bool PrintObject::invalidate_state_by_config_options( || opt_key == "top_solid_min_thickness") { steps.emplace_back(posPrepareInfill); } else if ( - opt_key == "top_fill_pattern" - || opt_key == "bottom_fill_pattern" + opt_key == "bottom_fill_pattern" || opt_key == "bridge_fill_pattern" - || opt_key == "solid_fill_pattern" + || opt_key == "bridge_overlap" + || opt_key == "bridge_overlap_min" || opt_key == "enforce_full_fill_volume" || opt_key == "fill_aligned_z" || opt_key == "fill_angle" @@ -894,17 +906,20 @@ bool PrintObject::invalidate_state_by_config_options( || opt_key == "infill_connection_bridge" || opt_key == "infill_connection_solid" || opt_key == "infill_connection_top" - || opt_key == "seam_gap" - || opt_key == "seam_gap_external" + || opt_key == "ironing_angle" + || opt_key == "ironing_flowrate" + || opt_key == "ironing_spacing" + || opt_key == "solid_fill_pattern" + || opt_key == "top_fill_pattern" || opt_key == "top_infill_extrusion_spacing" || opt_key == "top_infill_extrusion_width" ) { steps.emplace_back(posInfill); - } else if (opt_key == "fill_pattern") { - steps.emplace_back(posInfill); + } else if (opt_key == "fill_pattern") { + steps.emplace_back(posInfill); - const auto *old_fill_pattern = old_config.option>(opt_key); - const auto *new_fill_pattern = new_config.option>(opt_key); - assert(old_fill_pattern && new_fill_pattern); + const auto *old_fill_pattern = old_config.option>(opt_key); + const auto *new_fill_pattern = new_config.option>(opt_key); + assert(old_fill_pattern && new_fill_pattern); // We need to recalculate infill surfaces when infill_only_where_needed is enabled, and we are switching from // the Lightning infill to another infill or vice versa. if (m_config.infill_only_where_needed && (new_fill_pattern->value == ipLightning || old_fill_pattern->value == ipLightning)) @@ -926,37 +941,35 @@ bool PrintObject::invalidate_state_by_config_options( || opt_key == "bridged_infill_margin" || opt_key == "extra_perimeters" || opt_key == "extra_perimeters_odd_layers" + || opt_key == "extra_perimeters_overhangs" || opt_key == "external_infill_margin" || opt_key == "external_perimeter_overlap" || opt_key == "gap_fill_overlap" + || opt_key == "infill_overlap" || opt_key == "no_perimeter_unsupported_algo" - || opt_key == "filament_max_overlap" || opt_key == "perimeters" || opt_key == "perimeters_hole" || opt_key == "perimeter_overlap" || opt_key == "solid_infill_extrusion_change_odd_layers" || opt_key == "solid_infill_extrusion_spacing" - || opt_key == "solid_infill_extrusion_width") { + || opt_key == "solid_infill_extrusion_width" + || opt_key == "solid_infill_overlap" + || opt_key == "top_solid_infill_overlap") { steps.emplace_back(posPerimeters); steps.emplace_back(posPrepareInfill); - } else if (opt_key == "solid_infill_extrusion_change_odd_layers" - || opt_key == "solid_infill_extrusion_spacing" - || opt_key == "solid_infill_extrusion_width") { - // This value is used for calculating perimeter - infill overlap, thus perimeters need to be recalculated. - steps.emplace_back(posPerimeters); - steps.emplace_back(posPrepareInfill); } else if ( - opt_key == "external_perimeter_extrusion_width" - || opt_key == "perimeter_extruder" - || opt_key == "fuzzy_skin" - || opt_key == "fuzzy_skin_thickness" - || opt_key == "fuzzy_skin_point_dist" - || opt_key == "overhangs" - || opt_key == "thin_walls" - || opt_key == "thick_bridges") { + opt_key == "external_perimeter_extrusion_width" + || opt_key == "external_perimeter_extrusion_spacing" + || opt_key == "perimeter_extruder" + || opt_key == "fuzzy_skin" + || opt_key == "fuzzy_skin_thickness" + || opt_key == "fuzzy_skin_point_dist" + || opt_key == "thin_walls") { steps.emplace_back(posPerimeters); steps.emplace_back(posSupportMaterial); } else if (opt_key == "bridge_flow_ratio" + || opt_key == "extrusion_spacing" + || opt_key == "extrusion_width" || opt_key == "first_layer_extrusion_spacing" || opt_key == "first_layer_extrusion_width") { //if (m_config.support_material_contact_distance > 0.) { @@ -966,30 +979,51 @@ bool PrintObject::invalidate_state_by_config_options( steps.emplace_back(posInfill); steps.emplace_back(posSupportMaterial); //} - } else if ( - opt_key == "perimeter_generator" - || opt_key == "wall_transition_length" - || opt_key == "wall_transition_filter_deviation" - || opt_key == "wall_transition_angle" - || opt_key == "wall_distribution_count" - || opt_key == "min_feature_size" - || opt_key == "min_bead_width") { - steps.emplace_back(posSlice); } else if ( opt_key == "avoid_crossing_top" + || opt_key == "bridge_acceleration" || opt_key == "bridge_speed" - || opt_key == "bridge_speed_internal" + || opt_key == "brim_acceleration" + || opt_key == "brim_speed" || opt_key == "external_perimeter_speed" - || opt_key == "external_perimeters_vase" + || opt_key == "default_acceleration" + || opt_key == "default_speed" + || opt_key == "external_perimeter_acceleration" + || opt_key == "external_perimeter_cut_corners" + || opt_key == "first_layer_acceleration" + || opt_key == "first_layer_acceleration_over_raft" + || opt_key == "first_layer_flow_ratio" + || opt_key == "first_layer_infill_speed" + || opt_key == "first_layer_min_speed" + || opt_key == "first_layer_speed" + || opt_key == "first_layer_speed_over_raft" + || opt_key == "gap_fill_acceleration" + || opt_key == "gap_fill_flow_match_perimeter" || opt_key == "gap_fill_speed" + || opt_key == "infill_acceleration" || opt_key == "infill_speed" + || opt_key == "internal_bridge_acceleration" + || opt_key == "internal_bridge_speed" + || opt_key == "ironing_acceleration" + || opt_key == "ironing_speed" + || opt_key == "milling_after_z" + || opt_key == "milling_extra_size" + || opt_key == "milling_post_process" + || opt_key == "milling_speed" || opt_key == "object_gcode" + || opt_key == "overhangs_acceleration" || opt_key == "overhangs_speed" + || opt_key == "perimeter_acceleration" || opt_key == "perimeter_speed" + || opt_key == "print_extrusion_multiplier" + || opt_key == "print_first_layer_temperature" + || opt_key == "print_retract_length" + || opt_key == "print_retract_lift" + || opt_key == "print_temperature" || opt_key == "region_gcode" || opt_key == "seam_position" - || opt_key == "seam_preferred_direction" - || opt_key == "seam_preferred_direction_jitter" + //|| opt_key == "seam_preferred_direction" + //|| opt_key == "seam_preferred_direction_jitter" || opt_key == "seam_angle_cost" || opt_key == "seam_notch_all" || opt_key == "seam_notch_angle" @@ -1000,14 +1034,20 @@ bool PrintObject::invalidate_state_by_config_options( || opt_key == "small_perimeter_speed" || opt_key == "small_perimeter_min_length" || opt_key == "small_perimeter_max_length" + || opt_key == "solid_infill_acceleration" || opt_key == "solid_infill_speed" || opt_key == "support_material_interface_speed" || opt_key == "support_material_speed" + || opt_key == "thin_walls_acceleration" || opt_key == "thin_walls_speed" - || opt_key == "top_solid_infill_speed") { + || opt_key == "top_solid_infill_acceleration" + || opt_key == "top_solid_infill_speed" + || opt_key == "travel_acceleration" + || opt_key == "travel_deceleration_use_target") { invalidated |= m_print->invalidate_step(psGCodeExport); } else if ( - opt_key == "wipe_into_infill" + opt_key == "infill_first" + || opt_key == "wipe_into_infill" || opt_key == "wipe_into_objects") { invalidated |= m_print->invalidate_step(psWipeTower); invalidated |= m_print->invalidate_step(psGCodeExport); @@ -1018,7 +1058,8 @@ bool PrintObject::invalidate_state_by_config_options( || opt_key == "brim_ears_max_angle" || opt_key == "brim_ears_pattern" || opt_key == "brim_per_object" - || opt_key == "brim_separation") { + || opt_key == "brim_separation" + || opt_key == "brim_type") { invalidated |= m_print->invalidate_step(psSkirtBrim); // Brim is printed below supports, support invalidates brim and skirt. steps.emplace_back(posSupportMaterial); diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index b5a95645540..e5d7d5273ad 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -579,7 +579,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig* config) toggle_field("support_material_acceleration", have_default_acceleration && (have_support_material || have_brim || have_skirt)); toggle_field("support_material_interface_acceleration", have_default_acceleration && have_support_material && have_support_interface); toggle_field("brim_acceleration", have_default_acceleration && (have_brim || have_skirt)); - for (auto el : { "bridge_acceleration", "bridge_internal_acceleration", "overhangs_acceleration", "gap_fill_acceleration", "travel_acceleration", "travel_deceleration_use_target", "first_layer_acceleration" }) + for (auto el : { "bridge_acceleration", "internal_bridge_acceleration", "overhangs_acceleration", "gap_fill_acceleration", "travel_acceleration", "travel_deceleration_use_target", "first_layer_acceleration" }) toggle_field(el, have_default_acceleration); // for default speed, it needs at least a dependent field with a % diff --git a/src/slic3r/GUI/PresetHints.cpp b/src/slic3r/GUI/PresetHints.cpp index 305e7b642a5..2b2937bbf90 100644 --- a/src/slic3r/GUI/PresetHints.cpp +++ b/src/slic3r/GUI/PresetHints.cpp @@ -108,7 +108,7 @@ std::string PresetHints::cooling_description(const Preset &preset_fil, const Pre const int support_fan_speed = preset_fil.config.opt_int("support_material_fan_speed", 0) == 1 ? 0 : preset_fil.config.get_int("support_material_fan_speed"); const int supp_inter_fan_speed = preset_fil.config.opt_int("support_material_interface_fan_speed", 0) == 1 ? 0 : preset_fil.config.get_int("support_material_interface_fan_speed"); const int bridge_fan_speed = preset_fil.config.opt_int("bridge_fan_speed", 0) == 1 ? 0 : preset_fil.config.get_int("bridge_fan_speed"); - const int bridge_internal_fan_speed = preset_fil.config.opt_int("bridge_internal_fan_speed", 0) == 1 ? 0 : preset_fil.config.get_int("bridge_internal_fan_speed"); + const int internal_bridge_fan_speed = preset_fil.config.opt_int("internal_bridge_fan_speed", 0) == 1 ? 0 : preset_fil.config.get_int("internal_bridge_fan_speed"); const int overhangs_fan_speed = preset_fil.config.opt_int("overhangs_fan_speed", 0) == 1 ? 0 : preset_fil.config.get_int("overhangs_fan_speed"); const int gap_fill_fan_speed = preset_fil.config.opt_int("gap_fill_fan_speed", 0) == 1 ? 0 : preset_fil.config.get_int("gap_fill_fan_speed"); const int disable_fan_first_layers = preset_fil.config.opt_int("disable_fan_first_layers", 0); @@ -133,7 +133,7 @@ std::string PresetHints::cooling_description(const Preset &preset_fil, const Pre format_simple_fan_min_speed(out, min_fan_speed, default_fan_speed, _L("Solid surfaces"), solid_fan_speed); format_simple_fan_speed(out, min_fan_speed, default_fan_speed, _L("Top surfaces"), top_fan_speed); format_double_fan_min_speed(out, min_fan_speed, default_fan_speed, _L("Supports"), support_fan_speed, _L("Support interfaces"), supp_inter_fan_speed); - format_double_fan_speed(out, min_fan_speed, default_fan_speed, _L("Bridges"), bridge_fan_speed, _L("Internal bridges"), bridge_internal_fan_speed); + format_double_fan_speed(out, min_fan_speed, default_fan_speed, _L("Bridges"), bridge_fan_speed, _L("Internal bridges"), internal_bridge_fan_speed); format_simple_fan_min_speed(out, min_fan_speed, default_fan_speed, _L("Perimeter overhangs"), overhangs_fan_speed); format_simple_fan_min_speed(out, min_fan_speed, default_fan_speed, _L("Gap fills"), gap_fill_fan_speed); @@ -160,7 +160,7 @@ std::string PresetHints::cooling_description(const Preset &preset_fil, const Pre surface_list += ","; surface_list += _L("Bridges"); } - if (bridge_internal_fan_speed > 0) { + if (internal_bridge_fan_speed > 0) { surface_list += ","; surface_list += _L("Internal bridges"); } @@ -243,7 +243,7 @@ std::string PresetHints::cooling_description(const Preset &preset_fil, const Pre out += "\n\n" + _L("! 1 for the External perimeters fan speed is Deprecated, please set it to 0 to stop the fan!"); if (preset_fil.config.opt_int("bridge_fan_speed", 0) == 1) out += "\n\n" + _L("! 1 for the Bridge fan speed is Deprecated, please set it to 0 to stop the fan!"); - if (preset_fil.config.opt_int("bridge_internal_fan_speed", 0) == 1) + if (preset_fil.config.opt_int("internal_bridge_fan_speed", 0) == 1) out += "\n\n" + _L("! 1 for the Infill bridge fan speed is Deprecated, please set it to 0 to stop the fan!"); return out.ToStdString();