Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug that wipe tower has missing extrusions when ramming is disabled #6894

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions src/libslic3r/GCode/WipeTower2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ void WipeTower2::toolchange_Unload(
float remaining = xr - xl ; // keeps track of distance to the next turnaround
float e_done = 0; // measures E move done from each segment

const bool do_ramming = m_enable_filament_ramming && (m_semm || m_filpar[m_current_tool].multitool_ramming);
const bool do_ramming = m_semm || m_filpar[m_current_tool].multitool_ramming;
const bool cold_ramming = m_is_mk4mmu3;

if (do_ramming) {
Expand Down Expand Up @@ -945,7 +945,6 @@ void WipeTower2::toolchange_Unload(
// now the ramming itself:
while (do_ramming && i < m_filpar[m_current_tool].ramming_speed.size())
{
writer.append("; Ramming\n");
// The time step is different for SEMM ramming and the MM ramming. See comments in set_extruder() for details.
const float time_step = m_semm ? 0.25f : m_filpar[m_current_tool].multitool_ramming_time;

Expand All @@ -971,9 +970,12 @@ void WipeTower2::toolchange_Unload(
writer.change_analyzer_line_width(m_perimeter_width); // so the next lines are not affected by ramming_line_width_multiplier

// Retraction:
if(m_enable_filament_ramming)
writer.append("; Ramming start\n");

float old_x = writer.x();
float turning_point = (!m_left_to_right ? xl : xr );
if (m_semm && (m_cooling_tube_retraction != 0 || m_cooling_tube_length != 0)) {
if (m_enable_filament_ramming && m_semm && (m_cooling_tube_retraction != 0 || m_cooling_tube_length != 0)) {
writer.append("; Retract(unload)\n");
float total_retraction_distance = m_cooling_tube_retraction + m_cooling_tube_length/2.f - 15.f; // the 15mm is reserved for the first part after ramming
writer.suppress_preview()
Expand All @@ -985,7 +987,7 @@ void WipeTower2::toolchange_Unload(
}

const int& number_of_cooling_moves = m_filpar[m_current_tool].cooling_moves;
const bool cooling_will_happen = m_semm && number_of_cooling_moves > 0 && m_cooling_tube_length != 0;
const bool cooling_will_happen = m_enable_filament_ramming && m_semm && number_of_cooling_moves > 0 && m_cooling_tube_length != 0;
bool change_temp_later = false;

// Wipe tower should only change temperature with single extruder MM. Otherwise, all temperatures should
Expand Down Expand Up @@ -1054,7 +1056,7 @@ void WipeTower2::toolchange_Unload(
}
}

if (m_semm) {
if (m_enable_filament_ramming && m_semm) {
writer.append("; Cooling park\n");
// let's wait is necessary:
writer.wait(m_filpar[m_current_tool].delay);
Expand All @@ -1064,6 +1066,10 @@ void WipeTower2::toolchange_Unload(
writer.retract(_e, 2000);
}

if(m_enable_filament_ramming)
writer.append("; Ramming end\n");


// this is to align ramming and future wiping extrusions, so the future y-steps can be uniform from the start:
// the perimeter_width will later be subtracted, it is there to not load while moving over just extruded material
Vec2f pos = Vec2f(end_of_ramming.x(), end_of_ramming.y() + (y_step/m_extra_spacing_ramming-m_perimeter_width) / 2.f + m_perimeter_width);
Expand Down
5 changes: 3 additions & 2 deletions src/slic3r/GUI/ConfigManipulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -676,10 +676,11 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
for (auto el : {"wipe_tower_rotation_angle", "wipe_tower_cone_angle",
"wipe_tower_extra_spacing", "wipe_tower_max_purge_speed",
"wipe_tower_bridging", "wipe_tower_extra_flow",
"wipe_tower_no_sparse_layers",
"single_extruder_multi_material_priming"})
"wipe_tower_no_sparse_layers"})
toggle_line(el, have_prime_tower && !is_BBL_Printer);

toggle_line("single_extruder_multi_material_priming", !bSEMM && have_prime_tower && !is_BBL_Printer);

toggle_line("prime_volume",have_prime_tower && (!purge_in_primetower || !bSEMM));

for (auto el : {"flush_into_infill", "flush_into_support", "flush_into_objects"})
Expand Down
Loading