From 6736ee4776d740d41145f1856316e666da3c2e3d Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Wed, 25 Nov 2020 23:09:34 -0500 Subject: [PATCH] fix manual support show/hide because addbox/delbox contract changed --- notes.md | 4 +++- src/mode/cam/client.js | 11 +++++------ src/mode/fdm/client.js | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/notes.md b/notes.md index 40532404..36a38032 100644 --- a/notes.md +++ b/notes.md @@ -3,7 +3,7 @@ ## 2.4 roadmap * cnc * tracing (chamfer, engrave) -* auto feature detection (slicing), manual tabs +* auto feature detection (slicing) * add tabs to shadow and slice model (for topo) * fdm * continuous printing (z belt systems) @@ -68,6 +68,7 @@ # CAM +* `B` fix multiple tab heights in contouring (uses highest now) * `B` climb vs conventional not fully consistent after refactor * `B` outside cutting direction in roughing mode inverted * `B` clear voids has double interior pass because wrong offset shadow used @@ -89,6 +90,7 @@ * `F` add support for tapered ball mills * `F` warn when part > stock or cuts go outside bed * `P` crossing open space check point is outside camshell before returning max z +* `P` detect render message backlog and pause or warn # Laser diff --git a/src/mode/cam/client.js b/src/mode/cam/client.js index e15f126b..8e9779c4 100644 --- a/src/mode/cam/client.js +++ b/src/mode/cam/client.js @@ -37,6 +37,7 @@ $('set-tools').style.display = isCamMode ? '' : 'none'; kiri.space.platform.setColor(isCamMode ? 0xeeeeee : 0xcccccc); updateStock(undefined, 'internal'); + if (!isCamMode) func.tclear(); }); api.event.on("view.set", (mode) => { @@ -113,9 +114,7 @@ api.feature.hover = true; }); api.event.on("cam.tabs.done", func.tdone = () => { - delbox('intZ'); - delbox('intW'); - delbox('supp'); + delbox('tabb'); api.hide.alert(alert); api.feature.hover = false; }); @@ -168,7 +167,7 @@ if (!isCamMode) { return; } - delbox('supp'); + delbox('tabb'); if (lastTab) { const {widget, box, id} = lastTab; widget.adds.remove(box); @@ -206,7 +205,7 @@ if (!isCamMode) { return; } - delbox('supp'); + delbox('tabb'); const { int, type, point } = data; const object = int ? int.object : 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 pos = { x:ic.x, y:ic.y, z:ic.z }; 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 }; } diff --git a/src/mode/fdm/client.js b/src/mode/fdm/client.js index 62255bc7..23840671 100644 --- a/src/mode/fdm/client.js +++ b/src/mode/fdm/client.js @@ -217,7 +217,7 @@ // prevent duplicate restore from repeated settings load calls if (!sups[id]) { pos.box = addbox( - { x, y, z }, 0x0000dd, 'supp', + { x, y, z }, 0x0000dd, id, { x:dw, y:dw, z:dh }, { group: widget.mesh } ); pos.box.pillar = Object.assign({widget}, pos);