diff --git a/src/libslic3r/ContourZ.cpp b/src/libslic3r/ContourZ.cpp index 27efe25f08..49c6cd5d68 100644 --- a/src/libslic3r/ContourZ.cpp +++ b/src/libslic3r/ContourZ.cpp @@ -32,11 +32,7 @@ static double slope_from_normal(const Eigen::Vector3d& normal) static bool contour_extrusion_path(LayerRegion *region, const sla::IndexedMesh &mesh, ExtrusionPath &path) { - if (region->region().config().zaa_region_disable) { - return false; - } - - if (path.role() != erTopSolidInfill && path.role() != erIroning && path.role() != erExternalPerimeter && path.role() != erPerimeter) { + if (path.role() != erTopSolidInfill && path.role() != erIroning && path.role() != erExternalPerimeter && path.role() != erPerimeter) { return false; } @@ -227,6 +223,9 @@ static void handle_extrusion_collection(LayerRegion *region, const sla::IndexedM void Layer::make_contour_z(const sla::IndexedMesh &mesh) { for (LayerRegion *region : this->regions()) { + if (!region->region().config().zaa_enabled) + continue; + handle_extrusion_collection(region, mesh, region->fills, {erTopSolidInfill, erIroning, erPerimeter, erExternalPerimeter, erMixed}); handle_extrusion_collection(region, mesh, region->perimeters, {erPerimeter, erExternalPerimeter, erMixed}); } diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index a90f7953a2..d448e0839f 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -887,76 +887,344 @@ bool Preset::has_cali_lines(PresetBundle* preset_bundle) return false; } -static std::vector s_Preset_print_options { - "layer_height", "initial_layer_print_height", "wall_loops", "alternate_extra_wall", "slice_closing_radius", "spiral_mode", "spiral_mode_smooth", "spiral_mode_max_xy_smoothing", "spiral_starting_flow_ratio", "spiral_finishing_flow_ratio", "slicing_mode", - "top_shell_layers", "top_shell_thickness", "top_surface_density", "bottom_surface_density", "bottom_shell_layers", "bottom_shell_thickness", - "extra_perimeters_on_overhangs", "ensure_vertical_shell_thickness", "reduce_crossing_wall", "detect_thin_wall", "detect_overhang_wall", "overhang_reverse", "overhang_reverse_threshold","overhang_reverse_internal_only", "wall_direction", - "seam_position", "staggered_inner_seams", "wall_sequence", "is_infill_first", "sparse_infill_density","fill_multiline", "sparse_infill_pattern", "lateral_lattice_angle_1", "lateral_lattice_angle_2", "infill_overhang_angle", "top_surface_pattern", "bottom_surface_pattern", - "infill_direction", "solid_infill_direction", "counterbore_hole_bridging","infill_shift_step", "sparse_infill_rotate_template", "solid_infill_rotate_template", "symmetric_infill_y_axis","skeleton_infill_density", "infill_lock_depth", "skin_infill_depth", "skin_infill_density", - "align_infill_direction_to_model", "extra_solid_infills", - "minimum_sparse_infill_area", "reduce_infill_retraction","internal_solid_infill_pattern","gap_fill_target", - "ironing_type", "ironing_pattern", "ironing_flow", "ironing_speed", "ironing_spacing", "ironing_angle", "ironing_angle_fixed", "ironing_inset", - "support_ironing", "support_ironing_pattern", "support_ironing_flow", "support_ironing_spacing", +static std::vector s_Preset_print_options{ + "layer_height", + "initial_layer_print_height", + "wall_loops", + "alternate_extra_wall", + "slice_closing_radius", + "spiral_mode", + "spiral_mode_smooth", + "spiral_mode_max_xy_smoothing", + "spiral_starting_flow_ratio", + "spiral_finishing_flow_ratio", + "slicing_mode", + "top_shell_layers", + "top_shell_thickness", + "top_surface_density", + "bottom_surface_density", + "bottom_shell_layers", + "bottom_shell_thickness", + "extra_perimeters_on_overhangs", + "ensure_vertical_shell_thickness", + "reduce_crossing_wall", + "detect_thin_wall", + "detect_overhang_wall", + "overhang_reverse", + "overhang_reverse_threshold", + "overhang_reverse_internal_only", + "wall_direction", + "seam_position", + "staggered_inner_seams", + "wall_sequence", + "is_infill_first", + "sparse_infill_density", + "fill_multiline", + "sparse_infill_pattern", + "lateral_lattice_angle_1", + "lateral_lattice_angle_2", + "infill_overhang_angle", + "top_surface_pattern", + "bottom_surface_pattern", + "infill_direction", + "solid_infill_direction", + "counterbore_hole_bridging", + "infill_shift_step", + "sparse_infill_rotate_template", + "solid_infill_rotate_template", + "symmetric_infill_y_axis", + "skeleton_infill_density", + "infill_lock_depth", + "skin_infill_depth", + "skin_infill_density", + "align_infill_direction_to_model", + "extra_solid_infills", + "minimum_sparse_infill_area", + "reduce_infill_retraction", + "internal_solid_infill_pattern", + "gap_fill_target", + "ironing_type", + "ironing_pattern", + "ironing_flow", + "ironing_speed", + "ironing_spacing", + "ironing_angle", + "ironing_angle_fixed", + "ironing_inset", + "support_ironing", + "support_ironing_pattern", + "support_ironing_flow", + "support_ironing_spacing", "max_travel_detour_distance", - "fuzzy_skin", "fuzzy_skin_thickness", "fuzzy_skin_point_distance", "fuzzy_skin_first_layer", "fuzzy_skin_noise_type", "fuzzy_skin_mode", "fuzzy_skin_scale", "fuzzy_skin_octaves", "fuzzy_skin_persistence", - "max_volumetric_extrusion_rate_slope", "max_volumetric_extrusion_rate_slope_segment_length","extrusion_rate_smoothing_external_perimeter_only", - "inner_wall_speed", "outer_wall_speed", "sparse_infill_speed", "internal_solid_infill_speed", - "top_surface_speed", "support_speed", "support_object_xy_distance", "support_object_first_layer_gap", "support_interface_speed", - "bridge_speed", "internal_bridge_speed", "gap_infill_speed", "travel_speed", "travel_speed_z", "initial_layer_speed", - "outer_wall_acceleration", "initial_layer_acceleration", "top_surface_acceleration", "default_acceleration", "skirt_type", "skirt_loops", "skirt_speed","min_skirt_length", "skirt_distance", "skirt_start_angle", "skirt_height","single_loop_draft_shield", "draft_shield", - "brim_width", "brim_object_gap", "brim_use_efc_outline", "brim_type", "brim_ears_max_angle", "brim_ears_detection_length", "enable_support", "support_type", "support_threshold_angle", "support_threshold_overlap","enforce_support_layers", - "raft_layers", "raft_first_layer_density", "raft_first_layer_expansion", "raft_contact_distance", "raft_expansion", - "support_base_pattern", "support_base_pattern_spacing", "support_expansion", "support_style", + "fuzzy_skin", + "fuzzy_skin_thickness", + "fuzzy_skin_point_distance", + "fuzzy_skin_first_layer", + "fuzzy_skin_noise_type", + "fuzzy_skin_mode", + "fuzzy_skin_scale", + "fuzzy_skin_octaves", + "fuzzy_skin_persistence", + "max_volumetric_extrusion_rate_slope", + "max_volumetric_extrusion_rate_slope_segment_length", + "extrusion_rate_smoothing_external_perimeter_only", + "inner_wall_speed", + "outer_wall_speed", + "sparse_infill_speed", + "internal_solid_infill_speed", + "top_surface_speed", + "support_speed", + "support_object_xy_distance", + "support_object_first_layer_gap", + "support_interface_speed", + "bridge_speed", + "internal_bridge_speed", + "gap_infill_speed", + "travel_speed", + "travel_speed_z", + "initial_layer_speed", + "outer_wall_acceleration", + "initial_layer_acceleration", + "top_surface_acceleration", + "default_acceleration", + "skirt_type", + "skirt_loops", + "skirt_speed", + "min_skirt_length", + "skirt_distance", + "skirt_start_angle", + "skirt_height", + "single_loop_draft_shield", + "draft_shield", + "brim_width", + "brim_object_gap", + "brim_use_efc_outline", + "brim_type", + "brim_ears_max_angle", + "brim_ears_detection_length", + "enable_support", + "support_type", + "support_threshold_angle", + "support_threshold_overlap", + "enforce_support_layers", + "raft_layers", + "raft_first_layer_density", + "raft_first_layer_expansion", + "raft_contact_distance", + "raft_expansion", + "support_base_pattern", + "support_base_pattern_spacing", + "support_expansion", + "support_style", // BBS - "print_extruder_id", "print_extruder_variant", + "print_extruder_id", + "print_extruder_variant", "independent_support_layer_height", - "support_angle", "support_interface_top_layers", "support_interface_bottom_layers", - "support_interface_pattern", "support_interface_spacing", "support_interface_loop_pattern", - "support_top_z_distance", "support_on_build_plate_only","support_critical_regions_only", "bridge_no_support", "thick_bridges", "thick_internal_bridges","dont_filter_internal_bridges","enable_extra_bridge_layer", "max_bridge_length", "print_sequence", "print_order", "support_remove_small_overhang", - "filename_format", "wall_filament", "support_bottom_z_distance", - "sparse_infill_filament", "solid_infill_filament", "support_filament", "support_interface_filament","support_interface_not_for_body", - "ooze_prevention", "standby_temperature_delta", "preheat_time","preheat_steps", "interface_shells", "line_width", "initial_layer_line_width", "inner_wall_line_width", - "outer_wall_line_width", "sparse_infill_line_width", "internal_solid_infill_line_width", - "skin_infill_line_width","skeleton_infill_line_width", - "top_surface_line_width", "support_line_width", "infill_wall_overlap","top_bottom_infill_wall_overlap", "bridge_flow", "internal_bridge_flow", - "elefant_foot_compensation", "elefant_foot_compensation_layers", "xy_contour_compensation", "xy_hole_compensation", "resolution", "enable_prime_tower", "prime_tower_enable_framework", - "prime_tower_width", "prime_tower_brim_width", "prime_tower_skip_points", "prime_volume", + "support_angle", + "support_interface_top_layers", + "support_interface_bottom_layers", + "support_interface_pattern", + "support_interface_spacing", + "support_interface_loop_pattern", + "support_top_z_distance", + "support_on_build_plate_only", + "support_critical_regions_only", + "bridge_no_support", + "thick_bridges", + "thick_internal_bridges", + "dont_filter_internal_bridges", + "enable_extra_bridge_layer", + "max_bridge_length", + "print_sequence", + "print_order", + "support_remove_small_overhang", + "filename_format", + "wall_filament", + "support_bottom_z_distance", + "sparse_infill_filament", + "solid_infill_filament", + "support_filament", + "support_interface_filament", + "support_interface_not_for_body", + "ooze_prevention", + "standby_temperature_delta", + "preheat_time", + "preheat_steps", + "interface_shells", + "line_width", + "initial_layer_line_width", + "inner_wall_line_width", + "outer_wall_line_width", + "sparse_infill_line_width", + "internal_solid_infill_line_width", + "skin_infill_line_width", + "skeleton_infill_line_width", + "top_surface_line_width", + "support_line_width", + "infill_wall_overlap", + "top_bottom_infill_wall_overlap", + "bridge_flow", + "internal_bridge_flow", + "elefant_foot_compensation", + "elefant_foot_compensation_layers", + "xy_contour_compensation", + "xy_hole_compensation", + "resolution", + "enable_prime_tower", + "prime_tower_enable_framework", + "prime_tower_width", + "prime_tower_brim_width", + "prime_tower_skip_points", + "prime_volume", "prime_tower_infill_gap", "prime_tower_flat_ironing", "enable_tower_interface_features", "enable_tower_interface_cooldown_during_tower", - "wipe_tower_no_sparse_layers", "compatible_printers", "compatible_printers_condition", "inherits", - "flush_into_infill", "flush_into_objects", "flush_into_support", - "tree_support_branch_angle", "tree_support_angle_slow", "tree_support_wall_count", "tree_support_top_rate", "tree_support_branch_distance", "tree_support_tip_diameter", - "tree_support_branch_diameter", "tree_support_branch_diameter_angle", - "detect_narrow_internal_solid_infill", - "gcode_add_line_number", "enable_arc_fitting", "precise_z_height", "infill_combination","infill_combination_max_layer_height", /*"adaptive_layer_height",*/ - "support_bottom_interface_spacing", "enable_overhang_speed", "slowdown_for_curled_perimeters", "overhang_1_4_speed", "overhang_2_4_speed", "overhang_3_4_speed", "overhang_4_4_speed", - "initial_layer_infill_speed", "only_one_wall_top", - "timelapse_type", - "wall_generator", "wall_transition_length", "wall_transition_filter_deviation", "wall_transition_angle", - "wall_distribution_count", "min_feature_size", "min_bead_width", "post_process", "min_length_factor", - "small_perimeter_speed", "small_perimeter_threshold","bridge_angle","internal_bridge_angle", "filter_out_gap_fill", "travel_acceleration","inner_wall_acceleration", "min_width_top_surface", - "default_jerk", "outer_wall_jerk", "inner_wall_jerk", "infill_jerk", "top_surface_jerk", "initial_layer_jerk","travel_jerk","default_junction_deviation", - "top_solid_infill_flow_ratio","bottom_solid_infill_flow_ratio","only_one_wall_first_layer", "print_flow_ratio", "seam_gap", - "set_other_flow_ratios", "first_layer_flow_ratio", "outer_wall_flow_ratio", "inner_wall_flow_ratio", "overhang_flow_ratio", "sparse_infill_flow_ratio", "internal_solid_infill_flow_ratio", "gap_fill_flow_ratio", "support_flow_ratio", "support_interface_flow_ratio", - "role_based_wipe_speed", "wipe_speed", "accel_to_decel_enable", "accel_to_decel_factor", "wipe_on_loops", "wipe_before_external_loop", - "bridge_density","internal_bridge_density", "precise_outer_wall", "bridge_acceleration", - "sparse_infill_acceleration", "internal_solid_infill_acceleration", "tree_support_auto_brim", - "tree_support_brim_width", "gcode_comments", "gcode_label_objects", - "initial_layer_travel_speed", "exclude_object", "slow_down_layers", "infill_anchor", "infill_anchor_max","initial_layer_min_bead_width", - "make_overhang_printable", "make_overhang_printable_angle", "make_overhang_printable_hole_size" ,"notes", - "wipe_tower_cone_angle", "wipe_tower_extra_spacing","wipe_tower_max_purge_speed", - "wipe_tower_wall_type", "wipe_tower_extra_rib_length", "wipe_tower_rib_width", "wipe_tower_fillet_wall", - "wipe_tower_filament", "wiping_volumes_extruders","wipe_tower_bridging", "wipe_tower_extra_flow","single_extruder_multi_material_priming", - "wipe_tower_rotation_angle", "tree_support_branch_distance_organic", "tree_support_branch_diameter_organic", "tree_support_branch_angle_organic", - "hole_to_polyhole", "hole_to_polyhole_threshold", "hole_to_polyhole_twisted", "mmu_segmented_region_max_width", "mmu_segmented_region_interlocking_depth", - "small_area_infill_flow_compensation", "small_area_infill_flow_compensation_model", - "enable_wrapping_detection", - "seam_slope_type", "seam_slope_conditional", "scarf_angle_threshold", "scarf_joint_speed", "scarf_joint_flow_ratio", "seam_slope_start_height", "seam_slope_entire_loop", "seam_slope_min_length", "seam_slope_steps", "seam_slope_inner_walls", "scarf_overhang_threshold", - "interlocking_beam", "interlocking_orientation", "interlocking_beam_layer_count", "interlocking_depth", "interlocking_boundary_avoidance", "interlocking_beam_width","calib_flowrate_topinfill_special_order", - // Z Anti-Aliasing (ZAA) - "zaa_enabled", "zaa_minimize_perimeter_height", "zaa_dont_alternate_fill_direction", "zaa_min_z", "zaa_region_disable", "ironing_expansion", + "wipe_tower_no_sparse_layers", + "compatible_printers", + "compatible_printers_condition", + "inherits", + "flush_into_infill", + "flush_into_objects", + "flush_into_support", + "tree_support_branch_angle", + "tree_support_angle_slow", + "tree_support_wall_count", + "tree_support_top_rate", + "tree_support_branch_distance", + "tree_support_tip_diameter", + "tree_support_branch_diameter", + "tree_support_branch_diameter_angle", + "detect_narrow_internal_solid_infill", + "gcode_add_line_number", + "enable_arc_fitting", + "precise_z_height", + "infill_combination", + "infill_combination_max_layer_height", /*"adaptive_layer_height",*/ + "support_bottom_interface_spacing", + "enable_overhang_speed", + "slowdown_for_curled_perimeters", + "overhang_1_4_speed", + "overhang_2_4_speed", + "overhang_3_4_speed", + "overhang_4_4_speed", + "initial_layer_infill_speed", + "only_one_wall_top", + "timelapse_type", + "wall_generator", + "wall_transition_length", + "wall_transition_filter_deviation", + "wall_transition_angle", + "wall_distribution_count", + "min_feature_size", + "min_bead_width", + "post_process", + "min_length_factor", + "small_perimeter_speed", + "small_perimeter_threshold", + "bridge_angle", + "internal_bridge_angle", + "filter_out_gap_fill", + "travel_acceleration", + "inner_wall_acceleration", + "min_width_top_surface", + "default_jerk", + "outer_wall_jerk", + "inner_wall_jerk", + "infill_jerk", + "top_surface_jerk", + "initial_layer_jerk", + "travel_jerk", + "default_junction_deviation", + "top_solid_infill_flow_ratio", + "bottom_solid_infill_flow_ratio", + "only_one_wall_first_layer", + "print_flow_ratio", + "seam_gap", + "set_other_flow_ratios", + "first_layer_flow_ratio", + "outer_wall_flow_ratio", + "inner_wall_flow_ratio", + "overhang_flow_ratio", + "sparse_infill_flow_ratio", + "internal_solid_infill_flow_ratio", + "gap_fill_flow_ratio", + "support_flow_ratio", + "support_interface_flow_ratio", + "role_based_wipe_speed", + "wipe_speed", + "accel_to_decel_enable", + "accel_to_decel_factor", + "wipe_on_loops", + "wipe_before_external_loop", + "bridge_density", + "internal_bridge_density", + "precise_outer_wall", + "bridge_acceleration", + "sparse_infill_acceleration", + "internal_solid_infill_acceleration", + "tree_support_auto_brim", + "tree_support_brim_width", + "gcode_comments", + "gcode_label_objects", + "initial_layer_travel_speed", + "exclude_object", + "slow_down_layers", + "infill_anchor", + "infill_anchor_max", + "initial_layer_min_bead_width", + "make_overhang_printable", + "make_overhang_printable_angle", + "make_overhang_printable_hole_size", + "notes", + "wipe_tower_cone_angle", + "wipe_tower_extra_spacing", + "wipe_tower_max_purge_speed", + "wipe_tower_wall_type", + "wipe_tower_extra_rib_length", + "wipe_tower_rib_width", + "wipe_tower_fillet_wall", + "wipe_tower_filament", + "wiping_volumes_extruders", + "wipe_tower_bridging", + "wipe_tower_extra_flow", + "single_extruder_multi_material_priming", + "wipe_tower_rotation_angle", + "tree_support_branch_distance_organic", + "tree_support_branch_diameter_organic", + "tree_support_branch_angle_organic", + "hole_to_polyhole", + "hole_to_polyhole_threshold", + "hole_to_polyhole_twisted", + "mmu_segmented_region_max_width", + "mmu_segmented_region_interlocking_depth", + "small_area_infill_flow_compensation", + "small_area_infill_flow_compensation_model", + "enable_wrapping_detection", + "seam_slope_type", + "seam_slope_conditional", + "scarf_angle_threshold", + "scarf_joint_speed", + "scarf_joint_flow_ratio", + "seam_slope_start_height", + "seam_slope_entire_loop", + "seam_slope_min_length", + "seam_slope_steps", + "seam_slope_inner_walls", + "scarf_overhang_threshold", + "interlocking_beam", + "interlocking_orientation", + "interlocking_beam_layer_count", + "interlocking_depth", + "interlocking_boundary_avoidance", + "interlocking_beam_width", + "calib_flowrate_topinfill_special_order", + // Z Anti-Aliasing (ZAA) + "zaa_enabled", + "zaa_minimize_perimeter_height", + "zaa_dont_alternate_fill_direction", + "zaa_min_z", + "ironing_expansion", }; static std::vector s_Preset_filament_options {/*"filament_colour", */ "default_filament_colour", "required_nozzle_HRC", "filament_diameter", "pellet_flow_coefficient", "volumetric_speed_coefficients", "filament_type", diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 9325d202df..b0013db24d 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -2201,7 +2201,7 @@ void Print::process(long long *time_cost_with_cache, bool use_cache) // Z-Contouring for (PrintObject *obj : m_objects) { - bool need_contouring = need_slicing_objects.count(obj) != 0 && obj->config().zaa_enabled; + bool need_contouring = need_slicing_objects.count(obj) != 0 && obj->need_z_contouring(); if (need_contouring) { obj->contour_z(); } else { diff --git a/src/libslic3r/Print.hpp b/src/libslic3r/Print.hpp index 4d2bca8dd1..eeb74a87ed 100644 --- a/src/libslic3r/Print.hpp +++ b/src/libslic3r/Print.hpp @@ -496,6 +496,7 @@ private: void prepare_infill(); void infill(); void ironing(); + bool need_z_contouring() const; void contour_z(); void generate_support_material(); void estimate_curled_extrusions(); diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index f7fae90001..94be78eebc 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -4063,13 +4063,6 @@ void PrintConfigDef::init_fff_params() def->mode = comAdvanced; def->set_default_value(new ConfigOptionFloat(0)); - def = this->add("zaa_region_disable", coBool); - def->label = L("Disable Z contouring for region"); - def->category = L("Quality"); - def->tooltip = L("Disable Z contouring for this specific region"); - def->mode = comAdvanced; - def->set_default_value(new ConfigOptionBool(false)); - def = this->add("zaa_enabled", coBool); def->label = L("Z contouring enabled"); def->category = L("Quality"); @@ -4080,12 +4073,13 @@ void PrintConfigDef::init_fff_params() def = this->add("zaa_minimize_perimeter_height", coFloat); def->label = L("Minimize wall height angle"); def->category = L("Quality"); - def->tooltip = L("Reduce top surface perimeter heights to match height of edge for perimeters less than this angle. Set 0 to disable."); + def->tooltip = L("Reduce height of top surface perimeters to match height of model edge. " + "Effects perimeters whose slope is less than this angle in degrees. Reasonable value is 35. Set 0 to disable."); def->sidetext = L("°"); def->min = 0; def->max = 90; def->mode = comAdvanced; - def->set_default_value(new ConfigOptionFloat(35)); + def->set_default_value(new ConfigOptionFloat(0)); def = this->add("zaa_dont_alternate_fill_direction", coBool); def->label = L("Don't alternate fill direction"); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index c6a79a8b66..1d272abc86 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -1046,166 +1046,90 @@ PRINT_CONFIG_CLASS_DEFINE( PRINT_CONFIG_CLASS_DEFINE( PrintRegionConfig, - ((ConfigOptionInts, print_extruder_id)) - ((ConfigOptionStrings, print_extruder_variant)) - ((ConfigOptionInt, bottom_shell_layers)) - ((ConfigOptionFloat, bottom_shell_thickness)) - ((ConfigOptionFloat, bridge_angle)) - ((ConfigOptionFloat, internal_bridge_angle)) // ORCA: Internal bridge angle override - ((ConfigOptionFloat, bridge_flow)) - ((ConfigOptionFloat, internal_bridge_flow)) - ((ConfigOptionFloat, bridge_speed)) - ((ConfigOptionFloatOrPercent, internal_bridge_speed)) - ((ConfigOptionEnum, ensure_vertical_shell_thickness)) - ((ConfigOptionPercent, top_surface_density)) - ((ConfigOptionPercent, bottom_surface_density)) - ((ConfigOptionEnum, top_surface_pattern)) - ((ConfigOptionEnum, bottom_surface_pattern)) - ((ConfigOptionEnum, internal_solid_infill_pattern)) - ((ConfigOptionFloatOrPercent, outer_wall_line_width)) - ((ConfigOptionFloat, outer_wall_speed)) - ((ConfigOptionFloat, infill_direction)) - ((ConfigOptionFloat, solid_infill_direction)) - ((ConfigOptionString, solid_infill_rotate_template)) - ((ConfigOptionBool, symmetric_infill_y_axis)) - ((ConfigOptionFloat, infill_shift_step)) - ((ConfigOptionString, sparse_infill_rotate_template)) - ((ConfigOptionPercent, sparse_infill_density)) - ((ConfigOptionEnum, sparse_infill_pattern)) - ((ConfigOptionFloat, lateral_lattice_angle_1)) - ((ConfigOptionFloat, lateral_lattice_angle_2)) - ((ConfigOptionFloat, infill_overhang_angle)) - ((ConfigOptionBool, align_infill_direction_to_model)) - ((ConfigOptionString, extra_solid_infills)) - ((ConfigOptionEnum, fuzzy_skin)) - ((ConfigOptionFloat, fuzzy_skin_thickness)) - ((ConfigOptionFloat, fuzzy_skin_point_distance)) - ((ConfigOptionBool, fuzzy_skin_first_layer)) - ((ConfigOptionEnum, fuzzy_skin_noise_type)) - ((ConfigOptionEnum, fuzzy_skin_mode)) - ((ConfigOptionFloat, fuzzy_skin_scale)) - ((ConfigOptionInt, fuzzy_skin_octaves)) - ((ConfigOptionFloat, fuzzy_skin_persistence)) - ((ConfigOptionFloat, gap_infill_speed)) - ((ConfigOptionInt, sparse_infill_filament)) - ((ConfigOptionFloatOrPercent, sparse_infill_line_width)) - ((ConfigOptionPercent, infill_wall_overlap)) - ((ConfigOptionPercent, top_bottom_infill_wall_overlap)) - ((ConfigOptionFloat, sparse_infill_speed)) - ((ConfigOptionPercent, skeleton_infill_density)) - ((ConfigOptionPercent, skin_infill_density)) - ((ConfigOptionFloat, infill_lock_depth)) - ((ConfigOptionFloat, skin_infill_depth)) - ((ConfigOptionFloatOrPercent, skin_infill_line_width)) - ((ConfigOptionFloatOrPercent, skeleton_infill_line_width)) - ((ConfigOptionBool, infill_combination)) + ((ConfigOptionInts, print_extruder_id))((ConfigOptionStrings, print_extruder_variant))((ConfigOptionInt, bottom_shell_layers))( + (ConfigOptionFloat, bottom_shell_thickness))((ConfigOptionFloat, bridge_angle))( + (ConfigOptionFloat, internal_bridge_angle)) // ORCA: Internal bridge angle override + ((ConfigOptionFloat, bridge_flow))((ConfigOptionFloat, internal_bridge_flow))((ConfigOptionFloat, bridge_speed))( + (ConfigOptionFloatOrPercent, internal_bridge_speed))((ConfigOptionEnum, + ensure_vertical_shell_thickness))((ConfigOptionPercent, top_surface_density))( + (ConfigOptionPercent, bottom_surface_density))((ConfigOptionEnum, top_surface_pattern))( + (ConfigOptionEnum, bottom_surface_pattern))((ConfigOptionEnum, internal_solid_infill_pattern))( + (ConfigOptionFloatOrPercent, outer_wall_line_width))((ConfigOptionFloat, outer_wall_speed))((ConfigOptionFloat, infill_direction))( + (ConfigOptionFloat, solid_infill_direction))((ConfigOptionString, solid_infill_rotate_template))( + (ConfigOptionBool, symmetric_infill_y_axis))((ConfigOptionFloat, infill_shift_step))( + (ConfigOptionString, sparse_infill_rotate_template))((ConfigOptionPercent, sparse_infill_density))( + (ConfigOptionEnum, sparse_infill_pattern))((ConfigOptionFloat, lateral_lattice_angle_1))( + (ConfigOptionFloat, lateral_lattice_angle_2))((ConfigOptionFloat, infill_overhang_angle))((ConfigOptionBool, + align_infill_direction_to_model))(( + ConfigOptionString, extra_solid_infills))((ConfigOptionEnum, fuzzy_skin))((ConfigOptionFloat, fuzzy_skin_thickness))( + (ConfigOptionFloat, fuzzy_skin_point_distance))((ConfigOptionBool, fuzzy_skin_first_layer))((ConfigOptionEnum, + fuzzy_skin_noise_type))( + (ConfigOptionEnum, fuzzy_skin_mode))((ConfigOptionFloat, fuzzy_skin_scale))((ConfigOptionInt, fuzzy_skin_octaves))( + (ConfigOptionFloat, fuzzy_skin_persistence))((ConfigOptionFloat, gap_infill_speed))((ConfigOptionInt, sparse_infill_filament))( + (ConfigOptionFloatOrPercent, sparse_infill_line_width))((ConfigOptionPercent, infill_wall_overlap))( + (ConfigOptionPercent, top_bottom_infill_wall_overlap))((ConfigOptionFloat, sparse_infill_speed))( + (ConfigOptionPercent, skeleton_infill_density))((ConfigOptionPercent, skin_infill_density))((ConfigOptionFloat, infill_lock_depth))( + (ConfigOptionFloat, skin_infill_depth))((ConfigOptionFloatOrPercent, skin_infill_line_width))( + (ConfigOptionFloatOrPercent, skeleton_infill_line_width))((ConfigOptionBool, infill_combination)) // Orca: - ((ConfigOptionFloatOrPercent, infill_combination_max_layer_height)) - ((ConfigOptionInt, fill_multiline)) + ((ConfigOptionFloatOrPercent, infill_combination_max_layer_height))((ConfigOptionInt, fill_multiline)) // Ironing options - ((ConfigOptionEnum, ironing_type)) - ((ConfigOptionEnum, ironing_pattern)) - ((ConfigOptionPercent, ironing_flow)) - ((ConfigOptionFloat, ironing_spacing)) - ((ConfigOptionFloat, ironing_inset)) - ((ConfigOptionFloat, ironing_direction)) - ((ConfigOptionFloat, ironing_speed)) - ((ConfigOptionFloat, ironing_angle)) - ((ConfigOptionBool, ironing_angle_fixed)) - ((ConfigOptionFloat, ironing_expansion)) + ((ConfigOptionEnum, ironing_type))((ConfigOptionEnum, ironing_pattern))((ConfigOptionPercent, ironing_flow))( + (ConfigOptionFloat, ironing_spacing))((ConfigOptionFloat, ironing_inset))((ConfigOptionFloat, + ironing_direction))((ConfigOptionFloat, ironing_speed))( + (ConfigOptionFloat, ironing_angle))((ConfigOptionBool, ironing_angle_fixed))((ConfigOptionFloat, ironing_expansion)) // Filament Ironing - ((ConfigOptionPercentsNullable, filament_ironing_flow)) - ((ConfigOptionFloatsNullable, filament_ironing_spacing)) - ((ConfigOptionFloatsNullable, filament_ironing_inset)) - ((ConfigOptionFloatsNullable, filament_ironing_speed)) + ((ConfigOptionPercentsNullable, filament_ironing_flow))((ConfigOptionFloatsNullable, filament_ironing_spacing))( + (ConfigOptionFloatsNullable, filament_ironing_inset))((ConfigOptionFloatsNullable, filament_ironing_speed)) // Detect bridging perimeters - ((ConfigOptionBool, detect_overhang_wall)) - ((ConfigOptionInt, wall_filament)) - ((ConfigOptionFloatOrPercent, inner_wall_line_width)) - ((ConfigOptionFloat, inner_wall_speed)) + ((ConfigOptionBool, detect_overhang_wall))((ConfigOptionInt, wall_filament))((ConfigOptionFloatOrPercent, inner_wall_line_width))( + (ConfigOptionFloat, inner_wall_speed)) // Total number of perimeters. - ((ConfigOptionInt, wall_loops)) - ((ConfigOptionBool, alternate_extra_wall)) - ((ConfigOptionFloat, minimum_sparse_infill_area)) - ((ConfigOptionInt, solid_infill_filament)) - ((ConfigOptionFloatOrPercent, internal_solid_infill_line_width)) - ((ConfigOptionFloat, internal_solid_infill_speed)) + ((ConfigOptionInt, wall_loops))((ConfigOptionBool, alternate_extra_wall))((ConfigOptionFloat, minimum_sparse_infill_area))( + (ConfigOptionInt, solid_infill_filament))((ConfigOptionFloatOrPercent, + internal_solid_infill_line_width))((ConfigOptionFloat, internal_solid_infill_speed)) // Detect thin walls. - ((ConfigOptionBool, detect_thin_wall)) - ((ConfigOptionFloatOrPercent, top_surface_line_width)) - ((ConfigOptionInt, top_shell_layers)) - ((ConfigOptionFloat, top_shell_thickness)) - ((ConfigOptionFloat, top_surface_speed)) - //BBS - ((ConfigOptionBool, enable_overhang_speed)) - ((ConfigOptionFloatOrPercent, overhang_1_4_speed)) - ((ConfigOptionFloatOrPercent, overhang_2_4_speed)) - ((ConfigOptionFloatOrPercent, overhang_3_4_speed)) - ((ConfigOptionFloatOrPercent, overhang_4_4_speed)) - ((ConfigOptionBool, only_one_wall_top)) + ((ConfigOptionBool, detect_thin_wall))((ConfigOptionFloatOrPercent, top_surface_line_width))((ConfigOptionInt, top_shell_layers))( + (ConfigOptionFloat, top_shell_thickness))((ConfigOptionFloat, top_surface_speed)) + // BBS + ((ConfigOptionBool, enable_overhang_speed))((ConfigOptionFloatOrPercent, overhang_1_4_speed))( + (ConfigOptionFloatOrPercent, overhang_2_4_speed))((ConfigOptionFloatOrPercent, overhang_3_4_speed))( + (ConfigOptionFloatOrPercent, overhang_4_4_speed))((ConfigOptionBool, only_one_wall_top)) - //SoftFever - ((ConfigOptionFloatOrPercent, min_width_top_surface)) - ((ConfigOptionBool, only_one_wall_first_layer)) - ((ConfigOptionFloat, print_flow_ratio)) - ((ConfigOptionFloatOrPercent, seam_gap)) - ((ConfigOptionBool, role_based_wipe_speed)) - ((ConfigOptionFloatOrPercent, wipe_speed)) - ((ConfigOptionBool, wipe_on_loops)) - ((ConfigOptionBool, wipe_before_external_loop)) - ((ConfigOptionEnum, wall_infill_order)) - ((ConfigOptionBool, precise_outer_wall)) - ((ConfigOptionPercent, bridge_density)) - ((ConfigOptionFloat, filter_out_gap_fill)) - ((ConfigOptionFloatOrPercent, small_perimeter_speed)) - ((ConfigOptionFloat, small_perimeter_threshold)) - ((ConfigOptionFloat, top_solid_infill_flow_ratio)) - ((ConfigOptionFloat, bottom_solid_infill_flow_ratio)) - ((ConfigOptionFloatOrPercent, infill_anchor)) - ((ConfigOptionFloatOrPercent, infill_anchor_max)) + // SoftFever + ((ConfigOptionFloatOrPercent, min_width_top_surface))((ConfigOptionBool, only_one_wall_first_layer))( + (ConfigOptionFloat, print_flow_ratio))((ConfigOptionFloatOrPercent, seam_gap))((ConfigOptionBool, role_based_wipe_speed))( + (ConfigOptionFloatOrPercent, wipe_speed))((ConfigOptionBool, wipe_on_loops))((ConfigOptionBool, wipe_before_external_loop))( + (ConfigOptionEnum, wall_infill_order))((ConfigOptionBool, precise_outer_wall))(( + ConfigOptionPercent, bridge_density))((ConfigOptionFloat, filter_out_gap_fill))((ConfigOptionFloatOrPercent, small_perimeter_speed))( + (ConfigOptionFloat, small_perimeter_threshold))((ConfigOptionFloat, top_solid_infill_flow_ratio))( + (ConfigOptionFloat, bottom_solid_infill_flow_ratio))((ConfigOptionFloatOrPercent, infill_anchor))((ConfigOptionFloatOrPercent, + infill_anchor_max)) // Orca - ((ConfigOptionBool, make_overhang_printable)) - ((ConfigOptionBool, extra_perimeters_on_overhangs)) - ((ConfigOptionBool, slowdown_for_curled_perimeters)) - ((ConfigOptionBool, hole_to_polyhole)) - ((ConfigOptionFloatOrPercent, hole_to_polyhole_threshold)) - ((ConfigOptionBool, hole_to_polyhole_twisted)) - ((ConfigOptionBool, overhang_reverse)) - ((ConfigOptionBool, overhang_reverse_internal_only)) - ((ConfigOptionFloatOrPercent, overhang_reverse_threshold)) - ((ConfigOptionEnum, counterbore_hole_bridging)) - ((ConfigOptionEnum, wall_sequence)) - ((ConfigOptionBool, is_infill_first)) - ((ConfigOptionBool, small_area_infill_flow_compensation)) - ((ConfigOptionEnum, wall_direction)) + ((ConfigOptionBool, make_overhang_printable))((ConfigOptionBool, extra_perimeters_on_overhangs))( + (ConfigOptionBool, slowdown_for_curled_perimeters))((ConfigOptionBool, hole_to_polyhole))( + (ConfigOptionFloatOrPercent, hole_to_polyhole_threshold))((ConfigOptionBool, hole_to_polyhole_twisted))( + (ConfigOptionBool, overhang_reverse))((ConfigOptionBool, overhang_reverse_internal_only))((ConfigOptionFloatOrPercent, + overhang_reverse_threshold))( + (ConfigOptionEnum, counterbore_hole_bridging))((ConfigOptionEnum, wall_sequence))( + (ConfigOptionBool, is_infill_first))((ConfigOptionBool, small_area_infill_flow_compensation))((ConfigOptionEnum, + wall_direction)) // Orca: other flow ratios (available for overriding, if set_other_flow_ratios is enabled) - ((ConfigOptionFloat, first_layer_flow_ratio)) - ((ConfigOptionFloat, outer_wall_flow_ratio)) - ((ConfigOptionFloat, inner_wall_flow_ratio)) - ((ConfigOptionFloat, overhang_flow_ratio)) - ((ConfigOptionFloat, sparse_infill_flow_ratio)) - ((ConfigOptionFloat, internal_solid_infill_flow_ratio)) - ((ConfigOptionFloat, gap_fill_flow_ratio)) + ((ConfigOptionFloat, first_layer_flow_ratio))((ConfigOptionFloat, outer_wall_flow_ratio))((ConfigOptionFloat, inner_wall_flow_ratio))( + (ConfigOptionFloat, overhang_flow_ratio))((ConfigOptionFloat, sparse_infill_flow_ratio))( + (ConfigOptionFloat, internal_solid_infill_flow_ratio))((ConfigOptionFloat, gap_fill_flow_ratio)) // Orca: seam slopes - ((ConfigOptionEnum, seam_slope_type)) - ((ConfigOptionBool, seam_slope_conditional)) - ((ConfigOptionInt, scarf_angle_threshold)) - ((ConfigOptionFloatOrPercent, seam_slope_start_height)) - ((ConfigOptionBool, seam_slope_entire_loop)) - ((ConfigOptionFloat, seam_slope_min_length)) - ((ConfigOptionInt, seam_slope_steps)) - ((ConfigOptionBool, seam_slope_inner_walls)) - ((ConfigOptionFloatOrPercent, scarf_joint_speed)) - ((ConfigOptionFloat, scarf_joint_flow_ratio)) - ((ConfigOptionPercent, scarf_overhang_threshold)) + ((ConfigOptionEnum, seam_slope_type))((ConfigOptionBool, seam_slope_conditional))( + (ConfigOptionInt, scarf_angle_threshold))((ConfigOptionFloatOrPercent, seam_slope_start_height))( + (ConfigOptionBool, seam_slope_entire_loop))((ConfigOptionFloat, seam_slope_min_length))((ConfigOptionInt, seam_slope_steps))( + (ConfigOptionBool, seam_slope_inner_walls))((ConfigOptionFloatOrPercent, scarf_joint_speed))( + (ConfigOptionFloat, scarf_joint_flow_ratio))((ConfigOptionPercent, scarf_overhang_threshold)) // Z Anti-Aliasing (aka Z Contouring) - ((ConfigOptionBool, zaa_region_disable)) - ((ConfigOptionFloat, zaa_minimize_perimeter_height)) -) + ((ConfigOptionBool, zaa_enabled))((ConfigOptionFloat, zaa_minimize_perimeter_height))) PRINT_CONFIG_CLASS_DEFINE( MachineEnvelopeConfig, diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index e4d47c065e..b21355697f 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -25,6 +25,7 @@ #include "format.hpp" #include "AABBTreeLines.hpp" +#include #include #include #include @@ -715,6 +716,21 @@ void PrintObject::ironing() } } +bool PrintObject::need_z_contouring() const +{ + if (this->config().zaa_enabled) { + return true; + } + + size_t num_regions = this->num_printing_regions(); + for (size_t region_id = 0; region_id < num_regions; region_id++) { + if (this->printing_region(region_id).config().zaa_enabled) + return true; + } + + return false; +} + void PrintObject::contour_z() { if (!this->set_started(posContouring)) { diff --git a/src/slic3r/GUI/GUI_Factories.cpp b/src/slic3r/GUI/GUI_Factories.cpp index 6251c544b2..9d30757f23 100644 --- a/src/slic3r/GUI/GUI_Factories.cpp +++ b/src/slic3r/GUI/GUI_Factories.cpp @@ -100,24 +100,63 @@ std::map> SettingsFactory::OBJECT_C }} }; -std::map> SettingsFactory::PART_CATEGORY_SETTINGS= -{ - { L("Quality"), {{"ironing_type", "",8},{"ironing_flow", "",9},{"ironing_spacing", "",10},{"ironing_inset", "", 11},{"bridge_flow", "",11},{"make_overhang_printable", "",11},{"bridge_density", "", 1}, - {"ironing_expansion", "", 14}, - {"zaa_enabled", "", 1}, {"zaa_region_disable", "", 2}, {"zaa_minimize_perimeter_height", "", 3}, {"zaa_dont_alternate_fill_direction", "", 4}, {"zaa_min_z", "", 5} - }}, - { L("Strength"), {{"wall_loops", "",1},{"top_shell_layers", L("Top Solid Layers"),1},{"top_shell_thickness", L("Top Minimum Shell Thickness"),1},{"top_surface_density", L("Top Surface Density"),1}, - {"bottom_shell_layers", L("Bottom Solid Layers"),1}, {"bottom_shell_thickness", L("Bottom Minimum Shell Thickness"),1},{"bottom_surface_density", L("Bottom Surface Density"),1}, - {"sparse_infill_density", "",1},{"sparse_infill_pattern", "",1},{"lateral_lattice_angle_1", "",1},{"lateral_lattice_angle_2", "",1},{"infill_overhang_angle", "",1},{"infill_anchor", "",1},{"infill_anchor_max", "",1},{"top_surface_pattern", "",1},{"bottom_surface_pattern", "",1}, {"internal_solid_infill_pattern", "",1}, - {"align_infill_direction_to_model", "", 1}, - {"extra_solid_infills", "", 1}, - {"infill_combination", "",1}, {"infill_combination_max_layer_height", "",1}, {"infill_wall_overlap", "",1},{"top_bottom_infill_wall_overlap", "",1}, {"solid_infill_direction", "",1}, {"infill_direction", "",1}, {"bridge_angle", "",1}, {"internal_bridge_angle", "",1}, {"minimum_sparse_infill_area", "",1} - }}, - { L("Speed"), {{"outer_wall_speed", "",1},{"inner_wall_speed", "",2},{"sparse_infill_speed", "",3},{"top_surface_speed", "",4}, {"internal_solid_infill_speed", "",5}, - {"enable_overhang_speed", "",6}, {"overhang_1_4_speed", "",7}, {"overhang_2_4_speed", "",8}, {"overhang_3_4_speed", "",9}, {"overhang_4_4_speed", "",10}, - {"bridge_speed", "",11}, {"gap_infill_speed", "",12}, {"internal_bridge_speed", "", 13} - }} -}; +std::map> SettingsFactory::PART_CATEGORY_SETTINGS = + {{L("Quality"), + {{"ironing_type", "", 8}, + {"ironing_flow", "", 9}, + {"ironing_spacing", "", 10}, + {"ironing_inset", "", 11}, + {"bridge_flow", "", 11}, + {"make_overhang_printable", "", 11}, + {"bridge_density", "", 1}, + {"ironing_expansion", "", 14}, + {"zaa_enabled", "", 1}, + {"zaa_minimize_perimeter_height", "", 2}, + {"zaa_dont_alternate_fill_direction", "", 3}, + {"zaa_min_z", "", 4}}}, + {L("Strength"), + {{"wall_loops", "", 1}, + {"top_shell_layers", L("Top Solid Layers"), 1}, + {"top_shell_thickness", L("Top Minimum Shell Thickness"), 1}, + {"top_surface_density", L("Top Surface Density"), 1}, + {"bottom_shell_layers", L("Bottom Solid Layers"), 1}, + {"bottom_shell_thickness", L("Bottom Minimum Shell Thickness"), 1}, + {"bottom_surface_density", L("Bottom Surface Density"), 1}, + {"sparse_infill_density", "", 1}, + {"sparse_infill_pattern", "", 1}, + {"lateral_lattice_angle_1", "", 1}, + {"lateral_lattice_angle_2", "", 1}, + {"infill_overhang_angle", "", 1}, + {"infill_anchor", "", 1}, + {"infill_anchor_max", "", 1}, + {"top_surface_pattern", "", 1}, + {"bottom_surface_pattern", "", 1}, + {"internal_solid_infill_pattern", "", 1}, + {"align_infill_direction_to_model", "", 1}, + {"extra_solid_infills", "", 1}, + {"infill_combination", "", 1}, + {"infill_combination_max_layer_height", "", 1}, + {"infill_wall_overlap", "", 1}, + {"top_bottom_infill_wall_overlap", "", 1}, + {"solid_infill_direction", "", 1}, + {"infill_direction", "", 1}, + {"bridge_angle", "", 1}, + {"internal_bridge_angle", "", 1}, + {"minimum_sparse_infill_area", "", 1}}}, + {L("Speed"), + {{"outer_wall_speed", "", 1}, + {"inner_wall_speed", "", 2}, + {"sparse_infill_speed", "", 3}, + {"top_surface_speed", "", 4}, + {"internal_solid_infill_speed", "", 5}, + {"enable_overhang_speed", "", 6}, + {"overhang_1_4_speed", "", 7}, + {"overhang_2_4_speed", "", 8}, + {"overhang_3_4_speed", "", 9}, + {"overhang_4_4_speed", "", 10}, + {"bridge_speed", "", 11}, + {"gap_infill_speed", "", 12}, + {"internal_bridge_speed", "", 13}}}}; std::vector SettingsFactory::get_options(const bool is_part) { diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 1ab1b82c03..5cef6eaa78 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -2342,9 +2342,7 @@ void TabPrint::build() optgroup = page->new_optgroup("Z Contouring", L"param_advanced"); optgroup->append_single_option_line("zaa_enabled"); - optgroup->append_single_option_line("zaa_region_disable"); optgroup->append_single_option_line("zaa_minimize_perimeter_height"); - optgroup->append_single_option_line("zaa_dont_alternate_fill_direction"); optgroup->append_single_option_line("zaa_min_z"); optgroup->append_single_option_line("ironing_expansion");