Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/kiri/mode/cam/work/prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,16 @@ export async function prepare_one(widget, settings, print, firstPoint, update) {
}
}
lastTravelBounds = undefined;

// Retract if moving longer distances across stock within pocket bounds
if (!upAndOver && deltaXY > shortCut && (camForceZMax || printPoint.z < stockZ || point.z < stockZ)) {
// For longer travel moves within bounds that pass below stock height (or if force Z max is set),
// trigger an up-and-over retract to zSafe to avoid plowing through uncleared stock at G0.
//
// A future improvement might add an option for a stepdown-height
// Z-hop for in-stock travel moves as an alternative to full zSafe clearance retracts.
upAndOver = "in-stock";
}
} else
// for longer moves
if (isMove) {
Expand Down