fix rough top using wrong shadow and master shadow missing some thin flats
This commit is contained in:
parent
94eb2807c1
commit
b8184994d3
3 changed files with 10 additions and 2 deletions
1
notes.md
1
notes.md
|
|
@ -60,6 +60,7 @@
|
||||||
|
|
||||||
# CAM
|
# CAM
|
||||||
|
|
||||||
|
* `B` increase tab height by z bottom
|
||||||
* `B` prevent z delta cuts when not contouring
|
* `B` prevent z delta cuts when not contouring
|
||||||
* `B` climb vs conventional not fully consistent after refactor
|
* `B` climb vs conventional not fully consistent after refactor
|
||||||
* `B` outside cutting direction in roughing mode inverted
|
* `B` outside cutting direction in roughing mode inverted
|
||||||
|
|
|
||||||
|
|
@ -399,6 +399,13 @@
|
||||||
array.push(opt.down ? zmax : zmin);
|
array.push(opt.down ? zmax : zmin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (opt.flats && opt.off) {
|
||||||
|
// add over and under all flats by 'off'
|
||||||
|
array.appendAll(Object.keys(this.zFlat).map(v => parseFloat(v))).sort((a,b) => {
|
||||||
|
return opt.down ? b-a : a-b;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return array.map(v => parseFloat(v.toFixed(2)));
|
return array.map(v => parseFloat(v.toFixed(2)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@
|
||||||
});
|
});
|
||||||
let tslices = [];
|
let tslices = [];
|
||||||
let tshadow = [];
|
let tshadow = [];
|
||||||
let tzindex = slicer.interval(minStepDown, { fit: true, off: 0.01, down: true });
|
let tzindex = slicer.interval(minStepDown, { fit: true, off: 0.01, down: true, flats: true });
|
||||||
let terrain = slicer.slice(tzindex, { each: (data, index, total) => {
|
let terrain = slicer.slice(tzindex, { each: (data, index, total) => {
|
||||||
tshadow = POLY.union(tshadow.appendAll(data.tops), 0.01, true);
|
tshadow = POLY.union(tshadow.appendAll(data.tops), 0.01, true);
|
||||||
tslices.push(data.slice);
|
tslices.push(data.slice);
|
||||||
|
|
@ -146,7 +146,7 @@
|
||||||
|
|
||||||
// create facing slices
|
// create facing slices
|
||||||
if (procFacing || proc.camRoughTop) {
|
if (procFacing || proc.camRoughTop) {
|
||||||
let shadow = shadowTop.tops.clone();
|
let shadow = tshadow.clone();
|
||||||
let inset = POLY.offset(shadow, (roughToolDiam / (procRoughIn ? 2 : 1)));
|
let inset = POLY.offset(shadow, (roughToolDiam / (procRoughIn ? 2 : 1)));
|
||||||
let facing = POLY.offset(inset, -(roughToolDiam * proc.camRoughOver), { count: 999, flat: true });
|
let facing = POLY.offset(inset, -(roughToolDiam * proc.camRoughOver), { count: 999, flat: true });
|
||||||
let zdiv = ztOff / roughDown;
|
let zdiv = ztOff / roughDown;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue