fix manual support show/hide because addbox/delbox contract changed

This commit is contained in:
Stewart Allen 2020-11-25 23:09:34 -05:00
commit 6736ee4776
3 changed files with 9 additions and 8 deletions

View file

@ -3,7 +3,7 @@
## 2.4 roadmap ## 2.4 roadmap
* cnc * cnc
* tracing (chamfer, engrave) * tracing (chamfer, engrave)
* auto feature detection (slicing), manual tabs * auto feature detection (slicing)
* add tabs to shadow and slice model (for topo) * add tabs to shadow and slice model (for topo)
* fdm * fdm
* continuous printing (z belt systems) * continuous printing (z belt systems)
@ -68,6 +68,7 @@
# CAM # CAM
* `B` fix multiple tab heights in contouring (uses highest now)
* `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
* `B` clear voids has double interior pass because wrong offset shadow used * `B` clear voids has double interior pass because wrong offset shadow used
@ -89,6 +90,7 @@
* `F` add support for tapered ball mills * `F` add support for tapered ball mills
* `F` warn when part > stock or cuts go outside bed * `F` warn when part > stock or cuts go outside bed
* `P` crossing open space check point is outside camshell before returning max z * `P` crossing open space check point is outside camshell before returning max z
* `P` detect render message backlog and pause or warn
# Laser # Laser

View file

@ -37,6 +37,7 @@
$('set-tools').style.display = isCamMode ? '' : 'none'; $('set-tools').style.display = isCamMode ? '' : 'none';
kiri.space.platform.setColor(isCamMode ? 0xeeeeee : 0xcccccc); kiri.space.platform.setColor(isCamMode ? 0xeeeeee : 0xcccccc);
updateStock(undefined, 'internal'); updateStock(undefined, 'internal');
if (!isCamMode) func.tclear();
}); });
api.event.on("view.set", (mode) => { api.event.on("view.set", (mode) => {
@ -113,9 +114,7 @@
api.feature.hover = true; api.feature.hover = true;
}); });
api.event.on("cam.tabs.done", func.tdone = () => { api.event.on("cam.tabs.done", func.tdone = () => {
delbox('intZ'); delbox('tabb');
delbox('intW');
delbox('supp');
api.hide.alert(alert); api.hide.alert(alert);
api.feature.hover = false; api.feature.hover = false;
}); });
@ -168,7 +167,7 @@
if (!isCamMode) { if (!isCamMode) {
return; return;
} }
delbox('supp'); delbox('tabb');
if (lastTab) { if (lastTab) {
const {widget, box, id} = lastTab; const {widget, box, id} = lastTab;
widget.adds.remove(box); widget.adds.remove(box);
@ -206,7 +205,7 @@
if (!isCamMode) { if (!isCamMode) {
return; return;
} }
delbox('supp'); delbox('tabb');
const { int, type, point } = data; const { int, type, point } = data;
const object = int ? int.object : null; const object = int ? int.object : null;
const tab = int ? object.tab : null; const tab = int ? object.tab : null;
@ -245,7 +244,7 @@
const rot = new THREE.Quaternion().setFromAxisAngle(zaxis, Math.atan2(n.y, n.x)); const rot = new THREE.Quaternion().setFromAxisAngle(zaxis, Math.atan2(n.y, n.x));
const pos = { x:ic.x, y:ic.y, z:ic.z }; const pos = { x:ic.x, y:ic.y, z:ic.z };
const dim = { x:5, y:camTabsWidth, z:camTabsHeight }; const dim = { x:5, y:camTabsWidth, z:camTabsHeight };
const tab = addbox(pos, 0x0000dd, 'supp', dim, { rotate: rot }); const tab = addbox(pos, 0x0000dd, 'tabb', dim, { rotate: rot });
return { pos, dim, rot, tab, width: camTabsWidth, height: camTabsHeight }; return { pos, dim, rot, tab, width: camTabsWidth, height: camTabsHeight };
} }

View file

@ -217,7 +217,7 @@
// prevent duplicate restore from repeated settings load calls // prevent duplicate restore from repeated settings load calls
if (!sups[id]) { if (!sups[id]) {
pos.box = addbox( pos.box = addbox(
{ x, y, z }, 0x0000dd, 'supp', { x, y, z }, 0x0000dd, id,
{ x:dw, y:dw, z:dh }, { group: widget.mesh } { x:dw, y:dw, z:dh }, { group: widget.mesh }
); );
pos.box.pillar = Object.assign({widget}, pos); pos.box.pillar = Object.assign({widget}, pos);