fix triple inner offset in roughing voids. fix stock bounds on cam toggle in preview
This commit is contained in:
parent
76d2ad5530
commit
624f87d044
5 changed files with 29 additions and 15 deletions
7
notes.md
7
notes.md
|
|
@ -2,9 +2,8 @@
|
|||
|
||||
## 2.3 remaining
|
||||
* adaptive shadow-line generation for small parts collision detection
|
||||
* step down should interpolate top/bottom again
|
||||
* clear voids broken again
|
||||
* fix contour up and over thru holes
|
||||
* step down needs to go all the way to the bottom (always)
|
||||
* add clear flats to roughing
|
||||
* path arrows, retracts, and engages
|
||||
* cap path ends
|
||||
* help dialog
|
||||
|
|
@ -60,6 +59,8 @@
|
|||
|
||||
* `B` contouring should extend beyond part boundaries by tool radius
|
||||
* `B` outside cutting direction in roughing mode inverted
|
||||
* `B` clear voids has double interior pass because wrong offset shadow used
|
||||
* `B` fix contour up and over thru holes by adding (union) tabs to shadow
|
||||
* `F` flat and volumetric rendering of paths
|
||||
* `F` z bounded slices (extension of z bottom offset feature)
|
||||
* `F` z planar settings visualizations
|
||||
|
|
|
|||
|
|
@ -55,11 +55,14 @@
|
|||
layers: [ ],
|
||||
view: view.newGroup(),
|
||||
add: function(layer) {
|
||||
const nuview = stack.view.newGroup();
|
||||
stack.layers.push(nuview);
|
||||
render(layer, nuview, name);
|
||||
const lview = stack.view.newGroup();
|
||||
stack.layers.push(lview);
|
||||
render(layer, lview, name);
|
||||
tallest = Math.max(tallest, stack.layers.length);
|
||||
},
|
||||
remove: function() {
|
||||
view.remove(stack.view);
|
||||
},
|
||||
clear: function() {
|
||||
view.remove(stack.view);
|
||||
}
|
||||
|
|
@ -67,6 +70,14 @@
|
|||
return stack;
|
||||
}
|
||||
|
||||
function remove(name) {
|
||||
const stack = stacks[name];
|
||||
if (stack) {
|
||||
stack.remove();
|
||||
delete stacks[name];
|
||||
}
|
||||
}
|
||||
|
||||
function getRange() {
|
||||
return {min, max, tallest};
|
||||
}
|
||||
|
|
@ -258,6 +269,7 @@
|
|||
KIRI.stacks = {
|
||||
clear,
|
||||
create,
|
||||
remove,
|
||||
getStack,
|
||||
getRange,
|
||||
setRange
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@
|
|||
const SPACE = API.const.SPACE;
|
||||
const STACKS = API.const.STACKS;
|
||||
|
||||
STACKS.remove('bounds');
|
||||
if (isCamMode && isArrange) {
|
||||
STACKS.clear();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -204,12 +204,9 @@
|
|||
|
||||
nextOp();
|
||||
slices.forEach((slice, index) => {
|
||||
// let shadow = slice.shadow;
|
||||
let offset = [shell.clone(true),slice.shadow.clone(true)].flat();
|
||||
let flat = POLY.flatten(offset, [], true);
|
||||
let nest = POLY.setZ(POLY.nest(flat), slice.z);
|
||||
// slice.tops[0].inner = nest;
|
||||
// slice.tops[0].inner = POLY.setZ(shell.clone(true), slice.z);
|
||||
|
||||
// inset offset array by 1/2 diameter then by tool overlap %
|
||||
offset = POLY.offset(nest, [-(roughToolDiam / 2 + camRoughStock), -roughToolDiam * proc.camRoughOver], {
|
||||
|
|
@ -231,7 +228,7 @@
|
|||
|
||||
// add outside pass if not inside only
|
||||
if (!insideOnly) {
|
||||
const outside = POLY.offset(shadow, roughToolDiam * proc.camRoughOver, {z: slice.z});
|
||||
const outside = POLY.offset(shadow.clone(), roughToolDiam * proc.camRoughOver, {z: slice.z});
|
||||
if (outside) {
|
||||
offset.appendAll(outside);
|
||||
if (addTabsOutline && slice.z <= zMin + tabHeight) {
|
||||
|
|
@ -243,11 +240,14 @@
|
|||
if (!offset) return;
|
||||
|
||||
slice.camLines = offset;
|
||||
// if (true) slice.output()
|
||||
// .setLayer("top shadow", {line: 0x0000aa})
|
||||
// .addPolys(tshadow)
|
||||
// .setLayer("rough shadow", {line: 0x00aa00})
|
||||
// .addPolys(shadow)
|
||||
// .setLayer("rough shell", {line: 0xaa0000})
|
||||
// .addPolys(shell);
|
||||
slice.output()
|
||||
// .setLayer("rough shadow", {line: 0x00aa00})
|
||||
// .addPolys(shadow)
|
||||
// .setLayer("rough shell", {line: 0xaa0000})
|
||||
// .addPolys(shell)
|
||||
.setLayer("roughing", {face: 0, line: 0})
|
||||
.addPolys(offset);
|
||||
updateOp(index, slices.length);
|
||||
|
|
|
|||
|
|
@ -1005,7 +1005,7 @@ th, tr, td, label {
|
|||
white-space: nowrap;
|
||||
flex-direction: column;
|
||||
transform: translateY(-50%);
|
||||
background-color: rgba(255,255,255,0.5);
|
||||
background-color: rgba(255,255,255,0.8);
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 5px;
|
||||
margin-right: 5px;
|
||||
|
|
|
|||
Loading…
Reference in a new issue