Skip to content

Commit

Permalink
Disable vase mode of layers that have color change (SoftFever#8387)
Browse files Browse the repository at this point in the history
  • Loading branch information
Noisyfox committed Feb 14, 2025
1 parent f495313 commit 8b688a8
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4048,6 +4048,7 @@ LayerResult GCode::process_layer(
// Extrude the skirt, brim, support, perimeters, infill ordered by the extruders.
for (unsigned int extruder_id : layer_tools.extruders)
{
std::string gcode_toolchange;
if (has_wipe_tower) {
if (!m_wipe_tower->is_empty_wipe_tower_gcode(*this, extruder_id, extruder_id == layer_tools.extruders.back())) {
if (need_insert_timelapse_gcode_for_traditional && !has_insert_timelapse_gcode) {
Expand All @@ -4066,11 +4067,16 @@ LayerResult GCode::process_layer(
}
has_insert_timelapse_gcode = true;
}
gcode += m_wipe_tower->tool_change(*this, extruder_id, extruder_id == layer_tools.extruders.back());
gcode_toolchange = m_wipe_tower->tool_change(*this, extruder_id, extruder_id == layer_tools.extruders.back());
}
} else {
gcode += this->set_extruder(extruder_id, print_z);
gcode_toolchange = this->set_extruder(extruder_id, print_z);
}
if (!gcode_toolchange.empty()) {
// Disable vase mode for layers that has toolchange
result.spiral_vase_enable = false;
}
gcode += std::move(gcode_toolchange);

// let analyzer tag generator aware of a role type change
if (layer_tools.has_wipe_tower && m_wipe_tower)
Expand Down Expand Up @@ -6035,7 +6041,8 @@ std::string GCode::travel_to(const Point& point, ExtrusionRole role, std::string

// use G1 because we rely on paths being straight (G0 may make round paths)
if (travel.size() >= 2) {
if (m_spiral_vase) {
// Orca: use `travel_to_xyz` to ensure we start at the correct z, in case we moved z in custom/filament change gcode
if (false/*m_spiral_vase*/) {
// No lazy z lift for spiral vase mode
for (size_t i = 1; i < travel.size(); ++i) {
gcode += m_writer.travel_to_xy(this->point_to_gcode(travel.points[i]), comment);
Expand Down

0 comments on commit 8b688a8

Please sign in to comment.