From 6097557608aa5bf8ebcce81b69f11ba87a050184 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Sun, 16 Feb 2025 12:31:45 -0500 Subject: [PATCH] fix cnc default tools, tab rotations --- mods/bambu/bambu.js | 2 +- src/kiri/conf.js | 21 +++++++++------------ src/kiri/widget.js | 3 ++- web/kiri/index.css | 1 - 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/mods/bambu/bambu.js b/mods/bambu/bambu.js index ebd24a7c..8cfc7c24 100644 --- a/mods/bambu/bambu.js +++ b/mods/bambu/bambu.js @@ -1000,7 +1000,7 @@ self.kiri.load(api => { h.div({ class: "t-body t-inset f-col gap3 pad4 grow" }, [ h.div({ class: "set-header", onclick() { file_list(); - } }, h.a({ class: "flex f-row grow" }, [ + } }, h.a({ class: "flex f-row grow a-center" }, [ h.label('file'), h.span({ class: "fat5 grow" }), h.i({ class: "fa-solid fa-rotate" }) diff --git a/src/kiri/conf.js b/src/kiri/conf.js index 61535be2..43f21c97 100644 --- a/src/kiri/conf.js +++ b/src/kiri/conf.js @@ -486,6 +486,7 @@ const conf = exports({ camLatheOver: 0.1, camLatheAngle: 1, camLatheSpeed: 500, + camLatheLinear: true, camTolerance: 0, camTraceTool: 1000, camTraceSpindle: 1000, @@ -780,7 +781,6 @@ const conf = exports({ shaft_len: 1, flute_diam: 0.25, flute_len: 2, - // taper_angle: 70, taper_tip: 0, }, { @@ -793,7 +793,6 @@ const conf = exports({ shaft_len: 1, flute_diam: 0.125, flute_len: 1.5, - // taper_angle: 70, taper_tip: 0, }, { @@ -806,7 +805,6 @@ const conf = exports({ shaft_len: 1, flute_diam: 0.0625, flute_len: 1.5, - // taper_angle: 70, taper_tip: 0, }, { @@ -815,10 +813,10 @@ const conf = exports({ type: "tapermill", name: "vee 1/8", metric: true, - shaft_diam: 3.17500, - shaft_len: 11, - flute_diam: 3.17500, - flute_len: 17, + shaft_diam: 0.125, + shaft_len: 1, + flute_diam: 0.125, + flute_len: 1.5, taper_angle: 5.3, taper_tip: 0, }, @@ -828,11 +826,10 @@ const conf = exports({ type: "ballmill", name: "ball 1/8", metric: false, - shaft_diam: 3.17500, - shaft_len: 16, - flute_diam: 3.17500, - flute_len: 22, - //taper_angle: 5.3, + shaft_diam: 0.125, + shaft_len: 1, + flute_diam: 0.125, + flute_len: 1.5, taper_tip: 0, } ], diff --git a/src/kiri/widget.js b/src/kiri/widget.js index 208f3832..cc7afa3a 100644 --- a/src/kiri/widget.js +++ b/src/kiri/widget.js @@ -640,8 +640,9 @@ class Widget { for (let tab of this.anno.tab) { const { pos, dim, rot } = tab; const box = new THREE.BoxGeometry(dim.x, dim.y, dim.z).toNonIndexed(); + const quat = new THREE.Quaternion(rot.x, rot.y, rot.z, rot.w); box.applyMatrix4( - new THREE.Matrix4().makeRotationFromQuaternion(rot) + new THREE.Matrix4().makeRotationFromQuaternion(quat) ); box.translate(pos.x, pos.y, pos.z); vert.appendAll(box.attributes.position.array); diff --git a/web/kiri/index.css b/web/kiri/index.css index 9ce697eb..bc6a4303 100644 --- a/web/kiri/index.css +++ b/web/kiri/index.css @@ -186,7 +186,6 @@ th, tr, td, span, div, label, button { } th, tr, td, label { white-space: nowrap; - display: flex; } details summary { list-style: none;