Skip to content

Commit

Permalink
* fixes, including the project loading problem for width & spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
supermerill committed Feb 11, 2024
2 parents 4441a85 + 73c0315 commit a0bed03
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/libslic3r/GCode/FanMover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,17 +442,20 @@ void FanMover::_process_gcode_line(GCodeReader& reader, const GCodeReader::GCode
if (line.has(Axis::E)) {
new_data.e = reader.e();
if (relative_e) {
assert(new_data.e == 0);
new_data.de = line.e();
// GCode reader doesn't know it's relative extrusion, we have to do it ourself.
//assert(new_data.e == 0);
new_data.e = 0;
} else
new_data.de = line.dist_E(reader);
}
assert(new_data.dx == 0 || reader.x() == new_data.x);
assert(new_data.dx == 0 || reader.x() + new_data.dx == line.x());
assert(new_data.dy == 0 ||reader.y() == new_data.y);
assert(new_data.dy == 0 || reader.y() + new_data.dy == line.y());
assert(new_data.de == 0 || reader.e() == new_data.e);
assert(new_data.de == 0 || reader.e() + new_data.de == line.e());
assert(new_data.dx == 0 || std::abs(reader.x() + new_data.dx - line.x()) < 0.00001f);
assert(new_data.dy == 0 || reader.y() == new_data.y);
assert(new_data.dy == 0 || std::abs(reader.y() + new_data.dy - line.y()) < 0.00001f);
assert(new_data.de == 0 || (relative_e?0:reader.e()) == new_data.e);
assert(new_data.de == 0 || std::abs((relative_e?0.f:reader.e()) + new_data.de - line.e()) < 0.00001f);
//assert(new_data.de == 0 ||(relative_e?0.f:reader.e()) + new_data.de == line.e());

if (m_current_kickstart.time > 0 && time > 0) {
m_current_kickstart.time -= time;
Expand Down

0 comments on commit a0bed03

Please sign in to comment.