fix bug where drill was using G0

This commit is contained in:
Stewart Allen 2023-06-20 14:05:07 -04:00
commit 1b0ee2a953
2 changed files with 3 additions and 4 deletions

View file

@ -169,8 +169,8 @@ function prepEach(widget, settings, print, firstPoint, update) {
toolDiamMove = toolType === 'endmill' ? toolDiam : tolerance * 2;
lastTool = toolID;
}
feedRate = feed || feedRate;
plungeRate = Math.min(feedRate, plunge || plungeRate || feedRate);
feedRate = feed || feedRate || plunge;
plungeRate = Math.min(feedRate || plunge, plunge || plungeRate || feedRate);
}
function setLasering(bool, power = 0) {
@ -253,7 +253,7 @@ function prepEach(widget, settings, print, firstPoint, update) {
* @param {number} [tool] tool
*/
function layerPush(point, emit, speed, tool) {
const dz = lastPush ? point.z - lastPush.point.z : 0;
const dz = (point && lastPush && lastPush.point) ? point.z - lastPush.point.z : 0;
if (dz < 0 && speed > plungeRate) {
speed = plungeRate;
}