@floless/app 0.168.0 → 0.170.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.
- package/cli-actions.mjs +8 -1
- package/dist/floless-server.cjs +125533 -99597
- package/dist/schemas/drawing-check.profile.v1.schema.json +12 -2
- package/dist/schemas/steel.model.v2.schema.json +2 -1
- package/dist/skills/floless-app-knowledge/SKILL.md +43 -13
- package/dist/skills/floless-app-new-workflow/SKILL.md +8 -1
- package/dist/skills/floless-app-rfi/SKILL.md +4 -2
- package/dist/skills/floless-app-routines/SKILL.md +2 -2
- package/dist/skills/floless-app-routines/references/routines-api.md +20 -8
- package/dist/skills/floless-app-steel-model/SKILL.md +8 -5
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +31 -1
- package/dist/skills/floless-app-workflows/SKILL.md +22 -3
- package/dist/skills/floless-app-workflows/references/agent-steps.md +40 -6
- package/dist/skills/floless-app-workflows/references/exec-contract.md +27 -0
- package/dist/skills/floless-app-workflows/references/script-runner.md +105 -0
- package/dist/templates/college-phase-exporter.flo +7 -2
- package/dist/templates/trimble-list-projects.flo +10 -2
- package/dist/web/agent-steps.js +90 -19
- package/dist/web/agents.js +77 -31
- package/dist/web/app.css +267 -4
- package/dist/web/app.js +71 -7
- package/dist/web/aware-update-client.js +4 -4
- package/dist/web/aware.js +1277 -219
- package/dist/web/chat.css +10 -0
- package/dist/web/chat.js +407 -117
- package/dist/web/checkpoint-standard.js +5 -3
- package/dist/web/commands-drawing-check.js +4 -0
- package/dist/web/commands-shell.js +551 -15
- package/dist/web/commands-steel.js +68 -2
- package/dist/web/commands-vector.js +69 -0
- package/dist/web/drawing-check-editor.html +10 -0
- package/dist/web/drawing-check-editor.js +821 -237
- package/dist/web/failure-copy.js +50 -2
- package/dist/web/filter-ai-proposal.js +11 -8
- package/dist/web/flo-3d.js +310 -0
- package/dist/web/flo-card.js +72 -0
- package/dist/web/guide.js +33 -24
- package/dist/web/index.html +95 -5
- package/dist/web/instructor.js +102 -15
- package/dist/web/left-pane.js +4 -1
- package/dist/web/local-discovery.js +8 -7
- package/dist/web/missed-routines.js +239 -0
- package/dist/web/model-editor-steel-adapter.js +41 -1
- package/dist/web/model-measure.js +6 -0
- package/dist/web/model-spatial-panel.js +19 -4
- package/dist/web/model-spatial-tools.js +3 -3
- package/dist/web/model-viewport-revit-adapter.js +3 -3
- package/dist/web/model-viewport-toolbar.js +11 -0
- package/dist/web/origin-rule.js +155 -0
- package/dist/web/pages.js +17 -14
- package/dist/web/panels.js +1 -1
- package/dist/web/project-access.js +1 -1
- package/dist/web/project-history.js +2 -2
- package/dist/web/project-modules.js +5 -5
- package/dist/web/project-reconciliation.js +1 -1
- package/dist/web/project-rfis.js +8 -3
- package/dist/web/project-workflows.js +8 -6
- package/dist/web/renderers.js +6 -0
- package/dist/web/report-csp.js +68 -0
- package/dist/web/revit-editor.js +22 -8
- package/dist/web/run-history.js +14 -4
- package/dist/web/steel-3d-core.js +39 -9
- package/dist/web/steel-3d-flo.js +331 -0
- package/dist/web/steel-3d-view.js +164 -0
- package/dist/web/steel-ai-marks.js +3 -1
- package/dist/web/steel-editor.html +583 -129
- package/dist/web/steel-environments.js +297 -0
- package/dist/web/steel-filter.html +3 -2
- package/dist/web/steel-model-v2-client-validation.js +8 -1
- package/dist/web/steel-model-v2-commands.js +23 -9
- package/dist/web/steel-model-v2-projection.js +1 -1
- package/dist/web/step-rename.js +3 -2
- package/dist/web/terminal-requests.js +79 -1
- package/dist/web/tool-updates.js +9 -7
- package/dist/web/vector-3d.html +1 -1
- package/dist/web/vector-editor.html +50 -8
- package/dist/web/workspace-root-management.js +1 -1
- package/dist/web/workspaces.js +2334 -253
- package/launch.mjs +5 -0
- package/package.json +11 -8
|
@@ -27,6 +27,7 @@ import { snapPoint, planPointToWp, memberGeometry, snapElevation, dim3dGeom, dom
|
|
|
27
27
|
import { visibleGridLevels, gridTransientScopeSignature, reconcileGridTransientState, objectSelectionStatus } from './grid-core.js';
|
|
28
28
|
import { createEntityKeyRegistry, encodeCameraState } from './model-viewport-state.js';
|
|
29
29
|
import { createModelViewportController } from './model-viewport.js';
|
|
30
|
+
import { createSteelFlo } from './steel-3d-flo.js';
|
|
30
31
|
import { createSteelViewportAdapter } from './model-viewport-steel-adapter.js';
|
|
31
32
|
import { MODEL_NAMED_VIEWS, createCadOrbitEventProxy, mountCadInputArbiter, modelCameraClipRange } from './model-navigation-controls.js';
|
|
32
33
|
import { createModelCadToolController } from './model-cad-tools.js';
|
|
@@ -698,6 +699,37 @@ function init(canvas, theApi, options = {}) {
|
|
|
698
699
|
// every stroke gets a dark halo so it reads on any background. depthTest off → always on top.
|
|
699
700
|
marker = new THREE.Sprite(new THREE.SpriteMaterial({ map: reticleFor('dot'), transparent: true, depthTest: false, depthWrite: false }));
|
|
700
701
|
marker.visible = false; marker.renderOrder = 999; scene.add(marker);
|
|
702
|
+
// Flo on the model (web/steel-3d-flo.js): decoration only. It is not in meshById, so it is never picked as a
|
|
703
|
+
// member, never in the Fit box and never a snap candidate. Needs flo.js (floPose), which the editor loads first.
|
|
704
|
+
if (typeof window.floPose === 'function') {
|
|
705
|
+
const reduce = window.matchMedia ? window.matchMedia('(prefers-reduced-motion: reduce)') : null;
|
|
706
|
+
floView = createSteelFlo({ THREE, scene, meshById, getCamera: () => camera, getSceneBox: () => sceneBox, pxToWorldAt,
|
|
707
|
+
floPose: window.floPose, reducedMotion: !!reduce?.matches, enabled: floStartsShown(), onPerch: showFloCard });
|
|
708
|
+
floReduceOff?.();
|
|
709
|
+
const onReduce = () => floView?.setReducedMotion(reduce.matches);
|
|
710
|
+
reduce?.addEventListener?.('change', onReduce);
|
|
711
|
+
floReduceOff = () => { reduce?.removeEventListener?.('change', onReduce); floReduceOff = null; };
|
|
712
|
+
floView.setShellMood(floMoodWanted); // the shell may have said what AI Chat is doing before 3D was opened
|
|
713
|
+
// Hide, next to Flo while the pointer is on it (the Drawing Filter's "–" in Flo's bubble corner). The
|
|
714
|
+
// always-there control is Show Flo in the 3D Labels menu; this is the shortcut where Flo is.
|
|
715
|
+
// Flo's card: what the member Flo stands on is (web/flo-card.js decides what it says, the page supplies the
|
|
716
|
+
// values). Decorative and a copy of Properties, so it takes no pointer and is hidden from screen readers.
|
|
717
|
+
floCard = document.createElement('div');
|
|
718
|
+
floCard.id = 'm3dFloCard';
|
|
719
|
+
floCard.setAttribute('aria-hidden', 'true');
|
|
720
|
+
document.body.appendChild(floCard);
|
|
721
|
+
applyFloSize(floStoredSize()); // Flo and its card at the person's size (Labels → Flo size)
|
|
722
|
+
floMinChip = document.createElement('button');
|
|
723
|
+
floMinChip.id = 'm3dFloMin'; floMinChip.type = 'button';
|
|
724
|
+
floMinChip.setAttribute('aria-label', 'Hide Flo');
|
|
725
|
+
floMinChip.dataset.commandId = 'steel.flo-minimize';
|
|
726
|
+
floMinChip.dataset.tip = 'Hide Flo. Turn it back on in Labels.';
|
|
727
|
+
floMinChip.innerHTML = '<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4 8h8"/></svg>';
|
|
728
|
+
floMinChip.addEventListener('pointerenter', () => clearTimeout(floMinTimer));
|
|
729
|
+
floMinChip.addEventListener('pointerleave', () => hideFloMinSoon());
|
|
730
|
+
floMinChip.addEventListener('click', (e) => { e.stopPropagation(); setFloShown(false, 'chip'); });
|
|
731
|
+
document.body.appendChild(floMinChip);
|
|
732
|
+
}
|
|
701
733
|
// live dimension readout (toast-styled, follows the cursor during a drag — feet + snap type).
|
|
702
734
|
// Two spans + textContent (never innerHTML) so it's XSS-proof; the type span is muted.
|
|
703
735
|
readout = document.createElement('div');
|
|
@@ -893,6 +925,7 @@ let unframedFrames = 0, unframedWarned = false; // a gate that never opens loo
|
|
|
893
925
|
// and left selLenLabelHost out, which this closes.
|
|
894
926
|
function hideLabelHosts() {
|
|
895
927
|
for (const host of [dimLabelHost, memberLabelHost, propLabelHost, selLenLabelHost]) if (host) host.style.display = 'none';
|
|
928
|
+
floCard?.classList.remove('show');
|
|
896
929
|
if (propLabelNote) propLabelNote.style.display = 'none';
|
|
897
930
|
}
|
|
898
931
|
function renderSteelFrame() {
|
|
@@ -922,6 +955,8 @@ function renderSteelFrame() {
|
|
|
922
955
|
positionMemberLabels();
|
|
923
956
|
positionPropLabels();
|
|
924
957
|
positionSelLenLabels();
|
|
958
|
+
floView?.tick();
|
|
959
|
+
placeFloMin(placeFloCard()); // after the card: with a card up, the chip sits on its corner
|
|
925
960
|
renderer.render(scene, camera);
|
|
926
961
|
if (overlayScene && overlayScene.children.length) { // 2nd pass with clipping OFF → the clip/work-area gizmos are never sectioned by any clip
|
|
927
962
|
const saved = renderer.clippingPlanes;
|
|
@@ -1496,6 +1531,7 @@ function buildFromScene(sc) {
|
|
|
1496
1531
|
if (hadVisibilityFilter !== hasVisibilityFilter()) notifyVisibilityChange({ intentional: false }); // keep the host's recovery control honest when an edit removes the last hidden/isolated mesh
|
|
1497
1532
|
applyGroupVisibility(); applyDisplayMode();
|
|
1498
1533
|
built = true;
|
|
1534
|
+
floView?.modelChanged(); // Flo arrives on the model, or follows the member it stood on
|
|
1499
1535
|
// Fit only on entering 3D (rebuild(true)) — NOT on every edit. Frames whatever is on screen, so a
|
|
1500
1536
|
// project whose references are already cached opens on the borrowed model rather than on nothing.
|
|
1501
1537
|
// (A reference whose geometry is still streaming in arrives after this and is not re-framed; landing
|
|
@@ -4994,6 +5030,10 @@ function onKey(e) {
|
|
|
4994
5030
|
// Don't touch the dim tool while a member gesture (drag / box-select) owns the shared marker/readout —
|
|
4995
5031
|
// toggling would clear them mid-gesture. The gesture finishes on pointerup; the key is a no-op until then.
|
|
4996
5032
|
const midGesture = pending || dragging || boxSel;
|
|
5033
|
+
// #3145: D and the X/Y/Z/F locks are toggles, so a held key's auto-repeat would flip them on and off and leave
|
|
5034
|
+
// the tool or lock in whatever state the last repeat landed on. Only the first press counts; repeats are consumed.
|
|
5035
|
+
if (e.repeat && !e.ctrlKey && !e.metaKey && !e.altKey && !midGesture
|
|
5036
|
+
&& (k === 'd' || (dimMode3d && (k === 'f' || k === 'x' || k === 'y' || k === 'z')))) { e.preventDefault(); return; }
|
|
4997
5037
|
if (k === 'd' && !e.ctrlKey && !e.metaKey && !e.altKey && !midGesture) { e.preventDefault(); toggleMeasureTool(); return; } // D routes through the shared CAD lifecycle
|
|
4998
5038
|
if (dimMode3d && !midGesture) {
|
|
4999
5039
|
if (k === 'escape') { e.preventDefault(); if (snapOnly3d) setSnapOnly3d(null); else if (measureSession) { measureSession.cancelStep(); dimPreviewLine.visible = false; readout.style.display = 'none'; clearSharedSnapGuides(); } else if (dimDraft3d) { dimDraft3d = null; dimPreviewLine.visible = false; readout.style.display = 'none'; } else disarmMeasureTool(); return; } // Esc steps back through the common restriction → point 2 → point 1 → tool lifecycle
|
|
@@ -5316,8 +5356,115 @@ function setSelection(ids) {
|
|
|
5316
5356
|
if (reglow) applyDisplayMode(); // one re-sync after re-lighting the whole set, not one per part
|
|
5317
5357
|
updateStatusChip();
|
|
5318
5358
|
syncGizmoVisibility(); // the Profile Position gizmo follows the selection (single member only); (un)hides the frame gizmo to match
|
|
5359
|
+
floView?.selectionChanged(set); // Flo hops onto the member just selected
|
|
5360
|
+
if (floPerchId && set.has(floPerchId)) showFloCard(floPerchId); // with several selected, the card speaks for all of them
|
|
5319
5361
|
}
|
|
5320
5362
|
let selIds = new Set();
|
|
5363
|
+
let floView = null, floMoodWanted = 'idle', floMinChip = null, floMinTimer = 0, floReduceOff = null;
|
|
5364
|
+
let floCard = null, floCardId = null;
|
|
5365
|
+
// The member Flo stands on, kept even while its card has nothing to say (every field off): a field switched back on
|
|
5366
|
+
// (or Reset) brings the card back from it. floCardId is that member only while its card is showing.
|
|
5367
|
+
let floPerchId = null;
|
|
5368
|
+
// The card's size, measured only when its words or Flo size change (not every frame), and where it was last put.
|
|
5369
|
+
let floCardWH = null, floCardAt = null;
|
|
5370
|
+
const FLO_CARD_GAP = 12, FLO_CARD_EDGE = 8;
|
|
5371
|
+
// Flo's size as the page left it (Labels → Flo size, in percent); 1 when nothing valid is stored. The page's own
|
|
5372
|
+
// settings come first (api.floSettings): they hold even when the browser refuses to store them.
|
|
5373
|
+
function floStoredSize() {
|
|
5374
|
+
const pg = typeof api?.floSettings === 'function' ? api.floSettings() : null;
|
|
5375
|
+
if (pg) return pg.size >= 60 && pg.size <= 200 ? pg.size / 100 : 1;
|
|
5376
|
+
try { const v = Number(localStorage.getItem('steel:floSize:v2')); return v >= 60 && v <= 200 ? v / 100 : 1; } catch { return 1; }
|
|
5377
|
+
}
|
|
5378
|
+
function applyFloSize(k) { floView?.setScale(k); floCard?.style.setProperty('--fc-s', String(k)); measureFloCard(); }
|
|
5379
|
+
function measureFloCard() { floCardWH = floCard && floCardId ? { w: floCard.offsetWidth, h: floCard.offsetHeight } : null; }
|
|
5380
|
+
// Flo starts as the page left it: off until the person turns it on in the Labels menu.
|
|
5381
|
+
function floStartsShown() {
|
|
5382
|
+
const pg = typeof api?.floSettings === 'function' ? api.floSettings() : null;
|
|
5383
|
+
if (pg) return !!pg.on;
|
|
5384
|
+
try { return localStorage.getItem('steel:flo3d:v2') === 'on'; } catch { return false; }
|
|
5385
|
+
}
|
|
5386
|
+
// Flo landed on a member (or left it: id null). The card is filled once here, from the page's own formatted values,
|
|
5387
|
+
// and placed beside Flo on every frame by placeFloCard.
|
|
5388
|
+
function showFloCard(id) {
|
|
5389
|
+
if (!floCard) return;
|
|
5390
|
+
const card = id && typeof api?.floCardFor === 'function' ? api.floCardFor(id) : null;
|
|
5391
|
+
floPerchId = id || null;
|
|
5392
|
+
floCardId = card ? id : null;
|
|
5393
|
+
if (!card) { floCard.classList.remove('show'); floCardWH = floCardAt = null; return; }
|
|
5394
|
+
floCard.replaceChildren();
|
|
5395
|
+
const add = (cls, text, parent = floCard) => { const e = document.createElement('div'); e.className = cls; e.textContent = text; parent.appendChild(e); return e; };
|
|
5396
|
+
if (card.caption) add('fc-cap', card.caption);
|
|
5397
|
+
if (card.headline) add(card.headlineVaries ? 'fc-head fc-varies' : 'fc-head', card.headline);
|
|
5398
|
+
if (card.rows.length) {
|
|
5399
|
+
const grid = add('fc-rows', '');
|
|
5400
|
+
for (const r of card.rows) { add('fc-k', r.label, grid); add(r.varies ? 'fc-v fc-varies' : 'fc-v', r.value, grid); }
|
|
5401
|
+
}
|
|
5402
|
+
floCard.style.visibility = 'hidden'; // measured where it lands before it is seen
|
|
5403
|
+
floCard.classList.add('show');
|
|
5404
|
+
measureFloCard();
|
|
5405
|
+
placeFloCard();
|
|
5406
|
+
}
|
|
5407
|
+
// Beside Flo's head, on the right unless that runs off the stage or under the view cube (top right), then on the
|
|
5408
|
+
// left; always inside the stage. Hidden while Flo is off screen.
|
|
5409
|
+
// Returns the stage rect it read (or null), so the chip placed after it in the same frame need not read it again.
|
|
5410
|
+
function placeFloCard() {
|
|
5411
|
+
floCardAt = null;
|
|
5412
|
+
if (!floCard || !floCardId || !floView) return null;
|
|
5413
|
+
if (!canvasEl || canvasEl.style.display === 'none') { floCard.classList.remove('show'); return null; }
|
|
5414
|
+
const rect = canvasEl.getBoundingClientRect();
|
|
5415
|
+
const at = floView.hatScreen(camera, rect.width, rect.height);
|
|
5416
|
+
if (!at || at.x < 0 || at.y < 0 || at.x > rect.width || at.y > rect.height) { floCard.style.visibility = 'hidden'; return rect; }
|
|
5417
|
+
if (!floCardWH) measureFloCard();
|
|
5418
|
+
const { w, h } = floCardWH;
|
|
5419
|
+
const hx = rect.left + at.x, hy = rect.top + at.y;
|
|
5420
|
+
const clear = (at.half || 0) + FLO_CARD_GAP; // from Flo's middle to past its brim, at whatever size Flo is drawn
|
|
5421
|
+
const cube = { left: rect.right - 110, bottom: rect.top + 110 }; // the view cube
|
|
5422
|
+
let left = hx + clear, side = 'right';
|
|
5423
|
+
const top = Math.min(rect.bottom - FLO_CARD_EDGE - h, Math.max(rect.top + FLO_CARD_EDGE, hy - h * 0.35));
|
|
5424
|
+
if (left + w > rect.right - FLO_CARD_EDGE || (left + w > cube.left && top < cube.bottom)) { left = hx - clear - w; side = 'left'; }
|
|
5425
|
+
left = Math.max(rect.left + FLO_CARD_EDGE, left);
|
|
5426
|
+
floCard.style.left = Math.round(left) + 'px';
|
|
5427
|
+
floCard.style.top = Math.round(top) + 'px';
|
|
5428
|
+
floCard.dataset.side = side;
|
|
5429
|
+
// the tail points at Flo's head wherever the card had to sit
|
|
5430
|
+
floCard.style.setProperty('--fc-tail', Math.round(Math.min(h - 14, Math.max(10, hy - top - 6))) + 'px');
|
|
5431
|
+
floCard.style.visibility = '';
|
|
5432
|
+
floCardAt = { left, top, w };
|
|
5433
|
+
return rect;
|
|
5434
|
+
}
|
|
5435
|
+
// The one way Flo is shown or hidden (the chip beside Flo and the Labels menu both come here), so the page hears
|
|
5436
|
+
// every change and keeps its switch in step.
|
|
5437
|
+
function setFloShown(on, via) {
|
|
5438
|
+
if (!floView) return;
|
|
5439
|
+
floView.setEnabled(on, { animate: true });
|
|
5440
|
+
hideFloMin();
|
|
5441
|
+
window.dispatchEvent(new CustomEvent('floless:flo3d-shown', { detail: { on: !!on, via } }));
|
|
5442
|
+
}
|
|
5443
|
+
function hideFloMin() { clearTimeout(floMinTimer); floMinChip?.classList.remove('show'); }
|
|
5444
|
+
function hideFloMinSoon() { clearTimeout(floMinTimer); floMinTimer = setTimeout(hideFloMin, 2000); }
|
|
5445
|
+
// Pointer on Flo: show the Hide chip just above-right of its hat; it rides along with Flo while shown (placeFloMin),
|
|
5446
|
+
// so a hop or a turn of the view never leaves it behind. Off Flo: it stays two seconds, longer while pointed at.
|
|
5447
|
+
function floHoverAt(e) {
|
|
5448
|
+
if (!floView || !floMinChip || !floView.enabled) return;
|
|
5449
|
+
const rect = canvasEl.getBoundingClientRect();
|
|
5450
|
+
const ndc = new THREE.Vector2(((e.clientX - rect.left) / rect.width) * 2 - 1, -((e.clientY - rect.top) / rect.height) * 2 + 1);
|
|
5451
|
+
if (!floView.hover(ndc, camera)) { if (floMinChip.classList.contains('show')) hideFloMinSoon(); return; }
|
|
5452
|
+
clearTimeout(floMinTimer);
|
|
5453
|
+
if (floMinChip.classList.contains('show')) return;
|
|
5454
|
+
floMinChip.classList.add('show');
|
|
5455
|
+
placeFloMin();
|
|
5456
|
+
}
|
|
5457
|
+
// Every frame while the chip shows: on the top-right corner of Flo's card when the card is up (half outside it, so it
|
|
5458
|
+
// covers none of what the card says), else just above-right of Flo's hat; gone when Flo is off screen or not drawn.
|
|
5459
|
+
function placeFloMin(stageRect) {
|
|
5460
|
+
if (!floMinChip || !floMinChip.classList.contains('show') || !floView) return;
|
|
5461
|
+
const rect = stageRect || canvasEl.getBoundingClientRect();
|
|
5462
|
+
const at = canvasEl.style.display === 'none' ? null : floView.hatScreen(camera, rect.width, rect.height);
|
|
5463
|
+
if (!at || at.x < 0 || at.y < 0 || at.x > rect.width || at.y > rect.height) { hideFloMin(); return; }
|
|
5464
|
+
const card = floCardAt; // set by placeFloCard when the card is up and on screen
|
|
5465
|
+
floMinChip.style.left = Math.round(card ? card.left + card.w - 12 : rect.left + at.x + 10) + 'px';
|
|
5466
|
+
floMinChip.style.top = Math.round(card ? card.top - 12 : rect.top + at.y - 12) + 'px';
|
|
5467
|
+
}
|
|
5321
5468
|
// Material.clone() copies parameters but NOT instance-assigned callbacks, so a cloned highlight
|
|
5322
5469
|
// material loses the triplanar patch and falls back to three's stock UV sampling — the highlighted
|
|
5323
5470
|
// member's texture stretches and smears for as long as it stays selected or hovered.
|
|
@@ -8182,6 +8329,13 @@ function onDown(e) {
|
|
|
8182
8329
|
let onAnchorDown = false; try { onAnchorDown = pickPositionAnchorHover(e.clientX, e.clientY); } catch (err) { console.error('steel-3d: position-anchor hit-test failed', err); onAnchorDown = false; }
|
|
8183
8330
|
if (onAnchorDown) { e.stopPropagation(); controls.enabled = false; pending = { posAnchor: true }; return; }
|
|
8184
8331
|
}
|
|
8332
|
+
// A press on Flo tips its hat and leaves the selection alone; dragging on from it still becomes a marquee. Flo stands
|
|
8333
|
+
// on the selected member, where its end dots, the position gizmo and Trim/Extend/Split clicks are, so those come first.
|
|
8334
|
+
if (floView?.enabled && !endpointHit && !geoMode()) {
|
|
8335
|
+
const rect = canvasEl.getBoundingClientRect();
|
|
8336
|
+
const ndc = new THREE.Vector2(((e.clientX - rect.left) / rect.width) * 2 - 1, -((e.clientY - rect.top) / rect.height) * 2 + 1);
|
|
8337
|
+
if (floView.pointerDown(ndc, camera)) { e.stopPropagation(); controls.enabled = false; pending = { posAnchor: true }; return; }
|
|
8338
|
+
}
|
|
8185
8339
|
let id = null; try { id = pickAt(e.clientX, e.clientY); } catch { id = null; }
|
|
8186
8340
|
// Geometry-edit mode (Trim/Extend or Split armed in the inspector): a click does the edit, no drag.
|
|
8187
8341
|
const armedGeo = geoMode();
|
|
@@ -8479,6 +8633,7 @@ function onMoveEndpoint(e) {
|
|
|
8479
8633
|
function onMove(e) {
|
|
8480
8634
|
if (rightDownXY && Math.hypot(e.clientX - rightDownXY[0], e.clientY - rightDownXY[1]) > 5) rightMoved = true; // right-DRAG = orbit/pan, so no snap menu on the release
|
|
8481
8635
|
if (!renderer || !canvasEl || canvasEl.style.display === 'none') return; // 3D inactive — ignore window pointer events
|
|
8636
|
+
if (!pending && !boxSel && !teklaDrag && e.target === canvasEl) floHoverAt(e);
|
|
8482
8637
|
// Ctrl+Shift drag-out armed: this pointer stream is the gesture, so the move/copy path stands down.
|
|
8483
8638
|
// Below the drag tolerance nothing has happened yet — the press can still turn out to be a click.
|
|
8484
8639
|
if (teklaDrag) {
|
|
@@ -9198,6 +9353,7 @@ function setInputActive(on) { inputActive = on !== false; viewportController?.se
|
|
|
9198
9353
|
function isReady() { return built; }
|
|
9199
9354
|
|
|
9200
9355
|
function disposeSteel() {
|
|
9356
|
+
floReduceOff?.(); floView?.dispose(); floView = null; clearTimeout(floMinTimer); floMinChip?.remove(); floMinChip = null; floCard?.remove(); floCard = null; floCardId = null; floPerchId = null;
|
|
9201
9357
|
if (aiMarkGroup) { scene?.remove(aiMarkGroup); aiMarkGroup = null; } disposeAiMarkMats(); // #2521 row 6 (the spec is kept: a re-init redraws it)
|
|
9202
9358
|
clipGesture?.dispose(); clipGesture = null;
|
|
9203
9359
|
sharedClipList?.destroy?.(); sharedClipList = null; releaseClipGestureInput?.(); releaseClipGestureInput = null; releaseClipOverlayInput?.(); releaseClipOverlayInput = null;
|
|
@@ -9492,6 +9648,14 @@ window.Steel3DView = {
|
|
|
9492
9648
|
setConnReview,
|
|
9493
9649
|
// #2521 row 6: the member ends and connections that rest on an AI decision (the editor's ⋯ Display switch).
|
|
9494
9650
|
setAiMarks, aiMarksProbe,
|
|
9651
|
+
// Flo on the model: the Labels menu switch, the mood the shell pushes from AI Chat, the editor's note before
|
|
9652
|
+
// it reloads for a change made elsewhere (so Flo can visit what changed), and a test probe.
|
|
9653
|
+
setFlo: (on) => setFloShown(on, 'page'),
|
|
9654
|
+
setFloMood: (mood) => { floMoodWanted = mood; floView?.setShellMood(mood); },
|
|
9655
|
+
// The person changed what Flo's card shows (3D Labels → Flo): read the card again.
|
|
9656
|
+
refreshFloCard: () => { if (floPerchId) showFloCard(floPerchId); },
|
|
9657
|
+
// Labels → Flo size (a factor, 1 = as designed): Flo and its card together; the card is re-placed on the next frame.
|
|
9658
|
+
setFloSize: (k) => applyFloSize(Number.isFinite(k) && k > 0 ? k : 1), floRemember: () => floView?.remember(), floProbe: () => { if (!floView) return null; const r = canvasEl.getBoundingClientRect(), h = floView.hatScreen(camera, r.width, r.height), b = floView.screenBox(camera, r.width, r.height); return { ...floView.probe(), hat: h && { x: r.left + h.x, y: r.top + h.y, half: h.half }, box: b && { left: r.left + b.left, right: r.left + b.right, top: r.top + b.top, bottom: r.top + b.bottom }, chip: !!floMinChip?.classList.contains('show'), card: floCardId && floCard?.classList.contains('show') && floCard.style.visibility !== 'hidden' ? { id: floCardId, rect: floCard.getBoundingClientRect().toJSON(), side: floCard.dataset.side, text: floCard.innerText } : null }; },
|
|
9495
9659
|
// Reference models (#278) — an editor-only layer. `setReferences` takes the geometry the editor
|
|
9496
9660
|
// fetched from the reference route; nothing here ever passes through contractToScene, which is what
|
|
9497
9661
|
// keeps borrowed geometry out of every export by construction rather than by filtering.
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
* Pure, and read from the LIVE model the editor holds, so a mark sits on the member on screen.
|
|
30
30
|
*/
|
|
31
31
|
import { planViewId } from './steel-plan-view-id.js';
|
|
32
|
+
import { bottomLeftOrigin, originRuleNote } from './origin-rule.js';
|
|
32
33
|
import { createMemberPresenceIndex, memberPresence } from './steel-model-v2-projection.js';
|
|
33
34
|
import { FT_IN, formatElevation, normalizeDisplayUnits, parseElevationMm } from './display-units.js';
|
|
34
35
|
|
|
@@ -227,7 +228,8 @@ export function aiDecisionMarksOf(model) {
|
|
|
227
228
|
break;
|
|
228
229
|
}
|
|
229
230
|
case 'setup': {
|
|
230
|
-
|
|
231
|
+
// #2909: the note says how the AI's origin stands against FloLess's bottom-left default (never a block).
|
|
232
|
+
if (subject.row === 'origin') { note.push({ decisionId: id, channel: 'setup-origin', reason: 'model', rule: originRuleNote(bottomLeftOrigin(model), entry.value) }); break; }
|
|
231
233
|
const plan = plansByView.get(subject.viewId);
|
|
232
234
|
if (!plan) { note.push({ decisionId: id, channel: 'setup', reason: 'gone' }); break; }
|
|
233
235
|
if (!views.has(subject.viewId)) views.set(subject.viewId, []);
|