|
|
@ -140,7 +140,7 @@
|
|
|
|
// Note: There is no Z Correction in this case. We are off the grid and don't know what
|
|
|
|
// Note: There is no Z Correction in this case. We are off the grid and don't know what
|
|
|
|
// a reasonable correction would be.
|
|
|
|
// a reasonable correction would be.
|
|
|
|
|
|
|
|
|
|
|
|
planner._buffer_line(end[X_AXIS], end[Y_AXIS], end[Z_AXIS] + state.z_offset, end[E_AXIS], feed_rate, extruder);
|
|
|
|
planner._buffer_line(end[X_AXIS], end[Y_AXIS], end[Z_AXIS], end[E_AXIS], feed_rate, extruder);
|
|
|
|
set_current_to_destination();
|
|
|
|
set_current_to_destination();
|
|
|
|
|
|
|
|
|
|
|
|
if (g26_debug_flag)
|
|
|
|
if (g26_debug_flag)
|
|
|
@ -184,7 +184,7 @@
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
if (isnan(z0)) z0 = 0.0;
|
|
|
|
if (isnan(z0)) z0 = 0.0;
|
|
|
|
|
|
|
|
|
|
|
|
planner._buffer_line(end[X_AXIS], end[Y_AXIS], end[Z_AXIS] + z0 + state.z_offset, end[E_AXIS], feed_rate, extruder);
|
|
|
|
planner._buffer_line(end[X_AXIS], end[Y_AXIS], end[Z_AXIS] + z0, end[E_AXIS], feed_rate, extruder);
|
|
|
|
|
|
|
|
|
|
|
|
if (g26_debug_flag)
|
|
|
|
if (g26_debug_flag)
|
|
|
|
debug_current_and_destination(PSTR("FINAL_MOVE in ubl.line_to_destination()"));
|
|
|
|
debug_current_and_destination(PSTR("FINAL_MOVE in ubl.line_to_destination()"));
|
|
|
@ -289,7 +289,7 @@
|
|
|
|
z_position = end[Z_AXIS];
|
|
|
|
z_position = end[Z_AXIS];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
planner._buffer_line(x, y, z_position + z0 + state.z_offset, e_position, feed_rate, extruder);
|
|
|
|
planner._buffer_line(x, y, z_position + z0, e_position, feed_rate, extruder);
|
|
|
|
} //else printf("FIRST MOVE PRUNED ");
|
|
|
|
} //else printf("FIRST MOVE PRUNED ");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -354,7 +354,7 @@
|
|
|
|
z_position = end[Z_AXIS];
|
|
|
|
z_position = end[Z_AXIS];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
planner._buffer_line(x, y, z_position + z0 + state.z_offset, e_position, feed_rate, extruder);
|
|
|
|
planner._buffer_line(x, y, z_position + z0, e_position, feed_rate, extruder);
|
|
|
|
} //else printf("FIRST MOVE PRUNED ");
|
|
|
|
} //else printf("FIRST MOVE PRUNED ");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -417,7 +417,7 @@
|
|
|
|
e_position = end[E_AXIS];
|
|
|
|
e_position = end[E_AXIS];
|
|
|
|
z_position = end[Z_AXIS];
|
|
|
|
z_position = end[Z_AXIS];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
planner._buffer_line(x, next_mesh_line_y, z_position + z0 + state.z_offset, e_position, feed_rate, extruder);
|
|
|
|
planner._buffer_line(x, next_mesh_line_y, z_position + z0, e_position, feed_rate, extruder);
|
|
|
|
current_yi += dyi;
|
|
|
|
current_yi += dyi;
|
|
|
|
yi_cnt--;
|
|
|
|
yi_cnt--;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -446,7 +446,7 @@
|
|
|
|
z_position = end[Z_AXIS];
|
|
|
|
z_position = end[Z_AXIS];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
planner._buffer_line(next_mesh_line_x, y, z_position + z0 + state.z_offset, e_position, feed_rate, extruder);
|
|
|
|
planner._buffer_line(next_mesh_line_x, y, z_position + z0, e_position, feed_rate, extruder);
|
|
|
|
current_xi += dxi;
|
|
|
|
current_xi += dxi;
|
|
|
|
xi_cnt--;
|
|
|
|
xi_cnt--;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -592,8 +592,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
if (!state.active || above_fade_height) { // no mesh leveling
|
|
|
|
if (!state.active || above_fade_height) { // no mesh leveling
|
|
|
|
|
|
|
|
|
|
|
|
const float z_offset = state.active ? state.z_offset : 0.0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
do {
|
|
|
|
do {
|
|
|
|
|
|
|
|
|
|
|
|
if (--segments) { // not the last segment
|
|
|
|
if (--segments) { // not the last segment
|
|
|
@ -608,7 +606,7 @@
|
|
|
|
seg_le = ltarget[E_AXIS];
|
|
|
|
seg_le = ltarget[E_AXIS];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ubl_buffer_segment_raw( seg_rx, seg_ry, seg_rz + z_offset, seg_le, feedrate );
|
|
|
|
ubl_buffer_segment_raw( seg_rx, seg_ry, seg_rz, seg_le, feedrate );
|
|
|
|
|
|
|
|
|
|
|
|
} while (segments);
|
|
|
|
} while (segments);
|
|
|
|
|
|
|
|
|
|
|
@ -685,8 +683,6 @@
|
|
|
|
z_cxcy *= fade_scaling_factor; // apply fade factor to interpolated mesh height
|
|
|
|
z_cxcy *= fade_scaling_factor; // apply fade factor to interpolated mesh height
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
z_cxcy += state.z_offset; // add fixed mesh offset from G29 Z
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (--segments == 0) { // if this is last segment, use ltarget for exact
|
|
|
|
if (--segments == 0) { // if this is last segment, use ltarget for exact
|
|
|
|
seg_rx = RAW_X_POSITION(ltarget[X_AXIS]);
|
|
|
|
seg_rx = RAW_X_POSITION(ltarget[X_AXIS]);
|
|
|
|
seg_ry = RAW_Y_POSITION(ltarget[Y_AXIS]);
|
|
|
|
seg_ry = RAW_Y_POSITION(ltarget[Y_AXIS]);
|
|
|
|