Skip to content

Commit

Permalink
Add option to add scarf joint to inner walls
Browse files Browse the repository at this point in the history
  • Loading branch information
Noisyfox committed Jan 28, 2024
1 parent fa3383a commit 5cd06dd
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4541,7 +4541,10 @@ std::string GCode::extrude_loop(ExtrusionLoop loop, std::string description, dou
} else
loop.split_at(last_pos, false);

const bool enable_seam_slope = m_config.seam_slope_enabled.value && !m_config.spiral_mode && loop.role() == erExternalPerimeter && layer_id() > 0;
const bool enable_seam_slope = m_config.seam_slope_enabled.value &&
!m_config.spiral_mode &&
(loop.role() == erExternalPerimeter || (loop.role() == erPerimeter && m_config.seam_slope_inner_walls)) &&
layer_id() > 0;

// clip the path to avoid the extruder to get exactly on the first point of the loop;
// if polyline was shorter than the clipping distance we'd get a null polyline, so
Expand Down
2 changes: 1 addition & 1 deletion src/libslic3r/Preset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ static std::vector<std::string> s_Preset_print_options {
"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",
"seam_slope_enabled", "seam_slope_start_height", "seam_slope_min_length", "seam_slope_steps",
"seam_slope_enabled", "seam_slope_start_height", "seam_slope_min_length", "seam_slope_steps", "seam_slope_inner_walls",
};

static std::vector<std::string> s_Preset_filament_options {
Expand Down
6 changes: 6 additions & 0 deletions src/libslic3r/PrintConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3460,6 +3460,12 @@ def = this->add("filament_loading_speed", coFloats);
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionInt(10));

def = this->add("seam_slope_inner_walls", coBool);
def->label = L("Scarf joint for inner walls");
def->tooltip = L("Use scarf joint for inner walls as well.");
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionBool(false));

def = this->add("role_based_wipe_speed", coBool);
def->label = L("Role base wipe speed");
def->tooltip = L("The wipe speed is determined by the speed of the current extrusion role."
Expand Down
1 change: 1 addition & 0 deletions src/libslic3r/PrintConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,7 @@ PRINT_CONFIG_CLASS_DEFINE(
((ConfigOptionFloatOrPercent, seam_slope_start_height))
((ConfigOptionFloat, seam_slope_min_length))
((ConfigOptionInt, seam_slope_steps))
((ConfigOptionBool, seam_slope_inner_walls))

)

Expand Down
1 change: 1 addition & 0 deletions src/libslic3r/PrintObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,7 @@ bool PrintObject::invalidate_state_by_config_options(
|| opt_key == "seam_slope_start_height"
|| opt_key == "seam_slope_min_length"
|| opt_key == "seam_slope_steps"
|| opt_key == "seam_slope_inner_walls"
|| opt_key == "support_speed"
|| opt_key == "support_interface_speed"
|| opt_key == "overhang_1_4_speed"
Expand Down
1 change: 1 addition & 0 deletions src/slic3r/GUI/ConfigManipulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
toggle_line("seam_slope_start_height", has_seam_slope);
toggle_line("seam_slope_min_length", has_seam_slope);
toggle_line("seam_slope_steps", has_seam_slope);
toggle_line("seam_slope_inner_walls", has_seam_slope);
}

void ConfigManipulation::update_print_sla_config(DynamicPrintConfig* config, const bool is_global_config/* = false*/)
Expand Down
1 change: 1 addition & 0 deletions src/slic3r/GUI/Tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1992,6 +1992,7 @@ void TabPrint::build()
optgroup->append_single_option_line("seam_slope_start_height");
optgroup->append_single_option_line("seam_slope_min_length");
optgroup->append_single_option_line("seam_slope_steps");
optgroup->append_single_option_line("seam_slope_inner_walls");
optgroup->append_single_option_line("role_based_wipe_speed","seam");
optgroup->append_single_option_line("wipe_speed", "seam");
optgroup->append_single_option_line("wipe_on_loops","seam");
Expand Down

0 comments on commit 5cd06dd

Please sign in to comment.