mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-11 17:29:06 +08:00
Warning fix: removed needless tautological check
This commit is contained in:
parent
0e157b5b07
commit
c284a65caa
@ -496,37 +496,37 @@ std::string WipeTowerIntegration::prime(GCode &gcodegen)
|
|||||||
assert(m_layer_idx == 0);
|
assert(m_layer_idx == 0);
|
||||||
std::string gcode;
|
std::string gcode;
|
||||||
|
|
||||||
if (&m_priming != nullptr) {
|
|
||||||
// Disable linear advance for the wipe tower operations.
|
|
||||||
//gcode += (gcodegen.config().gcode_flavor == gcfRepRap ? std::string("M572 D0 S0\n") : std::string("M900 K0\n"));
|
|
||||||
|
|
||||||
for (const WipeTower::ToolChangeResult& tcr : m_priming) {
|
// Disable linear advance for the wipe tower operations.
|
||||||
if (!tcr.extrusions.empty())
|
//gcode += (gcodegen.config().gcode_flavor == gcfRepRap ? std::string("M572 D0 S0\n") : std::string("M900 K0\n"));
|
||||||
gcode += append_tcr(gcodegen, tcr, tcr.new_tool);
|
|
||||||
|
for (const WipeTower::ToolChangeResult& tcr : m_priming) {
|
||||||
|
if (!tcr.extrusions.empty())
|
||||||
|
gcode += append_tcr(gcodegen, tcr, tcr.new_tool);
|
||||||
|
|
||||||
|
|
||||||
// Let the tool change be executed by the wipe tower class.
|
// Let the tool change be executed by the wipe tower class.
|
||||||
// Inform the G-code writer about the changes done behind its back.
|
// Inform the G-code writer about the changes done behind its back.
|
||||||
//gcode += tcr.gcode;
|
//gcode += tcr.gcode;
|
||||||
// Let the m_writer know the current extruder_id, but ignore the generated G-code.
|
// Let the m_writer know the current extruder_id, but ignore the generated G-code.
|
||||||
// unsigned int current_extruder_id = tcr.extrusions.back().tool;
|
// unsigned int current_extruder_id = tcr.extrusions.back().tool;
|
||||||
// gcodegen.writer().toolchange(current_extruder_id);
|
// gcodegen.writer().toolchange(current_extruder_id);
|
||||||
// gcodegen.placeholder_parser().set("current_extruder", current_extruder_id);
|
// gcodegen.placeholder_parser().set("current_extruder", current_extruder_id);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// A phony move to the end position at the wipe tower.
|
|
||||||
/* gcodegen.writer().travel_to_xy(Vec2d(m_priming.back().end_pos.x, m_priming.back().end_pos.y));
|
|
||||||
gcodegen.set_last_pos(wipe_tower_point_to_object_point(gcodegen, m_priming.back().end_pos));
|
|
||||||
// Prepare a future wipe.
|
|
||||||
gcodegen.m_wipe.path.points.clear();
|
|
||||||
// Start the wipe at the current position.
|
|
||||||
gcodegen.m_wipe.path.points.emplace_back(wipe_tower_point_to_object_point(gcodegen, m_priming.back().end_pos));
|
|
||||||
// Wipe end point: Wipe direction away from the closer tower edge to the further tower edge.
|
|
||||||
gcodegen.m_wipe.path.points.emplace_back(wipe_tower_point_to_object_point(gcodegen,
|
|
||||||
WipeTower::xy((std::abs(m_left - m_priming.back().end_pos.x) < std::abs(m_right - m_priming.back().end_pos.x)) ? m_right : m_left,
|
|
||||||
m_priming.back().end_pos.y)));*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A phony move to the end position at the wipe tower.
|
||||||
|
/* gcodegen.writer().travel_to_xy(Vec2d(m_priming.back().end_pos.x, m_priming.back().end_pos.y));
|
||||||
|
gcodegen.set_last_pos(wipe_tower_point_to_object_point(gcodegen, m_priming.back().end_pos));
|
||||||
|
// Prepare a future wipe.
|
||||||
|
gcodegen.m_wipe.path.points.clear();
|
||||||
|
// Start the wipe at the current position.
|
||||||
|
gcodegen.m_wipe.path.points.emplace_back(wipe_tower_point_to_object_point(gcodegen, m_priming.back().end_pos));
|
||||||
|
// Wipe end point: Wipe direction away from the closer tower edge to the further tower edge.
|
||||||
|
gcodegen.m_wipe.path.points.emplace_back(wipe_tower_point_to_object_point(gcodegen,
|
||||||
|
WipeTower::xy((std::abs(m_left - m_priming.back().end_pos.x) < std::abs(m_right - m_priming.back().end_pos.x)) ? m_right : m_left,
|
||||||
|
m_priming.back().end_pos.y)));*/
|
||||||
|
|
||||||
return gcode;
|
return gcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user