mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 03:07:55 -06:00
Fix vase mode with filament change (#8404)
* Fix lift in vase mode * Disable vase mode of layers that have color change (SoftFever/OrcaSlicer#8387)
This commit is contained in:
parent
98be94a729
commit
9db74c05c0
1 changed files with 11 additions and 5 deletions
|
@ -4077,6 +4077,7 @@ LayerResult GCode::process_layer(
|
||||||
// Extrude the skirt, brim, support, perimeters, infill ordered by the extruders.
|
// Extrude the skirt, brim, support, perimeters, infill ordered by the extruders.
|
||||||
for (unsigned int extruder_id : layer_tools.extruders)
|
for (unsigned int extruder_id : layer_tools.extruders)
|
||||||
{
|
{
|
||||||
|
std::string gcode_toolchange;
|
||||||
if (has_wipe_tower) {
|
if (has_wipe_tower) {
|
||||||
if (!m_wipe_tower->is_empty_wipe_tower_gcode(*this, extruder_id, extruder_id == layer_tools.extruders.back())) {
|
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) {
|
if (need_insert_timelapse_gcode_for_traditional && !has_insert_timelapse_gcode) {
|
||||||
|
@ -4095,11 +4096,16 @@ LayerResult GCode::process_layer(
|
||||||
}
|
}
|
||||||
has_insert_timelapse_gcode = true;
|
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 {
|
} 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
|
// let analyzer tag generator aware of a role type change
|
||||||
if (layer_tools.has_wipe_tower && m_wipe_tower)
|
if (layer_tools.has_wipe_tower && m_wipe_tower)
|
||||||
|
@ -6064,7 +6070,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)
|
// use G1 because we rely on paths being straight (G0 may make round paths)
|
||||||
if (travel.size() >= 2) {
|
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
|
// No lazy z lift for spiral vase mode
|
||||||
for (size_t i = 1; i < travel.size(); ++i) {
|
for (size_t i = 1; i < travel.size(); ++i) {
|
||||||
gcode += m_writer.travel_to_xy(this->point_to_gcode(travel.points[i]), comment);
|
gcode += m_writer.travel_to_xy(this->point_to_gcode(travel.points[i]), comment);
|
||||||
|
@ -6292,8 +6299,7 @@ std::string GCode::retract(bool toolchange, bool is_last_retraction, LiftType li
|
||||||
}
|
}
|
||||||
|
|
||||||
if (needs_lift && can_lift) {
|
if (needs_lift && can_lift) {
|
||||||
size_t extruder_id = m_writer.extruder()->id();
|
gcode += m_writer.lift(lift_type, m_spiral_vase != nullptr);
|
||||||
gcode += m_writer.lift(!m_spiral_vase ? lift_type : LiftType::NormalLift);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return gcode;
|
return gcode;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue