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

@ -1474,7 +1474,6 @@ class OpDrill extends CamOp {
let { op, state } = this;
let { settings, widget, addSlices, updateToolDiams } = state;
let { setTool, setSpindle, setDrill, emitDrills } = ops;
setTool(op.tool, undefined, op.rate);
setDrill(op.down, op.lift, op.dwell);
setSpindle(op.spindle);

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;
}