fix short travel moves with bounds
This commit is contained in:
parent
14f66061a8
commit
eaf941d29a
1 changed files with 3 additions and 2 deletions
|
|
@ -434,6 +434,7 @@ export async function prepare_one(widget, settings, print, firstPoint, update) {
|
||||||
deltaZ = point.z - printPoint.z,
|
deltaZ = point.z - printPoint.z,
|
||||||
absDeltaZ = Math.abs(deltaZ),
|
absDeltaZ = Math.abs(deltaZ),
|
||||||
isMove = (emit === 0 || emit === false),
|
isMove = (emit === 0 || emit === false),
|
||||||
|
hasBounds = (travelBounds || lastTravelBounds),
|
||||||
upAndOver = false;
|
upAndOver = false;
|
||||||
|
|
||||||
// contouring logic
|
// contouring logic
|
||||||
|
|
@ -460,7 +461,7 @@ export async function prepare_one(widget, settings, print, firstPoint, update) {
|
||||||
newLayer();
|
newLayer();
|
||||||
} else
|
} else
|
||||||
// convert short planar moves to cuts when not lasering
|
// convert short planar moves to cuts when not lasering
|
||||||
if (isMove && deltaXY <= shortCut && deltaZ <= 0 && !lasering) {
|
if (isMove && !hasBounds && deltaXY <= shortCut && deltaZ <= 0 && !lasering) {
|
||||||
// but only if the z plunge is not too far
|
// but only if the z plunge is not too far
|
||||||
if (absDeltaZ < 0.01 || (tolerance > 0 && absDeltaZ <= tolerance)) {
|
if (absDeltaZ < 0.01 || (tolerance > 0 && absDeltaZ <= tolerance)) {
|
||||||
if (debug) console.log('shortcut', { deltaXY, deltaZ, shortCut });
|
if (debug) console.log('shortcut', { deltaXY, deltaZ, shortCut });
|
||||||
|
|
@ -484,7 +485,7 @@ export async function prepare_one(widget, settings, print, firstPoint, update) {
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
// check move against a known boundary (pocketing)
|
// check move against a known boundary (pocketing)
|
||||||
if (isMove && (travelBounds || lastTravelBounds)) {
|
if (isMove && hasBounds) {
|
||||||
// travel boundary "hangover" from last area op when traveling between
|
// travel boundary "hangover" from last area op when traveling between
|
||||||
let check = [];
|
let check = [];
|
||||||
if (travelBounds) check.push(...travelBounds);
|
if (travelBounds) check.push(...travelBounds);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue