Fixed a regression issue to PrusaSlicer 2.1.1

Custom printer with center of bed at 0,0 results in "toolpath outside print area" #3510
The G92 A0 B0 was incorrectly considered to be equal to just G92
to reset all axes.
This commit is contained in:
bubnikv 2020-03-21 10:09:33 +01:00
parent 1cbb822dd7
commit 046f0dbfa2
4 changed files with 22 additions and 5 deletions

View file

@ -444,8 +444,10 @@ void GCodeAnalyzer::_processG92(const GCodeReader::GCodeLine& line)
anyFound = true;
}
if (!anyFound)
if (!anyFound && ! line.has_unknown_axis())
{
// The G92 may be called for axes that PrusaSlicer does not recognize, for example see GH issue #3510,
// where G92 A0 B0 is called although the extruder axis is till E.
for (unsigned char a = X; a < Num_Axis; ++a)
{
_set_axis_origin((EAxis)a, _get_axis_position((EAxis)a));