Skip to content

Commit

Permalink
remove e reset for nematx firmware (overextrusion issues)
Browse files Browse the repository at this point in the history
  • Loading branch information
supermerill committed Aug 19, 2024
1 parent 4e75b30 commit df1bfd3
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/libslic3r/GCode/GCodeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,18 @@ std::string GCodeWriter::write_acceleration(){

std::string GCodeWriter::reset_e(bool force)
{

if (FLAVOR_IS(gcfNematX)) {
// currently, reset the E can lead to overextrusion. So it's disabled for now.
return "";
//double retract_length = m_tool->retract_length();
//m_tool->reset_E(retract_length);
//std::string gcode = m_extrusion_axis + std::string("[SET_POSITION POS=") + std::to_string(retract_length) + std::string("]");
//if (this->config.gcode_comments) gcode += " ; reset extrusion distance";
//gcode +="\n";
//return gcode;
}

this->m_de_left = 0;

if (FLAVOR_IS(gcfMach3)
Expand All @@ -440,15 +452,6 @@ std::string GCodeWriter::reset_e(bool force)
return "";
}

if (FLAVOR_IS(gcfNematX)) {
double retract_length = m_tool->retract_length();
m_tool->reset_E(retract_length);
std::string gcode = m_extrusion_axis + std::string("[SET_POSITION POS=") + std::to_string(retract_length) + std::string("]");
if (this->config.gcode_comments) gcode += " ; reset extrusion distance";
gcode +="\n";
return gcode;
}

if (! m_extrusion_axis.empty() && ! this->config.use_relative_e_distances) {
std::ostringstream gcode;
gcode << "G92 " << m_extrusion_axis << "0";
Expand Down

0 comments on commit df1bfd3

Please sign in to comment.