prevent short z delta cuts outside of contouring

This commit is contained in:
Stewart Allen 2020-11-21 21:04:25 -05:00
commit cc23ec6efe
2 changed files with 7 additions and 6 deletions

View file

@ -60,8 +60,6 @@
# CAM
* `B` increase tab height by z bottom
* `B` prevent z delta cuts when not contouring
* `B` climb vs conventional not fully consistent after refactor
* `B` outside cutting direction in roughing mode inverted
* `B` clear voids has double interior pass because wrong offset shadow used

View file

@ -239,10 +239,12 @@
return;
}
// convert short planar moves to cuts
// TODO delta Z cuts should only be active in contouring
// convert short planar moves to cuts in some cases
if (isMove && deltaXY <= toolDiamMove) {
if (absDeltaZ <= tolerance) {
let iscontour = lastMode === PRO.CONTOUR_X || lastMode === PRO.CONTOUR_Y;
let isflat = absDeltaZ < 0.001;
// restrict this to contouring
if (isflat || (iscontour && absDeltaZ <= tolerance)) {
cut = 1;
isMove = false;
} else if (deltaZ <= -tolerance) {
@ -251,7 +253,8 @@
// new pos for plunge calc
deltaXY = 0;
}
} else {
} //else
{
// for longer moves, check the terrain to see if we need to go up and over
const bigXY = (deltaXY > toolDiam);
const bigZ = (deltaZ > toolDiam/2 && deltaXY > tolerance);