optimize outside only outlining. disable synth plunge (for now)
This commit is contained in:
parent
de6f1f8743
commit
7501fed121
2 changed files with 17 additions and 2 deletions
|
|
@ -94,6 +94,7 @@
|
|||
lastMode,
|
||||
lastPoint,
|
||||
nextIsMove = true,
|
||||
synthPlunge = false,
|
||||
spindle = 0,
|
||||
spindleMax = device.spindleMax,
|
||||
addOutput = print.addOutput,
|
||||
|
|
@ -293,7 +294,7 @@
|
|||
}
|
||||
|
||||
// synth new plunge rate
|
||||
if (deltaZ <= -tolerance) {
|
||||
if (synthPlunge && deltaZ <= -tolerance) {
|
||||
let threshold = Math.min(deltaXY / 2, absDeltaZ),
|
||||
modifier = threshold / absDeltaZ;
|
||||
if (threshold && modifier && deltaXY > tolerance) {
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@
|
|||
let tslices = [];
|
||||
let tshadow = [];
|
||||
let tzindex = slicer.interval(minStepDown, { fit: true, off: 0.01, down: true, flats: true });
|
||||
let skipTerrain = !(procRough || procOutline) && tzindex.length > 50;
|
||||
let skipTerrain = !(procRough || procOutlineIn) && tzindex.length > 50;
|
||||
|
||||
if (skipTerrain) {
|
||||
console.log("skipping terrain generation for speed");
|
||||
|
|
@ -397,6 +397,20 @@
|
|||
.filter(v => v > 0 && indices.indexOf(v) < 0);
|
||||
indices = indices.appendAll(flats).sort((a,b) => b-a);
|
||||
// console.log('indices', ...indices, {zBottom, slicer});
|
||||
if (procOutlineOut && !procOutlineIn) {
|
||||
console.log({outline_bypass: indices, outlineDown});
|
||||
indices.forEach((ind,i) => {
|
||||
if (flats.indexOf(ind) >= 0) {
|
||||
// exclude flats
|
||||
return;
|
||||
}
|
||||
let slice = newSlice(ind);
|
||||
slice.camMode = PRO.OUTLINE;
|
||||
slice.shadow = shadow.clone(true);
|
||||
slices.push(slice);
|
||||
updateOp(i, indices.length);
|
||||
});
|
||||
} else
|
||||
slicer.slice(indices, { each: (data, index, total) => {
|
||||
shadow = POLY.union(shadow.slice().appendAll(data.tops), 0.01, true);
|
||||
if (flats.indexOf(data.z) >= 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue