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