@floless/app 0.103.2 → 0.103.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/floless-server.cjs +13 -10
- package/dist/web/steel-3d-view.js +24 -10
- package/package.json +1 -1
package/dist/floless-server.cjs
CHANGED
|
@@ -53583,7 +53583,7 @@ function appVersion() {
|
|
|
53583
53583
|
return resolveVersion({
|
|
53584
53584
|
isSea: isSea2(),
|
|
53585
53585
|
sqVersionXml: readSqVersionXml(),
|
|
53586
|
-
define: true ? "0.103.
|
|
53586
|
+
define: true ? "0.103.3" : void 0,
|
|
53587
53587
|
pkgVersion: readPkgVersion()
|
|
53588
53588
|
});
|
|
53589
53589
|
}
|
|
@@ -53593,7 +53593,7 @@ function resolveChannel(s) {
|
|
|
53593
53593
|
return "dev";
|
|
53594
53594
|
}
|
|
53595
53595
|
function appChannel() {
|
|
53596
|
-
return resolveChannel({ isSea: isSea2(), define: true ? "0.103.
|
|
53596
|
+
return resolveChannel({ isSea: isSea2(), define: true ? "0.103.3" : void 0 });
|
|
53597
53597
|
}
|
|
53598
53598
|
|
|
53599
53599
|
// workflow-update.ts
|
|
@@ -58553,6 +58553,12 @@ function expandBasePlate(joint, col) {
|
|
|
58553
58553
|
const SEAT = 0.5;
|
|
58554
58554
|
const rodBelow = Math.max(embedment > 0 ? grout + embedment : projBelow, rodProj + nutH + apThick + SEAT);
|
|
58555
58555
|
const plateTop = bz + EMBED, plateBottom = plateTop - thickness;
|
|
58556
|
+
const axisSign = col.to[2] < col.from[2] ? -1 : 1;
|
|
58557
|
+
const rollRad = (col.rot || 0) * Math.PI * axisSign / 180;
|
|
58558
|
+
const cosR = Math.cos(rollRad), sinR = Math.sin(rollRad);
|
|
58559
|
+
const nz = (x) => x === 0 ? 0 : x;
|
|
58560
|
+
const uD = [nz(cosR), nz(sinR), 0], vD = [nz(-sinR), nz(cosR), 0];
|
|
58561
|
+
const rotXY = (u, v) => [bx + (u * cosR - v * sinR), by + (u * sinR + v * cosR)];
|
|
58556
58562
|
const us = spread(cols, Math.max(0, width / 2 - edge));
|
|
58557
58563
|
const vs = spread(rows2, Math.max(0, depth / 2 - edge));
|
|
58558
58564
|
const holes = [];
|
|
@@ -58563,11 +58569,11 @@ function expandBasePlate(joint, col) {
|
|
|
58563
58569
|
let k = 0;
|
|
58564
58570
|
for (const v of vs) {
|
|
58565
58571
|
for (const u of us) {
|
|
58566
|
-
const ax
|
|
58572
|
+
const [ax, ay] = rotXY(u, v), jid = joint.id;
|
|
58567
58573
|
holes.push({ id: `${jid}:plate-hole${k}`, u, v, d: boltDia + clearance });
|
|
58568
58574
|
kit.push(
|
|
58569
58575
|
{ id: `${jid}:rod${k}`, group: "anchor", kind: "rod", from: [ax, ay, rodBotZ], to: [ax, ay, rodTopZ], d: boltDia, material: anchorRodMaterial, fastener: { role: "anchor-bolt" }, meta: { label: `Anchor rod \u2300${boltDia}` } },
|
|
58570
|
-
{ id: `${jid}:wp${k}`, group: "washer-plate", kind: "plate", center: [ax, ay, wpBot + wpThick / 2], uDir:
|
|
58576
|
+
{ id: `${jid}:wp${k}`, group: "washer-plate", kind: "plate", center: [ax, ay, wpBot + wpThick / 2], uDir: uD, vDir: vD, width: wpSide, depth: wpSide, thickness: wpThick, material: plateMaterial, holes: [{ id: `${jid}:wp${k}:hole`, u: 0, v: 0, d: boltDia + 2 }], meta: { label: `Washer plate ${Math.round(wpSide)}\xD7${Math.round(wpSide)}\xD7${Math.round(wpThick)}` } },
|
|
58571
58577
|
{ id: `${jid}:wsh${k}`, group: "washer", kind: "washer", from: [ax, ay, wpTop], to: [ax, ay, washerTop], dOuter: washerOD, dInner: washerID, material: fastenerMaterial, fastener: { role: "washer" }, meta: { label: `Washer \u2300${Math.round(washerOD)}` } },
|
|
58572
58578
|
{ id: `${jid}:fn${k}`, group: "nut", kind: "nut", from: [ax, ay, washerTop], to: [ax, ay, fnTop], acrossFlats: nutAF, material: fastenerMaterial, fastener: { role: "nut" }, meta: { label: `Nut M${boltDia}` } }
|
|
58573
58579
|
);
|
|
@@ -58575,7 +58581,7 @@ function expandBasePlate(joint, col) {
|
|
|
58575
58581
|
const nutBotZ = rodBotZ + rodProj;
|
|
58576
58582
|
if (bottomNut) kit.push({ id: `${jid}:fnb${k}`, group: "nut", kind: "nut", from: [ax, ay, nutBotZ], to: [ax, ay, nutBotZ + nutH], acrossFlats: nutAF, material: fastenerMaterial, fastener: { role: "nut" }, meta: { label: `Anchor nut M${boltDia}` } });
|
|
58577
58583
|
const apBotZ = nutBotZ + (bottomNut ? nutH : 0);
|
|
58578
|
-
if (anchorPlate) kit.push({ id: `${jid}:ap${k}`, group: "anchor-plate", kind: "plate", center: [ax, ay, apBotZ + apThick / 2], uDir:
|
|
58584
|
+
if (anchorPlate) kit.push({ id: `${jid}:ap${k}`, group: "anchor-plate", kind: "plate", center: [ax, ay, apBotZ + apThick / 2], uDir: uD, vDir: vD, width: apSide, depth: apSide, thickness: apThick, material: plateMaterial, holes: [{ id: `${jid}:ap${k}:hole`, u: 0, v: 0, d: boltDia + 2 }], meta: { label: `Anchor plate ${Math.round(apSide)}\xD7${Math.round(apSide)}\xD7${Math.round(apThick)}` } });
|
|
58579
58585
|
k++;
|
|
58580
58586
|
}
|
|
58581
58587
|
}
|
|
@@ -58585,8 +58591,8 @@ function expandBasePlate(joint, col) {
|
|
|
58585
58591
|
kind: "plate",
|
|
58586
58592
|
center: [bx, by, plateBottom + thickness / 2],
|
|
58587
58593
|
// plate top seats the column (= bz + EMBED); body hangs below
|
|
58588
|
-
uDir:
|
|
58589
|
-
vDir:
|
|
58594
|
+
uDir: uD,
|
|
58595
|
+
vDir: vD,
|
|
58590
58596
|
width,
|
|
58591
58597
|
depth,
|
|
58592
58598
|
thickness,
|
|
@@ -58599,9 +58605,6 @@ function expandBasePlate(joint, col) {
|
|
|
58599
58605
|
anchor: { rodTopZ, rodBotZ, plateBotZ: plateBottom, concreteTopZ, projMm: rodTopZ - plateBottom, groutMm: plateBottom - concreteTopZ, embedMm: concreteTopZ - rodBotZ, embedSet: embedment > 0 }
|
|
58600
58606
|
}
|
|
58601
58607
|
};
|
|
58602
|
-
const axisSign = col.to[2] < col.from[2] ? -1 : 1;
|
|
58603
|
-
const rollRad = (col.rot || 0) * Math.PI * axisSign / 180;
|
|
58604
|
-
const cosR = Math.cos(rollRad), sinR = Math.sin(rollRad);
|
|
58605
58608
|
const weld = {
|
|
58606
58609
|
id: `${joint.id}:weld`,
|
|
58607
58610
|
group: "weld",
|
|
@@ -23,7 +23,7 @@ import { gridGeometry, gridCandidates3d, mmPerPx, visibleGridLevels } from './gr
|
|
|
23
23
|
let renderer, scene, perspCam, orthoCam, camera, controls, root, api, canvasEl, ro, rafId, grid, raycaster, downXY, lastPick = '(none)';
|
|
24
24
|
let pending = null, dragging = null, marker = null, readout = null; // pending = member gesture; readout = drag dimension overlay
|
|
25
25
|
let boxSel = null, rubber = null; // LEFT-drag-on-empty rubber-band multi-select
|
|
26
|
-
let hoverId = null, hoverChip = null, hoverRAF = 0, lastHoverXY = null; // hover readout + cursor
|
|
26
|
+
let hoverId = null, hoverGlowIds = [], hoverChip = null, hoverRAF = 0, lastHoverXY = null; // hover readout + cursor; hoverGlowIds = every mesh currently wearing the sky glow (the WHOLE connection when hovering one of its parts)
|
|
27
27
|
let epGroup = null; // yellow/magenta endpoint markers (start/end direction dots)
|
|
28
28
|
let epGeom = null, epMatStart = null, epMatEnd = null; // shared across all endpoint dots (no per-rebuild churn)
|
|
29
29
|
let epRing = null, epPreview = null, epMovedLine = null; // white ring on the active end node + member rubber (epPreview) + the "moved" leader (epMovedLine) while dragging an end
|
|
@@ -533,7 +533,7 @@ function clearRoot() {
|
|
|
533
533
|
root.remove(m);
|
|
534
534
|
}
|
|
535
535
|
meshById.clear();
|
|
536
|
-
hoverId = null; hoverEp = null; // the meshes are gone — drop stale hover state so the next pointermove re-glows the fresh mesh
|
|
536
|
+
hoverId = null; hoverGlowIds = []; hoverEp = null; // the meshes are gone — drop stale hover state so the next pointermove re-glows the fresh mesh
|
|
537
537
|
}
|
|
538
538
|
|
|
539
539
|
// Subtract each cope (a `cut` part) from a member's solid via CSG — a real coped beam end. Cut boxes are
|
|
@@ -1828,7 +1828,8 @@ function setSelection(ids) {
|
|
|
1828
1828
|
selIds = new Set(set);
|
|
1829
1829
|
reconcileConnState(set); // any selection path (2D click, box-select, keyboard) must not leave a stale connection envelope/drill
|
|
1830
1830
|
rebuildEndpoints(); // endpoint dots follow the selection
|
|
1831
|
-
|
|
1831
|
+
let reglow = false; for (const g of hoverGlowIds) if (!set.has(g)) { setHoverGlow(g, true, false); reglow = true; } // still-hovered, now-unselected parts keep their glow (the material swap above cleared it)
|
|
1832
|
+
if (reglow) applyDisplayMode(); // one re-sync after re-lighting the whole set, not one per part
|
|
1832
1833
|
updateStatusChip();
|
|
1833
1834
|
}
|
|
1834
1835
|
let selIds = new Set();
|
|
@@ -1843,7 +1844,7 @@ function hoverMaterial(mesh) {
|
|
|
1843
1844
|
if (!mesh.userData._hovMat) mesh.userData._hovMat = materialFor(mesh.userData.group).clone();
|
|
1844
1845
|
return mesh.userData._hovMat;
|
|
1845
1846
|
}
|
|
1846
|
-
function setHoverGlow(id, on) {
|
|
1847
|
+
function setHoverGlow(id, on, sync = true) {
|
|
1847
1848
|
if (id == null) return;
|
|
1848
1849
|
const mesh = meshById.get(id);
|
|
1849
1850
|
if (!mesh || String(id).startsWith('det:')) return; // placed details use a texture, no emissive to glow
|
|
@@ -1851,15 +1852,28 @@ function setHoverGlow(id, on) {
|
|
|
1851
1852
|
mesh.material = on ? hoverMaterial(mesh) : materialFor(mesh.userData.group);
|
|
1852
1853
|
mesh.material.emissive = new THREE.Color(on ? HOVER_EMISSIVE : 0x000000);
|
|
1853
1854
|
mesh.material.emissiveIntensity = on ? HOVER_INTENSITY : 0;
|
|
1854
|
-
applyDisplayMode(); // ALWAYS re-sync after a material swap (mirrors setSelection): the swapped-in clone may have been cloned in another mode, and on clear the restored shared material can itself be stale — for a sole-profile member it stays detached while its mesh wears _hovMat, so applyDisplayMode never updated it. emissive is preserved (applyDisplayMode never touches it).
|
|
1855
|
-
}
|
|
1856
|
-
//
|
|
1857
|
-
//
|
|
1855
|
+
if (sync) applyDisplayMode(); // ALWAYS re-sync after a material swap (mirrors setSelection): the swapped-in clone may have been cloned in another mode, and on clear the restored shared material can itself be stale — for a sole-profile member it stays detached while its mesh wears _hovMat, so applyDisplayMode never updated it. emissive is preserved (applyDisplayMode never touches it). sync=false lets a whole-connection glow batch ONE applyDisplayMode() after the loop instead of an O(meshes) sweep per part.
|
|
1856
|
+
}
|
|
1857
|
+
// The ids that glow together when `id` is hovered: the WHOLE connection's parts (so hovering any part
|
|
1858
|
+
// lights the entire base-plate / shear-plate as one unit — parity with whole-connection SELECTION), unless
|
|
1859
|
+
// we've DRILLED into that connection (ctxConn) — then only the part under the cursor glows. A bare member
|
|
1860
|
+
// glows alone. connOf/connChildIds are function declarations (hoisted), safe to call from here.
|
|
1861
|
+
function hoverGroupOf(id) {
|
|
1862
|
+
if (id == null) return [];
|
|
1863
|
+
const conn = connOf(id);
|
|
1864
|
+
if (conn && conn !== ctxConn) { const kids = connChildIds(conn); if (kids.length) return kids; }
|
|
1865
|
+
return [id];
|
|
1866
|
+
}
|
|
1867
|
+
// Move the hover glow from the previous member/connection to `id` (null = clear). One entry point so every
|
|
1868
|
+
// hoverId transition stays consistent. `hoverId` stays the single representative (status chip); `hoverGlowIds`
|
|
1869
|
+
// is the full set actually lit.
|
|
1858
1870
|
function setHover(id) {
|
|
1859
1871
|
if (id === hoverId) return;
|
|
1860
|
-
setHoverGlow(
|
|
1872
|
+
for (const g of hoverGlowIds) setHoverGlow(g, false, false);
|
|
1861
1873
|
hoverId = id;
|
|
1862
|
-
|
|
1874
|
+
hoverGlowIds = hoverGroupOf(id);
|
|
1875
|
+
for (const g of hoverGlowIds) setHoverGlow(g, true, false);
|
|
1876
|
+
applyDisplayMode(); // ONE material re-sync for the whole clear+relight — not an O(meshes) sweep per part (a connection can be ~26 parts)
|
|
1863
1877
|
}
|
|
1864
1878
|
|
|
1865
1879
|
// ---- yellow (start) / magenta (end) endpoint markers — also the drag handles ----
|