@floless/app 0.174.0 → 0.175.0

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.
Files changed (89) hide show
  1. package/autostart.mjs +117 -10
  2. package/dist/floless-server.cjs +2 -2
  3. package/dist/pdf-engine/floless_pdf/__init__.py +53 -0
  4. package/dist/pdf-engine/floless_pdf/backend_pdfium.py +823 -0
  5. package/dist/pdf-engine/floless_pdf/backend_pymupdf.py +245 -0
  6. package/dist/pdf-engine/floless_pdf/geometry.py +115 -0
  7. package/dist/pdf-engine/floless_pdf/images.py +75 -0
  8. package/dist/pdf-engine/floless_pdf/pages.py +136 -0
  9. package/dist/pdf-engine/floless_pdf/textrules.py +200 -0
  10. package/dist/schemas/steel.model.v2.schema.json +45 -1
  11. package/dist/skills/floless-app-approval/SKILL.md +28 -3
  12. package/dist/skills/floless-app-knowledge/SKILL.md +3 -2
  13. package/dist/skills/floless-app-sketches/SKILL.md +71 -0
  14. package/dist/skills/floless-app-sketches/references/steel-plate.md +15 -0
  15. package/dist/skills/floless-app-steel-model/SKILL.md +14 -1
  16. package/dist/skills/floless-app-steel-model/references/elements.md +90 -23
  17. package/dist/skills/floless-app-steel-takeoff/SKILL.md +18 -7
  18. package/dist/skills/floless-app-tweak-contract/SKILL.md +3 -2
  19. package/dist/web/agents.js +1 -1
  20. package/dist/web/app.css +120 -15
  21. package/dist/web/app.js +89 -38
  22. package/dist/web/aware-hold.js +10 -0
  23. package/dist/web/aware.js +405 -51
  24. package/dist/web/boot-watchdog.js +249 -0
  25. package/dist/web/card-details.js +88 -0
  26. package/dist/web/chat.css +29 -0
  27. package/dist/web/chat.js +430 -128
  28. package/dist/web/commands-connection-design.js +23 -0
  29. package/dist/web/commands-revit.js +3 -0
  30. package/dist/web/commands-shell.js +226 -10
  31. package/dist/web/commands-steel.js +95 -5
  32. package/dist/web/commands-tekla-parser.js +21 -1
  33. package/dist/web/connection-design-editor.html +71 -0
  34. package/dist/web/connection-design-editor.js +794 -61
  35. package/dist/web/connection-design-handles.js +9 -3
  36. package/dist/web/element-approval.js +74 -0
  37. package/dist/web/element-context.js +76 -6
  38. package/dist/web/element-geometry.js +8 -2
  39. package/dist/web/element-holds.js +68 -5
  40. package/dist/web/element-type-actions.js +22 -3
  41. package/dist/web/element-types.js +12 -5
  42. package/dist/web/element-words.js +15 -11
  43. package/dist/web/grid-place.js +51 -0
  44. package/dist/web/guide.js +2 -0
  45. package/dist/web/index.html +13 -16
  46. package/dist/web/instructor.js +5 -2
  47. package/dist/web/missed-routines.js +6 -1
  48. package/dist/web/model-change-findings.js +147 -32
  49. package/dist/web/model-change-review.js +435 -32
  50. package/dist/web/model-clash-check.css +100 -0
  51. package/dist/web/model-clash-check.js +681 -0
  52. package/dist/web/model-clip-box.js +204 -0
  53. package/dist/web/model-clip-list.js +153 -3
  54. package/dist/web/model-clip-session.js +3 -3
  55. package/dist/web/model-clip-three-overlay.js +135 -25
  56. package/dist/web/model-editor.css +2 -0
  57. package/dist/web/model-elements.js +273 -18
  58. package/dist/web/model-fit-checks.js +354 -0
  59. package/dist/web/model-spatial-panel.js +9 -3
  60. package/dist/web/model-spatial-tools.js +12 -3
  61. package/dist/web/model-tekla-selection.js +74 -0
  62. package/dist/web/model-view-query.js +70 -14
  63. package/dist/web/model-viewport-revit-adapter.js +8 -7
  64. package/dist/web/model-viewport-toolbar.js +8 -4
  65. package/dist/web/pages.js +78 -1
  66. package/dist/web/project-history.js +31 -1
  67. package/dist/web/revit-editor.css +34 -1
  68. package/dist/web/revit-editor.js +176 -55
  69. package/dist/web/run-history.js +8 -0
  70. package/dist/web/sketch-editor.js +141 -2
  71. package/dist/web/sketches.js +192 -6
  72. package/dist/web/start-place.js +46 -0
  73. package/dist/web/steel-3d-core.js +70 -0
  74. package/dist/web/steel-3d-view.js +288 -47
  75. package/dist/web/steel-change-review.css +29 -0
  76. package/dist/web/steel-custom-connection.js +6 -0
  77. package/dist/web/steel-editor.html +532 -33
  78. package/dist/web/steel-filter.html +8 -3
  79. package/dist/web/steel-model-checks.css +76 -0
  80. package/dist/web/steel-model-commands.js +1 -1
  81. package/dist/web/steel-model-v2-commands.js +17 -0
  82. package/dist/web/steel-view-generation.js +6 -2
  83. package/dist/web/teams.js +259 -19
  84. package/dist/web/tekla-editor.html +1 -0
  85. package/dist/web/terminal-requests.js +6 -0
  86. package/dist/web/vendor/connection-engine.js +890 -89
  87. package/dist/web/workspaces.js +630 -48
  88. package/package.json +4 -1
  89. package/preferences-file.mjs +27 -0
@@ -43,6 +43,7 @@ import { createModelClipGesture, orientClipNormalAwayFromCamera } from './model-
43
43
  import { createModelClipSession } from './model-clip-session.js';
44
44
  import { createModelClipThreeOverlay } from './model-clip-three-overlay.js';
45
45
  import { createModelClipThreePreview } from './model-clip-three-preview.js';
46
+ import { clipBoxIsRotated, clipBoxPlanes } from './model-clip-box.js';
46
47
  import { MODEL_LIGHTING_PROFILES, modelMeshCastsShadow, modelShadowsEnabled, modelSunDirection, normalizeModelLighting } from './model-viewport-lighting.js';
47
48
  import { mountModelClipList } from './model-clip-list.js';
48
49
  import { createModelStructuralGridView } from './model-structural-grid-view.js';
@@ -57,7 +58,7 @@ let measureSession = null, measurePendingMeta = null;
57
58
  const measureProviderData = new Map();
58
59
  let spatialTools = null;
59
60
  let spatialFrameSignature = '';
60
- let clipSession = null, clipOverlay = null, clipCreationPreview = null, releaseClipGestureInput = null, releaseClipOverlayInput = null, releaseClipSpatial = null, releaseClipSession = null, sharedClipList = null, sharedClipEdit = null;
61
+ let clipSession = null, clipOverlay = null, clipCreationPreview = null, releaseClipGestureInput = null, releaseClipOverlayInput = null, releaseClipSpatial = null, releaseClipSession = null, sharedClipList = null, sharedClipListHost = null, sharedClipEdit = null;
61
62
  let viewportReports = null;
62
63
  let viewportIdentity = createEntityKeyRegistry();
63
64
  let lightAmb, lightKey, lightFill; // dimmed in Realistic, where the environment lights the scene
@@ -122,6 +123,7 @@ let orientationOverlay = null; // canonical shared ViewCube + world
122
123
  const orientationListeners = new Set(); // model.orientation.v1 subscribers (the shared mount is one)
123
124
  const DRAG_TOL_PX = 4; // movement past this = a drag (not a click)
124
125
  import { endpointDragPoint } from './steel-3d-core.js';
126
+ import { holeToolsForMember } from './steel-3d-core.js'; // #4027: member bolt holes + round openings
125
127
  import { planeAxes, toPlane, fromPlane, projectOnto, entityOutline, entityOutlineUV, fillable, textQuad, selfIntersects, entityHandles, applyHandleDrag, handleDragLabel, handleDragSize, handlePoint, handleLockBase } from './sketch-plane.js';
126
128
  import { createSketchGesture, isSketchTool, drawsShapes } from './sketch-tools.js';
127
129
  import { defaultTextSize, planTextTextures, createTextureCache, textTextureBytes, TEXT_CANVAS_H, TEXT_CANVAS_W_MAX } from './sketch-text.js';
@@ -344,7 +346,7 @@ function syncSpatialSections() {
344
346
  if (!spatialTools) return;
345
347
  spatialTools.replaceSections({
346
348
  clips: clips.map((clip) => clip.kind === 'box'
347
- ? { id: clip.id, kind: 'box', min: clip.box.min.toArray(), max: clip.box.max.toArray(), enabled: clip.enabled, label: clip.label }
349
+ ? { id: clip.id, kind: 'box', min: clip.box.min.toArray(), max: clip.box.max.toArray(), ...(clip.rotationDeg ? { rotationDeg: [...clip.rotationDeg] } : {}), enabled: clip.enabled, label: clip.label }
348
350
  : { id: clip.id, kind: 'plane', origin: clip.point.toArray(), normal: clip.n.toArray(), enabled: clip.enabled, label: clip.label }),
349
351
  workArea: workArea ? { min: workArea.box.min.toArray(), max: workArea.box.max.toArray(), wholeParts: !!workArea.whole, visible: !!workArea.enabled } : null,
350
352
  });
@@ -357,7 +359,7 @@ function adoptSharedClips(state) {
357
359
  adoptSharedClips.signature = signature;
358
360
  clips = incoming.map((value) => {
359
361
  const clip = value.kind === 'box'
360
- ? { id: value.id, kind: 'box', enabled: value.enabled !== false, label: value.label, box: new THREE.Box3(new THREE.Vector3(...value.min), new THREE.Vector3(...value.max)), planes: [] }
362
+ ? { id: value.id, kind: 'box', enabled: value.enabled !== false, label: value.label, box: new THREE.Box3(new THREE.Vector3(...value.min), new THREE.Vector3(...value.max)), rotationDeg: clipRotationOf(value), planes: [] }
361
363
  : { id: value.id, kind: 'plane', enabled: value.enabled !== false, label: value.label, n: new THREE.Vector3(...value.normal), point: new THREE.Vector3(...value.origin), planes: [] };
362
364
  rebuildClipPlanes(clip); return clip;
363
365
  });
@@ -955,6 +957,7 @@ function renderSteelFrame() {
955
957
  sizeEndpoints();
956
958
  sizeSketchText(); // Sketches: the notes' textures follow the camera within the live budget
957
959
  sizeAiMarks();
960
+ sizeCutMarks();
958
961
  sizeClipHandles();
959
962
  clipCreationPreview?.resize();
960
963
  sizeFrameHandle();
@@ -1411,10 +1414,64 @@ function clearRoot() {
1411
1414
  hoverId = null; hoverGlowIds = []; hoverEp = null; // the meshes are gone — drop stale hover state so the next pointermove re-glows the fresh mesh
1412
1415
  }
1413
1416
 
1414
- // Subtract each cope (a `cut` part) from a member's solid via CSG — a real coped beam end. Cut boxes are
1415
- // world-space (center/uDir/vDir/width/depth/thickness); we transform them into the member's LOCAL frame so
1416
- // the result keeps the member's placement (drag/select still work), then subtract. On any CSG failure the
1417
- // member is left uncoped rather than breaking the whole scene.
1417
+ // ---- member cuts: copes, then bolt holes and round openings (#4027) ----
1418
+ // Subtract a member's copes/end cuts (`cut` parts) and then its bolt holes + round openings (cylinder tools from
1419
+ // holeToolsForMember, steel-3d-core.js) via CSG. Cut boxes and tools are world-space; we transform them into the
1420
+ // member's LOCAL frame so the result keeps the member's placement (drag/select still work). Every step is tried on
1421
+ // its own and every result validated: a step that throws or returns an invalid solid is skipped (the member keeps
1422
+ // its last good geometry, never breaking the scene) and recorded in cutsNotDrawnList, which drives the amber
1423
+ // marker and the Inspect callout — the console warning is a diagnostic, no longer the only channel.
1424
+ //
1425
+ // TEST SEAM, for the E2E only — no UI reaches it: set `globalThis.__flolessForceCutFailure` to a member id (or '*'
1426
+ // for every member) and every CSG subtraction on that member throws on the next rebuild, so the "cut not drawn"
1427
+ // path can be driven by a real edit in a real browser. Unset (or null/false) in production.
1428
+ function forcedCutFailure(memberId) {
1429
+ const f = globalThis.__flolessForceCutFailure;
1430
+ return f != null && f !== false && (f === '*' || String(f) === String(memberId));
1431
+ }
1432
+ const CUT_VALID_PAD_MM = 1; // a subtraction only ever removes steel: its result must fit the uncut solid's box (+ this)
1433
+ let cutsNotDrawnList = []; // [{ memberId, kind: 'cope'|'end-cut'|'hole'|'opening', label, at, diameterMm, cutId }], rebuilt every build
1434
+ let squareCopeList = []; // copes whose re-entrant fillet fought CSG and were drawn square instead: drawn, so no marker
1435
+ function csgSubtract(memberId, a, b) {
1436
+ if (forcedCutFailure(memberId)) throw new Error('forced cut failure (test seam globalThis.__flolessForceCutFailure)');
1437
+ return _csgEval.evaluate(a, b, SUBTRACTION);
1438
+ }
1439
+ /** A CSG answer is kept only when it is a real solid that removed steel: non-empty, every coordinate finite, and
1440
+ * inside the uncut member's bounding box (+ pad). Anything else keeps the previous good geometry. */
1441
+ function cutResultValid(geom, bounds) {
1442
+ const pos = geom && geom.getAttribute && geom.getAttribute('position');
1443
+ if (!pos || pos.count < 3) return false;
1444
+ const arr = pos.array;
1445
+ for (let i = 0; i < arr.length; i++) if (!Number.isFinite(arr[i])) return false;
1446
+ geom.computeBoundingBox();
1447
+ return !!geom.boundingBox && bounds.containsBox(geom.boundingBox);
1448
+ }
1449
+ /** Concatenate non-indexed copies of tool geometries (position/normal/uv — the Evaluator's attribute set) into one
1450
+ * brush geometry, so disjoint tools cost one subtraction rather than one each. */
1451
+ function mergeToolGeometries(geoms) {
1452
+ const parts = geoms.map((g) => (g.index ? g.toNonIndexed() : g));
1453
+ const out = new THREE.BufferGeometry();
1454
+ for (const [name, size] of [['position', 3], ['normal', 3], ['uv', 2]]) {
1455
+ const total = parts.reduce((n, g) => n + g.getAttribute(name).array.length, 0), arr = new Float32Array(total);
1456
+ let o = 0;
1457
+ for (const g of parts) { arr.set(g.getAttribute(name).array, o); o += g.getAttribute(name).array.length; }
1458
+ out.setAttribute(name, new THREE.BufferAttribute(arr, size));
1459
+ }
1460
+ for (const g of parts) if (!geoms.includes(g)) g.dispose();
1461
+ return out;
1462
+ }
1463
+ /** A cylinder tool (world `from`→`to`, ⌀) as member-LOCAL geometry, plus its WORLD bounding sphere for grouping. */
1464
+ function cylinderToolGeometry(tool, invMember) {
1465
+ const a = V(...tool.from), b = V(...tool.to), dir = b.clone().sub(a), L = dir.length(), r = tool.diameterMm / 2;
1466
+ const g = new THREE.CylinderGeometry(r, r, L, tool.diameterMm > 60 ? 40 : 24, 1, false);
1467
+ const q = new THREE.Quaternion().setFromUnitVectors(V(0, 1, 0), dir.normalize());
1468
+ const centre = a.clone().add(b).multiplyScalar(0.5);
1469
+ g.applyMatrix4(new THREE.Matrix4().compose(centre, q, V(1, 1, 1))); // world placement…
1470
+ g.applyMatrix4(invMember); // …then into the member's local frame
1471
+ return { g, centre, radius: Math.hypot(L / 2, r) };
1472
+ }
1473
+ const cutRecord = (memberId, kind, label, at, cutId, diameterMm = null) =>
1474
+ ({ memberId: String(memberId), kind, label, at: Array.isArray(at) ? at.slice(0, 3).map(Number) : null, diameterMm, cutId: cutId == null ? null : String(cutId) });
1418
1475
  const _csgEval = new Evaluator();
1419
1476
  _csgEval.useGroups = false; // one solid out → the member's single material applies
1420
1477
 
@@ -1445,33 +1502,70 @@ function roundedCutGeometry(W, D, T, r, reentrantV) {
1445
1502
  return g;
1446
1503
  }
1447
1504
 
1448
- function applyCopes(mesh, cuts) {
1449
- try {
1450
- mesh.updateMatrix(); // local TRS (root is identity → local == world mm)
1451
- const invMember = mesh.matrix.clone().invert();
1452
- let result = new Brush(mesh.geometry); result.updateMatrixWorld(true); // member-local, identity
1453
- for (const cut of cuts) {
1454
- const pad = 0.6; // over-cut so coplanar faces don't leave slivers
1455
- const W = Math.max(cut.width || 1, 1) + pad, D = Math.max(cut.depth || 1, 1) + pad, Th = Math.max(cut.thickness || 1, 1) + pad;
1456
- const u = V(...(cut.uDir || [1, 0, 0])).normalize(), vv = V(...(cut.vDir || [0, 1, 0])).normalize();
1457
- const n = new THREE.Vector3().crossVectors(u, vv).normalize();
1458
- const world = new THREE.Matrix4().makeBasis(u, vv, n); world.setPosition(cut.center[0], cut.center[1], cut.center[2]);
1459
- const localM = invMember.clone().multiply(world); // cut → member-local
1460
- const mkBrush = (geom) => { const b = new Brush(geom); localM.decompose(b.position, b.quaternion, b.scale); b.updateMatrixWorld(true); return b; };
1461
- const rounded = cut.radius > 0 && !!cut.reentrantV; // re-entrant fillet (AISC); else a square cut
1462
- let g = rounded ? roundedCutGeometry(W, D, Th, cut.radius, cut.reentrantV) : new THREE.BoxGeometry(W, D, Th);
1463
- try {
1464
- result = _csgEval.evaluate(result, mkBrush(g), SUBTRACTION);
1465
- } catch (e) {
1466
- if (!rounded) throw e;
1467
- g.dispose(); g = new THREE.BoxGeometry(W, D, Th); // square-cut fallback when the fillet fights CSG
1468
- result = _csgEval.evaluate(result, mkBrush(g), SUBTRACTION);
1469
- }
1470
- g.dispose();
1505
+ function applyMemberCuts(mesh, memberId, cuts, tools) {
1506
+ mesh.updateMatrix(); // local TRS (root is identity → local == world mm)
1507
+ const invMember = mesh.matrix.clone().invert();
1508
+ const original = mesh.geometry;
1509
+ original.computeBoundingBox();
1510
+ const bounds = original.boundingBox.clone().expandByScalar(CUT_VALID_PAD_MM);
1511
+ let geom = original, lastError = null; // `geom` is always the last VALID solid
1512
+ const step = (toolGeom) => {
1513
+ let out = null;
1514
+ try {
1515
+ const a = new Brush(geom); a.updateMatrixWorld(true); // member-local, identity
1516
+ const b = new Brush(toolGeom); b.updateMatrixWorld(true); // tool geometry is already member-local
1517
+ out = csgSubtract(memberId, a, b).geometry;
1518
+ } catch (e) { lastError = e; return false; }
1519
+ if (!cutResultValid(out, bounds)) { out?.dispose(); lastError = new Error('the cut produced an invalid solid'); return false; }
1520
+ if (geom !== original) geom.dispose();
1521
+ geom = out;
1522
+ return true;
1523
+ };
1524
+ for (const cut of cuts || []) {
1525
+ const pad = 0.6; // over-cut so coplanar faces don't leave slivers
1526
+ const W = Math.max(cut.width || 1, 1) + pad, D = Math.max(cut.depth || 1, 1) + pad, Th = Math.max(cut.thickness || 1, 1) + pad;
1527
+ const u = V(...(cut.uDir || [1, 0, 0])).normalize(), vv = V(...(cut.vDir || [0, 1, 0])).normalize();
1528
+ const n = new THREE.Vector3().crossVectors(u, vv).normalize();
1529
+ const world = new THREE.Matrix4().makeBasis(u, vv, n); world.setPosition(cut.center[0], cut.center[1], cut.center[2]);
1530
+ const localM = invMember.clone().multiply(world); // cut → member-local
1531
+ const local = (g) => { g.applyMatrix4(localM); return g; };
1532
+ const endCut = !!cut.halfSpace, kind = endCut ? 'end-cut' : 'cope', label = endCut ? 'the end cut' : 'the cope';
1533
+ const rounded = cut.radius > 0 && !!cut.reentrantV; // re-entrant fillet (AISC); else a square cut
1534
+ let g = local(rounded ? roundedCutGeometry(W, D, Th, cut.radius, cut.reentrantV) : new THREE.BoxGeometry(W, D, Th));
1535
+ let ok = step(g);
1536
+ if (!ok && rounded) { // square-cut fallback when the fillet fights CSG: drawn, but not as modelled — Inspect says so
1537
+ g.dispose(); g = local(new THREE.BoxGeometry(W, D, Th));
1538
+ ok = step(g);
1539
+ if (ok) squareCopeList.push(cutRecord(memberId, kind, label, cut.center, cut.id));
1471
1540
  }
1472
- mesh.geometry.dispose();
1473
- mesh.geometry = result.geometry; // member-local solid carrying the notch(es); mesh keeps its placement
1474
- } catch (e) { console.warn('[steel-3d] cope CSG failed; member left uncoped', mesh.userData && mesh.userData.id, e); }
1541
+ g.dispose();
1542
+ if (!ok) {
1543
+ cutsNotDrawnList.push(cutRecord(memberId, kind, label, cut.center, cut.id));
1544
+ console.warn('[steel-3d] cope CSG failed; member drawn uncoped there', memberId, cut.id, lastError);
1545
+ }
1546
+ }
1547
+ if (tools && tools.length) {
1548
+ const built = tools.map((tool) => ({ tool, ...cylinderToolGeometry(tool, invMember) }));
1549
+ // Tools whose bounding spheres overlap another tool's go one at a time (touching tools are where CSG breaks);
1550
+ // the rest are merged into one brush, so a beam with 40 bolts costs one subtraction, not 40.
1551
+ const overlaps = (x, y) => x.centre.distanceTo(y.centre) < x.radius + y.radius;
1552
+ const solo = [], batch = [];
1553
+ for (const t of built) (built.some((o) => o !== t && overlaps(t, o)) ? solo : batch).push(t);
1554
+ const one = (t) => {
1555
+ if (step(t.g)) return;
1556
+ cutsNotDrawnList.push(cutRecord(memberId, t.tool.kind, t.tool.label, t.tool.at, t.tool.id, t.tool.diameterMm));
1557
+ console.warn(`[steel-3d] ${t.tool.kind} CSG failed; member drawn without it`, memberId, t.tool.id, lastError);
1558
+ };
1559
+ if (batch.length > 1) {
1560
+ const merged = mergeToolGeometries(batch.map((t) => t.g));
1561
+ const ok = step(merged);
1562
+ merged.dispose();
1563
+ if (!ok) for (const t of batch) one(t); // the merged pass failed: retry each, so one bad tool costs only itself
1564
+ } else if (batch.length) one(batch[0]);
1565
+ for (const t of solo) one(t);
1566
+ for (const t of built) t.g.dispose();
1567
+ }
1568
+ if (geom !== original) { original.dispose(); mesh.geometry = geom; } // member-local solid carrying its cuts; mesh keeps its placement
1475
1569
  }
1476
1570
 
1477
1571
  function buildFromScene(sc) {
@@ -1494,11 +1588,36 @@ function buildFromScene(sc) {
1494
1588
  cutsByMember.get(el.member).push(el);
1495
1589
  }
1496
1590
  }
1591
+ // Bolt holes + round openings (#4027): the editor passes the /scene reply's top-level `operations` as
1592
+ // `sc.cutOperations`; a page that does not (vector-3d, saved viewer pages) draws as before. Indexed by target
1593
+ // member ONCE, so each member scans only its own operations. Plates keep drawing their own `holes`; only
1594
+ // members (`kind: 'box'`) are drilled here.
1595
+ cutsNotDrawnList = []; squareCopeList = [];
1596
+ const opsByTarget = new Map(), elementsById = new Map();
1597
+ const addOp = (target, op) => { const k = String(target); if (!opsByTarget.has(k)) opsByTarget.set(k, new Set()); opsByTarget.get(k).add(op); };
1598
+ for (const op of Array.isArray(sc.cutOperations) ? sc.cutOperations : []) {
1599
+ if (op && op.kind === 'bolt-array' && Array.isArray(op.instances)) { for (const inst of op.instances) for (const h of (inst && inst.holeEffects) || []) if (h && h.targetId != null) addOp(h.targetId, op); }
1600
+ else if (op && op.kind === 'boolean-cut' && op.targetId != null && op.tool && op.tool.kind === 'cylinder') addOp(op.targetId, op);
1601
+ }
1602
+ if (opsByTarget.size) for (const el of sc.elements || []) if (el && el.id != null) elementsById.set(el.id, el);
1497
1603
  for (const el of sc.elements || []) {
1498
1604
  const mesh = new THREE.Mesh(undefined, materialFor(el.group, familyOf(el), lengthAxisOf(el)));
1499
1605
  if (!placeElement(mesh, el)) continue; // unknown kind → skip (a `cut` is one of these: applied below, never a standalone mesh)
1500
1606
  const memberCuts = cutsByMember.get(el.id);
1501
- if (memberCuts && memberCuts.length) applyCopes(mesh, memberCuts); // notch a coped member end
1607
+ const memberOps = el.kind === 'box' ? opsByTarget.get(String(el.id)) : null;
1608
+ const drill = memberOps ? holeToolsForMember(el.id, [...memberOps], elementsById) : null;
1609
+ if (drill) for (const nd of drill.notDrawable) cutsNotDrawnList.push(cutRecord(el.id, nd.kind, nd.label, nd.at, nd.cutId, nd.diameterMm));
1610
+ if ((memberCuts && memberCuts.length) || (drill && drill.tools.length)) {
1611
+ try { applyMemberCuts(mesh, el.id, memberCuts, drill ? drill.tools : []); } // notch copes, then drill holes/openings
1612
+ catch (e) { // a malformed cut must never break the scene — and the member's geometry was not replaced, so NONE of its cuts is drawn
1613
+ console.warn('[steel-3d] member cuts failed; member drawn uncut', el.id, e);
1614
+ const id = String(el.id); // drop this member's partial records (keeping the unboundable holes), then list every cut
1615
+ cutsNotDrawnList = cutsNotDrawnList.filter((r) => r.memberId !== id || (drill && drill.notDrawable.some((nd) => nd.cutId === r.cutId && nd.kind === r.kind)));
1616
+ squareCopeList = squareCopeList.filter((r) => r.memberId !== id);
1617
+ for (const cut of memberCuts || []) cutsNotDrawnList.push(cutRecord(id, cut.halfSpace ? 'end-cut' : 'cope', cut.halfSpace ? 'the end cut' : 'the cope', cut.center, cut.id));
1618
+ for (const t of drill ? drill.tools : []) cutsNotDrawnList.push(cutRecord(id, t.kind, t.label, t.at, t.id, t.diameterMm));
1619
+ }
1620
+ }
1502
1621
  mesh.userData.id = el.id; mesh.userData.group = el.group; mesh.userData.profile = el.meta && el.meta.profile;
1503
1622
  mesh.userData.sectionShape = el.meta?.displaySection?.shape || el.xsection?.shape || shapeOf(el).toLowerCase();
1504
1623
  mesh.userData.family = familyOf(el); // the selection/hover clones and the restore path need it too
@@ -1571,6 +1690,8 @@ function buildFromScene(sc) {
1571
1690
  if (hadVisibilityFilter !== hasVisibilityFilter()) notifyVisibilityChange({ intentional: false }); // keep the host's recovery control honest when an edit removes the last hidden/isolated mesh
1572
1691
  applyGroupVisibility(); applyDisplayMode();
1573
1692
  built = true;
1693
+ applyCutMarks(); // #4027: an amber marker at every cut the view could not draw
1694
+ try { api?.onCutsNotDrawn?.(cutsNotDrawn(), { squareCopes: copesDrawnSquare() }); } catch (e) { console.warn('[steel-3d] onCutsNotDrawn handler failed', e); }
1574
1695
  floView?.modelChanged(); // Flo arrives on the model, or follows the member it stood on
1575
1696
  // Fit only on entering 3D (rebuild(true)) — NOT on every edit. Frames whatever is on screen, so a
1576
1697
  // project whose references are already cached opens on the borrowed model rather than on nothing.
@@ -3972,7 +4093,7 @@ async function rebuildSteel(fit = false) {
3972
4093
  camFramed = true;
3973
4094
  } else { camFramed = true; console.warn('[steel-3d] the scene fetch resolved empty — nothing was rebuilt'); } // dead-defensive (fetchScenePayload throws on !ok), but a falsy scene must not pass for a normal one — and must not strand the pane blank either
3974
4095
  refreshDims(); // persisted dims appear + survive edit-rebuilds (re-coloured for the current selection)
3975
- try { refreshOverlayDims(); } catch (e) { console.warn('dim overlays skipped (bad part)', e); } // a malformed part drops its overlay, never the whole rebuild (mirrors applyCopes' containment)
4096
+ try { refreshOverlayDims(); } catch (e) { console.warn('dim overlays skipped (bad part)', e); } // a malformed part drops its overlay, never the whole rebuild (mirrors applyMemberCuts' containment)
3976
4097
  }
3977
4098
 
3978
4099
  // ---- Persp/Ortho + Solid/Wire/X-ray + group visibility (parity with the AWARE viewer) ----
@@ -4417,12 +4538,15 @@ function initSharedClipLayer() {
4417
4538
  rayAt: (clientX, clientY) => { const value = rayAt(clientX, clientY); return { origin: value.origin, direction: value.direction }; },
4418
4539
  getClips: () => clipSession.clips(), getSelectedClipIds: () => clipSession.selected(),
4419
4540
  isPlacementArmed: () => !!clipMode,
4541
+ gesture: () => { updateStatusChip(); }, // a rotation drag narrates itself in the status chip (instructorCommand → steel.clip-rotate)
4420
4542
  formatDistance: (valueMm) => api?.fmtLen ? api.fmtLen(valueMm) : `${(valueMm / FT_MM).toFixed(2)} ft`,
4421
4543
  update({ clipId, clip }) {
4422
4544
  sharedClipEdit ||= clipSession.beginLogicalEdit('clip-handle-drag');
4423
4545
  const patch = clip.kind === 'plane'
4424
4546
  ? { origin: [...(clip.origin ?? clip.point)], normal: [...(clip.normal ?? clip.n)] }
4425
- : { min: [...(clip.box?.min ?? clip.min)], max: [...(clip.box?.max ?? clip.max)] };
4547
+ // rotationDeg travels with the bounds — null (no rotation) when absent, so an Esc restore of a
4548
+ // box that started unrotated clears a rotation a drag had added rather than merging it back in.
4549
+ : { min: [...(clip.box?.min ?? clip.min)], max: [...(clip.box?.max ?? clip.max)], rotationDeg: clip.box?.rotationDeg ?? clip.rotationDeg ?? null };
4426
4550
  sharedClipEdit.update(clipId, patch);
4427
4551
  },
4428
4552
  commit() { sharedClipEdit?.finish(); sharedClipEdit = null; if (readout) readout.style.display = 'none'; },
@@ -4451,8 +4575,18 @@ function applyClips() {
4451
4575
  viewportReports?.reportSectionState();
4452
4576
  if (ghostUnselectedEnabled) applyDisplayMode(); // clipping can remove the last focused rendered fragment
4453
4577
  }
4454
- // 6 inward planes (keep INSIDE) for an axis-aligned Box3 → a section/clip box.
4455
- function boxToPlanes(b) {
4578
+ // The rotation a clip-box record carries (model-clip-box.js), or null for an axis-aligned one.
4579
+ function clipRotationOf(value) {
4580
+ const rotation = value?.rotationDeg ?? value?.box?.rotationDeg;
4581
+ return Array.isArray(rotation) && clipBoxIsRotated({ rotationDeg: rotation }) ? [...rotation] : null;
4582
+ }
4583
+ // 6 inward planes (keep INSIDE) for a Box3 → a section/clip box, turned about its centre when the clip
4584
+ // is rotated. Still six half-spaces, so the kept region stays convex for snapping (model-snapping.js).
4585
+ function boxToPlanes(b, rotationDeg = null) {
4586
+ if (rotationDeg && clipBoxIsRotated({ rotationDeg })) {
4587
+ return clipBoxPlanes({ min: b.min.toArray(), max: b.max.toArray(), rotationDeg }).map((plane) =>
4588
+ new THREE.Plane().setFromNormalAndCoplanarPoint(new THREE.Vector3(...plane.normal), new THREE.Vector3(...plane.origin)));
4589
+ }
4456
4590
  return [
4457
4591
  new THREE.Plane(new THREE.Vector3(-1, 0, 0), b.max.x), new THREE.Plane(new THREE.Vector3(1, 0, 0), -b.min.x),
4458
4592
  new THREE.Plane(new THREE.Vector3(0, -1, 0), b.max.y), new THREE.Plane(new THREE.Vector3(0, 1, 0), -b.min.y),
@@ -4460,7 +4594,7 @@ function boxToPlanes(b) {
4460
4594
  ];
4461
4595
  }
4462
4596
  function rebuildClipPlanes(c) { // recompute a clip's .planes from its editable source geometry (after a handle drag)
4463
- c.planes = c.kind === 'box' ? boxToPlanes(c.box) : [new THREE.Plane().setFromNormalAndCoplanarPoint(c.n, c.point)];
4597
+ c.planes = c.kind === 'box' ? boxToPlanes(c.box, c.rotationDeg) : [new THREE.Plane().setFromNormalAndCoplanarPoint(c.n, c.point)];
4464
4598
  }
4465
4599
  function setClipMode(m) { // arm/disarm a clip pick: 'plane' (click a face) | 'box' (draw 2 corners) | null
4466
4600
  abandonConnPick('other-tool'); // every other mode disarms its rivals; without this the pick keeps swallowing clicks while another tool reports armed
@@ -4680,7 +4814,7 @@ function renameClip(id, name) {
4680
4814
  }
4681
4815
  function removeClip(id) { return clipSession?.remove(id) ?? false; }
4682
4816
  function clearClips() { return clipSession?.clear() ?? false; }
4683
- function getClips() { return clips.map((c) => ({ id: c.id, kind: c.kind, enabled: c.enabled, label: c.label, selected: selectedClipIds.has(c.id), size: c.box ? [c.box.max.x - c.box.min.x, c.box.max.y - c.box.min.y, c.box.max.z - c.box.min.z].map((v) => Math.round(v)) : null, planeConst: c.kind === 'plane' && c.planes[0] ? Math.round(c.planes[0].constant) : null })); }
4817
+ function getClips() { return clips.map((c) => ({ id: c.id, kind: c.kind, enabled: c.enabled, label: c.label, selected: selectedClipIds.has(c.id), size: c.box ? [c.box.max.x - c.box.min.x, c.box.max.y - c.box.min.y, c.box.max.z - c.box.min.z].map((v) => Math.round(v)) : null, rotationDeg: c.kind === 'box' ? (c.rotationDeg ? [...c.rotationDeg] : [0, 0, 0]) : null, planeConst: c.kind === 'plane' && c.planes[0] ? Math.round(c.planes[0].constant) : null })); }
4684
4818
  function setSelectedClips(ids) { return clipSession?.setSelected(ids) ?? null; }
4685
4819
  function selectClip(id, event = {}) {
4686
4820
  return clipSession ? (id ? clipSession.select(id, event) : clipSession.clearSelection()) : null;
@@ -4688,9 +4822,13 @@ function selectClip(id, event = {}) {
4688
4822
  function selectedClips() { return clipSession?.selected?.() ?? [...selectedClipIds]; }
4689
4823
  function deleteSelectedClips() { return clipSession?.deleteSelected() ?? 0; }
4690
4824
  function mountClipList(host) {
4691
- sharedClipList?.destroy?.(); sharedClipList = null;
4825
+ // The legend rebuilds on every clip change and re-attaches the same host: keep its list, so a press that
4826
+ // committed a typed angle on its way in (the commit is what rebuilt the legend) still lands on a live control.
4827
+ if (sharedClipList && sharedClipListHost === host) return sharedClipList;
4828
+ sharedClipList?.destroy?.(); sharedClipList = null; sharedClipListHost = null;
4692
4829
  if (!clipSession || !host) return null;
4693
- sharedClipList = mountModelClipList({ session: clipSession, host, onError: (message) => api?.toast?.(message) });
4830
+ sharedClipList = mountModelClipList({ session: clipSession, host, onError: (message) => api?.toast?.(message), commandPrefix: 'steel' });
4831
+ sharedClipListHost = host;
4694
4832
  return sharedClipList;
4695
4833
  }
4696
4834
  // ---- undo/redo: clips + work area are view-state (not in the contract), so the editor's snapshot grabs this
@@ -4699,7 +4837,7 @@ function mountClipList(host) {
4699
4837
  function clipState() {
4700
4838
  return {
4701
4839
  clips: clips.map((c) => c.kind === 'box'
4702
- ? { id: c.id, kind: 'box', enabled: c.enabled, label: c.label, box: { min: c.box.min.toArray(), max: c.box.max.toArray() } }
4840
+ ? { id: c.id, kind: 'box', enabled: c.enabled, label: c.label, box: { min: c.box.min.toArray(), max: c.box.max.toArray() }, ...(c.rotationDeg ? { rotationDeg: [...c.rotationDeg] } : {}) }
4703
4841
  : { id: c.id, kind: 'plane', enabled: c.enabled, label: c.label, n: c.n.toArray(), point: c.point.toArray() }),
4704
4842
  workArea: workArea ? { enabled: workArea.enabled, whole: !!workArea.whole, box: { min: workArea.box.min.toArray(), max: workArea.box.max.toArray() } } : null,
4705
4843
  selected: [...selectedClipIds], seq: clipSeq,
@@ -4710,7 +4848,7 @@ function setClipStateSteel(s) {
4710
4848
  clips = (s.clips || []).map((d) => {
4711
4849
  const box = d.box || d; const point = d.point || d.origin; const normal = d.n || d.normal;
4712
4850
  const c = d.kind === 'box'
4713
- ? { id: d.id, kind: 'box', enabled: d.enabled, label: d.label, box: new THREE.Box3(new THREE.Vector3(...box.min), new THREE.Vector3(...box.max)), planes: [] }
4851
+ ? { id: d.id, kind: 'box', enabled: d.enabled, label: d.label, box: new THREE.Box3(new THREE.Vector3(...box.min), new THREE.Vector3(...box.max)), rotationDeg: clipRotationOf(d), planes: [] }
4714
4852
  : { id: d.id, kind: 'plane', enabled: d.enabled, label: d.label, n: new THREE.Vector3(...normal), point: new THREE.Vector3(...point), planes: [] };
4715
4853
  rebuildClipPlanes(c); return c;
4716
4854
  });
@@ -5802,9 +5940,107 @@ function aiMarksProbe() {
5802
5940
  };
5803
5941
  });
5804
5942
  }
5943
+ // ---- cuts the 3D view could not draw (#4027) ----
5944
+ // One amber ring with a "!" per cut a member is drawn WITHOUT (cutsNotDrawnList, rebuilt by every build): the cut is
5945
+ // still in the model, only the picture is missing it, and the Inspect callout says so in words. Drawn from the
5946
+ // --warn / --warn-bg / --warn-edge tokens (re-read on a theme change), about CUT_MARK_PX on screen in both cameras,
5947
+ // depth test off so it shows through steel, never pickable, never in the Fit box (it is not under `root`). Not
5948
+ // hideable on purpose: these are rare and a person must not be able to switch the warning off.
5949
+ const CUT_MARK_PX = 16;
5950
+ let cutMarkGroup = null;
5951
+ let cutMarkMat = null; // { key, mat }: owned, remade on a theme change, disposed on teardown
5952
+ function cutMarkMaterial() {
5953
+ const css = getComputedStyle(document.documentElement);
5954
+ const tok = (name, fallback) => css.getPropertyValue(name).trim() || fallback;
5955
+ const warn = tok('--warn', '#fbbf24'), warnBg = tok('--warn-bg', '#713f12'), warnEdge = tok('--warn-edge', '#713f12');
5956
+ const key = warn + '|' + warnBg + '|' + warnEdge;
5957
+ if (cutMarkMat && cutMarkMat.key === key) return cutMarkMat.mat;
5958
+ disposeCutMarkMat();
5959
+ const S = 64, c = document.createElement('canvas'); c.width = c.height = S;
5960
+ const g = c.getContext('2d'), mid = S / 2, r = S / 2 - 10;
5961
+ g.beginPath(); g.arc(mid, mid, r, 0, Math.PI * 2);
5962
+ g.lineWidth = 13; g.strokeStyle = 'rgba(2,6,23,0.6)'; g.stroke(); // dark halo: reads on bright steel and on the light background
5963
+ g.fillStyle = warnBg; g.fill();
5964
+ g.lineWidth = 6; g.strokeStyle = warn; g.stroke(); // the amber ring
5965
+ g.beginPath(); g.arc(mid, mid, r + 4, 0, Math.PI * 2); g.lineWidth = 1.5; g.strokeStyle = warnEdge; g.stroke();
5966
+ g.fillStyle = warn; g.textAlign = 'center'; g.textBaseline = 'middle';
5967
+ g.font = `700 30px ${getComputedStyle(document.body).fontFamily || 'sans-serif'}`;
5968
+ g.fillText('!', mid, mid + 1);
5969
+ const tex = new THREE.CanvasTexture(c); tex.colorSpace = THREE.SRGBColorSpace;
5970
+ cutMarkMat = { key, mat: new THREE.SpriteMaterial({ map: tex, transparent: true, depthTest: false, depthWrite: false }) };
5971
+ return cutMarkMat.mat;
5972
+ }
5973
+ function disposeCutMarkMat() {
5974
+ if (!cutMarkMat) return;
5975
+ cutMarkMat.mat.map?.dispose(); cutMarkMat.mat.dispose();
5976
+ cutMarkMat = null;
5977
+ }
5978
+ function applyCutMarks() {
5979
+ if (!scene) return;
5980
+ if (!cutMarkGroup) { cutMarkGroup = new THREE.Group(); cutMarkGroup.name = 'cut-not-drawn-marks'; scene.add(cutMarkGroup); }
5981
+ // Sprite geometry is SHARED by every THREE.Sprite in the page: never dispose it.
5982
+ for (const c of [...cutMarkGroup.children]) cutMarkGroup.remove(c);
5983
+ const withPlace = cutsNotDrawnList.filter((r) => Array.isArray(r.at) && r.at.every(Number.isFinite));
5984
+ if (!withPlace.length) return;
5985
+ const mat = cutMarkMaterial();
5986
+ for (const r of withPlace) {
5987
+ const sp = new THREE.Sprite(mat);
5988
+ sp.position.set(r.at[0], r.at[1], r.at[2]); sp.renderOrder = 998; sp.raycast = () => {}; // never a pick target
5989
+ sp.userData = { cutMark: true, memberId: r.memberId, kind: r.kind, cutId: r.cutId };
5990
+ cutMarkGroup.add(sp);
5991
+ }
5992
+ sizeCutMarks();
5993
+ }
5994
+ /** Per frame: hold the on-screen size, and hide a marker whose member is hidden (isolate, hidden group, …). */
5995
+ function sizeCutMarks() {
5996
+ if (!cutMarkGroup || !cutMarkGroup.children.length) return;
5997
+ for (const c of cutMarkGroup.children) {
5998
+ const mesh = meshById.get(c.userData.memberId);
5999
+ c.visible = !!mesh && mesh.visible !== false;
6000
+ c.scale.setScalar(pxToWorldAt(CUT_MARK_PX, c.position));
6001
+ }
6002
+ }
6003
+ /** The cuts the last build could not draw, optionally for one member: `{ memberId, kind, label, at, diameterMm, cutId }`.
6004
+ * `kind` is 'cope' | 'end-cut' | 'hole' | 'opening'; `label` the plain-English "what" ('the cope', 'a bolt hole', …). */
6005
+ function cutsNotDrawn(memberId) {
6006
+ const list = memberId == null ? cutsNotDrawnList : cutsNotDrawnList.filter((r) => r.memberId === String(memberId));
6007
+ return list.map((r) => ({ ...r, at: r.at ? [...r.at] : null }));
6008
+ }
6009
+ /** Copes drawn SQUARE because their re-entrant fillet fought CSG — drawn, so no marker, but not as modelled. */
6010
+ function copesDrawnSquare(memberId) {
6011
+ const list = memberId == null ? squareCopeList : squareCopeList.filter((r) => r.memberId === String(memberId));
6012
+ return list.map((r) => ({ ...r, at: r.at ? [...r.at] : null }));
6013
+ }
6014
+ /** For the E2E: each marker drawn, its screen position (client px) and on-screen size. */
6015
+ function cutMarksProbe() {
6016
+ const r = canvasEl ? canvasEl.getBoundingClientRect() : null;
6017
+ return (cutMarkGroup ? cutMarkGroup.children : []).map((c) => {
6018
+ let screen = null;
6019
+ if (r && camera) { const v = c.position.clone().project(camera); screen = [r.left + (v.x + 1) / 2 * r.width, r.top + (1 - v.y) / 2 * r.height]; }
6020
+ return { ...c.userData, visible: c.visible, screen, sizePx: c.scale.x / Math.max(1e-12, pxToWorldAt(1, c.position)),
6021
+ depthTest: c.material.depthTest, pickable: false };
6022
+ });
6023
+ }
6024
+ /** For the E2E geometry assertions: every hit of the segment `from`→`to` (world mm) on ONE member's mesh only, nearest
6025
+ * first — a drilled hole along its bolt axis gives no hit between the faces; the far flange still does. */
6026
+ function memberRaycast(id, from, to) {
6027
+ const mesh = meshById.get(id);
6028
+ if (!mesh || !Array.isArray(from) || !Array.isArray(to)) return null;
6029
+ const a = V(...from), dir = V(...to).sub(a), len = dir.length();
6030
+ if (!(len > 0)) return [];
6031
+ const rc = new THREE.Raycaster(a, dir.normalize(), 0, len);
6032
+ mesh.updateMatrixWorld(true);
6033
+ return rc.intersectObject(mesh, false).map((h) => ({ distance: h.distance, point: [h.point.x, h.point.y, h.point.z] }));
6034
+ }
6035
+ /** For the E2E: a member mesh's triangle count (a drilled member has more than the uncut build). */
6036
+ function memberTriangleCount(id) {
6037
+ const g = meshById.get(id)?.geometry;
6038
+ if (!g) return null;
6039
+ return g.index ? g.index.count / 3 : (g.getAttribute('position')?.count || 0) / 3;
6040
+ }
5805
6041
  if (typeof window !== 'undefined' && window.matchMedia) {
5806
- // A theme change re-colours the marks: the next apply sees a new key and remakes the two materials.
5807
- const retheme = () => { if (aiMarkSpec) applyAiMarks(); };
6042
+ // A theme change re-colours the marks: the next apply sees a new key and remakes the materials.
6043
+ const retheme = () => { if (aiMarkSpec) applyAiMarks(); if (cutMarkGroup && cutMarkGroup.children.length) applyCutMarks(); };
5808
6044
  try { new MutationObserver(retheme).observe(document.documentElement, { attributes: true, attributeFilter: ['data-theme', 'class'] }); } catch (_) {}
5809
6045
  try { window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', retheme); } catch (_) {}
5810
6046
  }
@@ -9202,6 +9438,8 @@ function lockChipTxt() { return tfLock.text(); }
9202
9438
  of these ids is authored once, in web/commands-steel.js. */
9203
9439
  function instructorCommand() {
9204
9440
  if (teklaDrag && teklaDrag.active) return { armed: 'steel.host-drag', step: 0 };
9441
+ if (clipOverlay?.activeGesture?.()?.kind === 'box-rotate') return { armed: 'steel.clip-rotate', step: 0 };
9442
+
9205
9443
  if (wpMode === 'face') return { armed: 'steel.work-plane-face', step: 0 };
9206
9444
  if (wpMode === '3pt') return { armed: 'steel.work-plane-3pt', step: (wpDraft || []).length };
9207
9445
  if (clipMode === 'box') return { armed: 'steel.clip-box', step: !clipBoxDraft ? 0 : (!clipBoxDraft.b ? 1 : 2) };
@@ -9420,8 +9658,9 @@ function isReady() { return built; }
9420
9658
  function disposeSteel() {
9421
9659
  floReduceOff?.(); floView?.dispose(); floView = null; clearTimeout(floMinTimer); floMinChip?.remove(); floMinChip = null; floCard?.remove(); floCard = null; floCardId = null; floPerchId = null;
9422
9660
  if (aiMarkGroup) { scene?.remove(aiMarkGroup); aiMarkGroup = null; } disposeAiMarkMats(); // #2521 row 6 (the spec is kept: a re-init redraws it)
9661
+ if (cutMarkGroup) { scene?.remove(cutMarkGroup); cutMarkGroup = null; } disposeCutMarkMat(); // #4027 (the list is kept: the next build redraws it)
9423
9662
  clipGesture?.dispose(); clipGesture = null;
9424
- sharedClipList?.destroy?.(); sharedClipList = null; releaseClipGestureInput?.(); releaseClipGestureInput = null; releaseClipOverlayInput?.(); releaseClipOverlayInput = null;
9663
+ sharedClipList?.destroy?.(); sharedClipList = null; sharedClipListHost = null; releaseClipGestureInput?.(); releaseClipGestureInput = null; releaseClipOverlayInput?.(); releaseClipOverlayInput = null;
9425
9664
  releaseClipSession?.(); releaseClipSession = null; releaseClipSpatial?.(); releaseClipSpatial = null;
9426
9665
  clipOverlay?.dispose(); clipOverlay = null; clipSession?.dispose(); clipSession = null; sharedClipEdit = null;
9427
9666
  cadToolController?.dispose(); cadToolController = null; cadToolDispatch = false;
@@ -10767,6 +11006,8 @@ window.Steel3DView = {
10767
11006
  setConnReview,
10768
11007
  // #2521 row 6: the member ends and connections that rest on an AI decision (the editor's ⋯ Display switch).
10769
11008
  setAiMarks, aiMarksProbe,
11009
+ // #4027: cuts the view could not draw (also pushed to api.onCutsNotDrawn after every build) + E2E geometry probes
11010
+ cutsNotDrawn, copesDrawnSquare, cutMarksProbe, memberRaycast, memberTriangleCount,
10770
11011
  // Flo on the model: the Labels menu switch, the mood the shell pushes from AI Chat, the editor's note before
10771
11012
  // it reloads for a change made elsewhere (so Flo can visit what changed), and a test probe.
10772
11013
  setFlo: (on) => setFloShown(on, 'page'),
@@ -34,6 +34,7 @@
34
34
  .crv-choice-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
35
35
  .crv-choice-actions button{min-height:28px;padding:4px 10px;font-size:11px}
36
36
  .crv-choice-actions button.primary{border-color:var(--brand);background:var(--brand-wash);color:var(--text);font-weight:600}
37
+ .crv-zone{display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin:3px 0 6px}
37
38
  .crv-row-note{color:var(--mut);font-size:10px;white-space:normal}
38
39
  @media (max-width:720px){.crv-drawer{width:100%}}
39
40
  /* The menu item exists only with a project open (the routes are a project's). The #moreMenu prefix is needed to beat
@@ -76,6 +77,9 @@ body.has-project #moreMenu #reviewChangesB,body.has-project #moreMenu #revertSep
76
77
  .tekla-changes-host>.tekla-audit-omissions{padding:3px 9px}
77
78
  .tekla-changes-banner{display:flex;flex-direction:column;gap:3px;margin:6px 7px;padding:7px 8px;border:1px solid var(--line);border-left:3px solid var(--danger);border-radius:6px;background:var(--panel-2);font-size:11px;line-height:1.4}
78
79
  .tekla-changes-banner span{color:var(--muted)}
80
+ .crv-witness-objects{display:flex;flex-direction:column;gap:5px;margin:3px 0 1px;padding:0;list-style:none}
81
+ .crv-witness-objects li{display:flex;flex-direction:column;gap:3px}
82
+ .tekla-changes-banner .crv-witness-objects li>span{color:var(--text);overflow-wrap:anywhere}
79
83
  .tekla-changes-unchecked{margin:6px 7px;padding:6px 8px;border:1px dashed var(--line-strong);border-radius:6px}
80
84
  .tekla-changes-unchecked strong{font-size:11px}
81
85
  .tekla-changes-unchecked .tekla-audit-omissions{padding:3px 0}
@@ -158,3 +162,28 @@ body.has-project #moreMenu #reviewChangesB,body.has-project #moreMenu #revertSep
158
162
  .tekla-changes-banner .tekla-changes-standards-list{color:var(--text)}
159
163
  .tekla-changes-standards-values>.tekla-changes-standards-list{max-height:14rem;overflow:auto}
160
164
  .tekla-changes-banner .tekla-changes-finding-meta{color:var(--muted)}
165
+ /* Change review S5 (#3749): the Team sharing strip above the pickers. Existing tokens only, both themes; Compare stays the one primary. */
166
+ .tekla-changes-team{display:flex;flex-direction:column;gap:6px;margin:8px 7px 0;padding:8px;border:1px solid var(--line);border-radius:6px;background:var(--panel-2)}
167
+ .tekla-changes-team-title{font-size:11px}
168
+ .tekla-changes-team-flows{display:grid;grid-template-columns:1fr 1fr;gap:6px}
169
+ .tekla-changes-team-flow{display:flex;flex-direction:column;gap:2px;min-width:0}
170
+ .tekla-changes-team-run{min-height:28px;padding:4px 8px;font-size:11px;font-weight:600;text-align:left}
171
+ .tekla-changes-team-pair{color:var(--muted);font-size:10px;overflow-wrap:anywhere}
172
+ .tekla-changes-team-note{display:flex;flex-direction:column;gap:4px;padding:6px 8px;border:1px solid var(--line);border-radius:6px;background:var(--bg);font-size:11px;line-height:1.4}
173
+ .tekla-changes-team-note.warn{border-left:3px solid var(--danger)}
174
+ .tekla-changes-team-note:focus{outline:2px solid var(--accent);outline-offset:1px}
175
+ .tekla-changes-team-link{align-self:flex-start;min-height:22px;padding:1px 0;border:0;background:transparent;color:var(--accent);font-size:11px;font-weight:600}
176
+ .tekla-changes-team-link:hover{background:transparent;text-decoration:underline}
177
+ .tekla-changes-team-marking{display:flex;flex-wrap:wrap;gap:6px}
178
+ .tekla-changes-team-mark{flex:1 1 auto;min-height:24px;padding:3px 8px;color:var(--muted);font-size:10.5px}
179
+ .tekla-changes-team-mark:hover{color:var(--text)}
180
+ .tekla-changes-mark-panel{margin-top:0}
181
+ .tekla-changes-mark-panel button.primary,.tekla-changes-team .tekla-changes-banner button.primary,.tekla-changes-mark-row button.primary{min-height:26px;padding:3px 10px;border-color:var(--accent);background:var(--accent-soft);color:var(--selected-ink);font-weight:600;font-size:11px}
182
+ .tekla-changes-team-answer{min-height:26px;padding:3px 9px;font-size:11px}
183
+ .tekla-changes-team .tekla-changes-banner{margin:0}
184
+ .tekla-changes-marks>summary{cursor:pointer;padding:2px 0;color:var(--muted);font-size:10.5px;font-weight:600}
185
+ .tekla-changes-mark-row{display:flex;flex-direction:column;gap:2px;margin-top:5px;padding:5px 7px;border:1px solid var(--line);border-radius:5px;background:var(--bg);font-size:11px}
186
+ .tekla-changes-mark-row>span{color:var(--muted);font-size:10.5px;overflow-wrap:anywhere}
187
+ .tekla-changes-mark-chip{align-self:flex-start;margin-top:2px}
188
+ .tekla-changes-flow-line{margin:4px 9px;padding:6px 8px;border-left:3px solid var(--line-strong);border-radius:0 5px 5px 0;background:var(--panel-2);font-size:11px;line-height:1.45}
189
+ @media (max-width:420px){.tekla-changes-team-flows{grid-template-columns:1fr}}
@@ -28,6 +28,12 @@ export const FIT_LABELS = Object.freeze({
28
28
  'bolt-pitch': 'Bolt spacing against the rule minimum',
29
29
  'cut-gap': 'Cut end sits on the face it was cut to (no gap)',
30
30
  'cut-overlap': 'Cut end does not sink into the face it was cut to',
31
+ 'bolt-rows': 'Bolt group depth against the full row count',
32
+ 'single-row': 'One bolt row',
33
+ 'bolt-size': 'Bolt size the design code lists',
34
+ 'bolt-standard': 'Bolt standard that lists this bolt size',
35
+ 'stiffener-corner': 'Stiffener corners at the support fillet',
36
+ 'plate-layout': 'Plate layout against the one it started from',
31
37
  'surface-position': 'Plate sits at the drawn angle on the tube',
32
38
  clash: 'Parts clear of each other and of the members',
33
39
  });