decrease cutting speed when entire tool is engaged in roughing

This commit is contained in:
Stewart Allen 2023-02-23 22:12:01 -05:00
commit aedf73ba95
3 changed files with 7 additions and 5 deletions

View file

@ -111,7 +111,6 @@
* `P` log Z interpolation for contour XYZ moves
* `P` option to start with the smallest poly by area on layer change
* `P` refactor slicing engine to add minion threading
* `P` decrease cutting speed when entire tool is engaged (start of roughing, rest machining)
* `P` port arc code from FDM export to CAM export
* `P` redo all path route / planning in prepare to account for terrain before camOut

View file

@ -6,6 +6,7 @@ Full docs @ https://docs.grid.space/projects/kiri-moto
# Release 3.9
* more graceful handling of security contexts blocking SharedArrayBuffer
* CAM decrease cutting speed when entire tool is engaged in roughing
* CAM add dogbones support to traces ops
* CAM add scripted contour filtering (to be extended to other ops)
* CAM add calculation of taper length from angle

View file

@ -100,6 +100,7 @@ function prepEach(widget, settings, print, firstPoint, update) {
layerOut = [],
printPoint,
isNewMode,
isRough,
isLathe,
tool,
toolType,
@ -294,7 +295,7 @@ function prepEach(widget, settings, print, firstPoint, update) {
);
}
function camOut(point, cut, moveLen = toolDiamMove) {
function camOut(point, cut, moveLen = toolDiamMove, factor = 1) {
point = point.clone();
point.x += wmx;
point.y += wmy;
@ -311,7 +312,7 @@ function prepEach(widget, settings, print, firstPoint, update) {
nextIsMove = false;
}
let rate = feedRate;
let rate = feedRate * factor;
// before first point, move cutting head to point above it
// then set that new point as the lastPoint
@ -467,6 +468,7 @@ function prepEach(widget, settings, print, firstPoint, update) {
nextIsMove = true;
currentOp = op.op;
isLathe = currentOp.type === 'lathe';
isRough = currentOp.type === 'rough';
let weight = op.weight();
newLayer(op.op);
op.prepare(ops, (progress, message) => {
@ -493,12 +495,12 @@ function prepEach(widget, settings, print, firstPoint, update) {
let last = null;
if (easeDown && poly.isClosed()) {
last = poly.forEachPointEaseDown(function(point, offset) {
camOut(point.clone(), offset > 0);
camOut(point.clone(), offset > 0, undefined, isRough && count === 1 ? 0.5 : 1);
}, fromPoint);
} else {
poly.forEachPoint(function(point, pidx, points, offset) {
last = point;
camOut(point.clone(), offset !== 0);
camOut(point.clone(), offset !== 0, undefined, isRough && count === 1 ? 0.5 : 1);
}, poly.isClosed(), index);
}
newLayer();