change ease down behavior. no longer use step down to lift Z
This commit is contained in:
parent
bde9080f43
commit
2519bec95d
3 changed files with 10 additions and 3 deletions
|
|
@ -466,7 +466,7 @@ class OpRough extends CamOp {
|
||||||
sliceOutput(sliceOut, {
|
sliceOutput(sliceOut, {
|
||||||
cutdir,
|
cutdir,
|
||||||
depthFirst,
|
depthFirst,
|
||||||
easeDown: op.down && easeDown ? op.down : 0,
|
easeDown: op.down && easeDown ? 0.001 : 0,
|
||||||
progress: (n,m) => progress(n/m, "routing")
|
progress: (n,m) => progress(n/m, "routing")
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -725,7 +725,7 @@ class OpOutline extends CamOp {
|
||||||
.sort((a,b) => { return a.area() - b.area() })[0]
|
.sort((a,b) => { return a.area() - b.area() })[0]
|
||||||
.average();
|
.average();
|
||||||
// experimental start of ease down
|
// experimental start of ease down
|
||||||
let ease = op.down && easeDown ? op.down : 0;
|
let ease = op.down && easeDown ? 0.001 : 0;
|
||||||
printPoint = depthOutlinePath(printPoint, 0, flatLevels, toolDiam, polyEmit, false, ease);
|
printPoint = depthOutlinePath(printPoint, 0, flatLevels, toolDiam, polyEmit, false, ease);
|
||||||
printPoint = depthOutlinePath(printPoint, 0, flatLevels, toolDiam, polyEmit, true, ease);
|
printPoint = depthOutlinePath(printPoint, 0, flatLevels, toolDiam, polyEmit, true, ease);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -568,6 +568,12 @@ function prepEach(widget, settings, print, firstPoint, update) {
|
||||||
newLayer();
|
newLayer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// prepare
|
||||||
|
// sliceOutput
|
||||||
|
// depthRoughPath
|
||||||
|
// poly2polyEmit
|
||||||
|
// roughTopEmit
|
||||||
|
// poly2polyEmit
|
||||||
function polyEmit(poly, index, count, fromPoint) {
|
function polyEmit(poly, index, count, fromPoint) {
|
||||||
let last = null;
|
let last = null;
|
||||||
// scale speed of first cutting poly since it engages the full bit
|
// scale speed of first cutting poly since it engages the full bit
|
||||||
|
|
|
||||||
|
|
@ -1172,7 +1172,7 @@ function slicePrintPath(print, slice, startPoint, offset, output, opt = {}) {
|
||||||
raft = opt.raft || false,
|
raft = opt.raft || false,
|
||||||
flow = opt.flow || 1,
|
flow = opt.flow || 1,
|
||||||
near = opt.near || (antiBacklash ? false : true),
|
near = opt.near || (antiBacklash ? false : true),
|
||||||
fast = opt.fast || false,
|
fast = opt.fast || false, // support infill only!
|
||||||
fill = (opt.fill >= 0 ? opt.fill : fillMult) * flow,
|
fill = (opt.fill >= 0 ? opt.fill : fillMult) * flow,
|
||||||
thinDist = near ? thinWall : thinWall;
|
thinDist = near ? thinWall : thinWall;
|
||||||
|
|
||||||
|
|
@ -1192,6 +1192,7 @@ function slicePrintPath(print, slice, startPoint, offset, output, opt = {}) {
|
||||||
t2 = lines[i+1];
|
t2 = lines[i+1];
|
||||||
let d1 = t1.distToSq2D(startPoint);
|
let d1 = t1.distToSq2D(startPoint);
|
||||||
let d2 = t2.distToSq2D(startPoint);
|
let d2 = t2.distToSq2D(startPoint);
|
||||||
|
// penalize next nearest point if it's not on an adjacent line
|
||||||
let idiff = startPoint.index ? Math.abs(startPoint.index - t1.index) : 1;
|
let idiff = startPoint.index ? Math.abs(startPoint.index - t1.index) : 1;
|
||||||
let min = Math.min(d1, d2) * (idiff !== 1 ? 10 : 1);
|
let min = Math.min(d1, d2) * (idiff !== 1 ? 10 : 1);
|
||||||
if (min < mindist) {
|
if (min < mindist) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue