diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index b56ef7994..358656b17 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -2504,6 +2504,14 @@ GCode::LayerResult GCode::process_layer( gcode += "; open powerlost recovery\n"; gcode += "M1003 S1\n"; } + // BBS: open first layer inspection at second layer + if (print.config().scan_first_layer.value) { + // BBS: retract first to avoid droping when scan model + gcode += this->retract(); + gcode += "M976 S1 P1 ; scan model before printing 2nd layer\n"; + gcode += "M400 P100\n"; + gcode += this->unretract(); + } //BBS: reset acceleration at sencond layer if (m_config.default_acceleration.value > 0 && m_config.initial_layer_acceleration.value > 0) { @@ -3025,18 +3033,6 @@ GCode::LayerResult GCode::process_layer( file.write(gcode); #endif - // BBS: scan model after print first layer - // Note: for sequential printing, every object will have this - if (print.config().scan_first_layer.value) { - if (first_layer) { - //BBS: retract first to avoid droping when scan model - gcode += this->retract(); - gcode += "M976 S1 P1 ; scan model after print first layer\n"; - gcode += "M400 P100\n"; - gcode += this->unretract(); - } - } - BOOST_LOG_TRIVIAL(trace) << "Exported layer " << layer.id() << " print_z " << print_z << log_memory_info();