adding ztOff is breaking some cases with z anchor not set to top

This commit is contained in:
Stewart Allen 2022-02-14 13:44:54 -05:00
commit fb603a53e5

View file

@ -288,7 +288,7 @@
const bigXY = (deltaXY > moveLen); const bigXY = (deltaXY > moveLen);
const bigZ = (deltaZ > toolDiam/2 && deltaXY > tolerance); const bigZ = (deltaZ > toolDiam/2 && deltaXY > tolerance);
const midZ = (absDeltaZ >= tolerance); const midZ = (absDeltaZ >= tolerance);
if ((bigXY || bigZ) && (isMove || midZ)) { if ((bigXY || bigZ) && midZ) {
let maxz = getZClearPath( let maxz = getZClearPath(
terrain, terrain,
lastPoint.x - wmx, lastPoint.x - wmx,
@ -299,7 +299,7 @@
zadd, zadd,
maxToolDiam/2, maxToolDiam/2,
zclear zclear
) + ztOff, ),
mustGoUp = Math.max(maxz - point.z, maxz - lastPoint.z) >= tolerance, mustGoUp = Math.max(maxz - point.z, maxz - lastPoint.z) >= tolerance,
clearz = maxz; clearz = maxz;
// up if any point between higher than start/outline, go up first // up if any point between higher than start/outline, go up first