@floless/app 0.138.2 → 0.139.1
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/autostart.mjs +6 -2
- package/desktop-access-production-manifest.mjs +7 -0
- package/dist/floless-server.cjs +157207 -70887
- package/dist/schemas/model.continuation.v1.schema.json +19 -0
- package/dist/schemas/model.continuation.v2.schema.json +19 -0
- package/dist/schemas/model.query-response.v1.schema.json +95 -0
- package/dist/schemas/model.query-response.v2.schema.json +80 -0
- package/dist/schemas/model.query.v1.schema.json +87 -0
- package/dist/schemas/model.query.v2.schema.json +87 -0
- package/dist/schemas/model.snap-candidate.v1.schema.json +48 -0
- package/dist/schemas/model.snap-constraint.v1.schema.json +18 -0
- package/dist/schemas/model.snap-query.v1.schema.json +24 -0
- package/dist/schemas/model.snap-result.v1.schema.json +33 -0
- package/dist/schemas/model.snapshot.v1.schema.json +136 -0
- package/dist/schemas/revit.model.v1.schema.json +24 -0
- package/dist/schemas/steel.model.v2.schema.json +45 -6
- package/dist/skills/floless-app-approval/SKILL.md +19 -5
- package/dist/skills/floless-app-bridge/SKILL.md +19 -6
- package/dist/skills/floless-app-knowledge/SKILL.md +22 -1
- package/dist/skills/floless-app-new-workflow/SKILL.md +31 -27
- package/dist/skills/floless-app-new-workflow/references/build-and-verify.md +13 -12
- package/dist/skills/floless-app-onboarding/SKILL.md +3 -3
- package/dist/skills/floless-app-onboarding/references/floless-app-tour.md +16 -9
- package/dist/skills/floless-app-steel-model/SKILL.md +11 -2
- package/dist/skills/floless-app-steel-model/references/detail-from-a-screenshot.md +95 -0
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +142 -21
- package/dist/skills/floless-app-steel-takeoff/references/elevation-registration.md +19 -0
- package/dist/skills/floless-app-tweak-contract/SKILL.md +42 -8
- package/dist/skills/floless-app-vectorize/SKILL.md +19 -6
- package/dist/skills/floless-app-workflows/SKILL.md +30 -3
- package/dist/skills/floless-app-workflows/references/workspace-data.md +77 -4
- package/dist/templates/floless-workspace-model-report.flo +77 -0
- package/dist/templates/revit-model.flo +111 -0
- package/dist/web/app.css +415 -177
- package/dist/web/app.js +302 -51
- package/dist/web/aware.js +1357 -1032
- package/dist/web/chat.css +692 -0
- package/dist/web/chat.js +2651 -0
- package/dist/web/commands-revit.js +42 -0
- package/dist/web/commands-shell.js +531 -70
- package/dist/web/commands-steel.js +344 -146
- package/dist/web/commands.js +1 -1
- package/dist/web/index.html +283 -77
- package/dist/web/instructor.js +217 -36
- package/dist/web/left-pane.js +636 -0
- package/dist/web/model-artifact-loader.js +75 -0
- package/dist/web/model-authoring-gestures.js +141 -0
- package/dist/web/model-cad-tools.js +20 -0
- package/dist/web/model-clip-gesture.js +148 -0
- package/dist/web/model-clip-list.js +156 -0
- package/dist/web/model-clip-session.js +274 -0
- package/dist/web/model-clip-three-overlay.js +295 -0
- package/dist/web/model-clip-three-preview.js +59 -0
- package/dist/web/model-editor-contract.js +519 -0
- package/dist/web/model-editor-revit-adapter.js +139 -0
- package/dist/web/model-editor-shell.js +271 -0
- package/dist/web/model-editor-state-recovery.js +44 -0
- package/dist/web/model-editor-steel-adapter.js +415 -0
- package/dist/web/model-editor.css +268 -0
- package/dist/web/model-frame.js +192 -0
- package/dist/web/model-inspector.js +128 -0
- package/dist/web/model-measure.js +390 -0
- package/dist/web/model-navigation-controls.js +246 -0
- package/dist/web/model-orientation-overlay.js +217 -0
- package/dist/web/model-panel-bridge.js +230 -0
- package/dist/web/model-pointer-dock.js +164 -0
- package/dist/web/model-revit-module.js +83 -0
- package/dist/web/model-selection-coordinator.js +151 -0
- package/dist/web/model-selection-tools.js +290 -0
- package/dist/web/model-snap-contract.js +267 -0
- package/dist/web/model-snapping.js +497 -0
- package/dist/web/model-spatial-panel.js +294 -0
- package/dist/web/model-spatial-tools.js +249 -0
- package/dist/web/model-tree.js +47 -0
- package/dist/web/model-viewport-lighting.js +166 -0
- package/dist/web/model-viewport-revit-adapter.js +1224 -0
- package/dist/web/model-viewport-state.js +505 -0
- package/dist/web/model-viewport-steel-adapter.js +150 -0
- package/dist/web/model-viewport-toolbar.js +516 -0
- package/dist/web/model-viewport.js +717 -0
- package/dist/web/panels.js +8 -15
- package/dist/web/renderers.js +3 -0
- package/dist/web/revit-editor.css +35 -0
- package/dist/web/revit-editor.html +74 -0
- package/dist/web/revit-editor.js +845 -0
- package/dist/web/steel-3d-core.js +16 -44
- package/dist/web/steel-3d-view.js +1384 -633
- package/dist/web/steel-canvas-guidance.js +3 -1
- package/dist/web/steel-editor.html +2145 -1255
- package/dist/web/steel-filter.html +5 -1
- package/dist/web/steel-model-v2-commands.js +80 -3
- package/dist/web/steel-split-view.js +5 -39
- package/dist/web/steel-view-generation.js +107 -17
- package/dist/web/vector-3d.html +12 -0
- package/dist/web/workspaces.js +2154 -283
- package/distribution-profile-active.mjs +2 -0
- package/distribution-profile-production.mjs +47 -0
- package/distribution-profile-shared.mjs +8 -0
- package/distribution-profile.mjs +18 -0
- package/distribution-resource-inventory.mjs +81 -0
- package/launch.mjs +18 -10
- package/log.mjs +2 -1
- package/managed-runtime-policy.mjs +104 -0
- package/model-reader-policy-active.mjs +7 -0
- package/network-policy-active.mjs +6 -0
- package/package.json +17 -2
- package/post-update-marker.mjs +3 -1
- package/rvt-production-uat-authority.mjs +60 -0
- package/teardown.mjs +4 -3
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { sheetScaleMm } from './grid-core.js';
|
|
16
|
+
import {
|
|
17
|
+
frameCoordinates as sharedFrameCoordinates,
|
|
18
|
+
frameFromThreePoints as sharedFrameFromThreePoints,
|
|
19
|
+
framePoint as sharedFramePoint,
|
|
20
|
+
} from './model-spatial-tools.js';
|
|
21
|
+
// Compatibility export while callers move to the neutral state module that now owns this generic math.
|
|
22
|
+
export { clipSegmentToPlanes } from './model-viewport-state.js';
|
|
16
23
|
|
|
17
24
|
// Defined once in the leaf `steel-units` module and re-exported here, because this file is the seam a
|
|
18
25
|
// dozen consumers already import them from and `grid-core` (which this file imports) needs them too.
|
|
@@ -239,36 +246,6 @@ export function sectionKindOf(profile) {
|
|
|
239
246
|
return kind;
|
|
240
247
|
}
|
|
241
248
|
|
|
242
|
-
/**
|
|
243
|
-
* Clip a 3D segment against convex half-spaces. Each plane is
|
|
244
|
-
* `{ normal:[x,y,z], constant }`, with points on the non-negative side kept.
|
|
245
|
-
* The representation intentionally mirrors THREE.Plane without importing Three,
|
|
246
|
-
* so camera/section clipping stays deterministic and unit-testable.
|
|
247
|
-
*/
|
|
248
|
-
export function clipSegmentToPlanes(a, b, planes = []) {
|
|
249
|
-
let lo = 0, hi = 1;
|
|
250
|
-
for (const plane of planes) {
|
|
251
|
-
const n = plane && plane.normal;
|
|
252
|
-
if (!n) continue;
|
|
253
|
-
const c = Number(plane.constant) || 0;
|
|
254
|
-
const da = n[0] * a[0] + n[1] * a[1] + n[2] * a[2] + c;
|
|
255
|
-
const db = n[0] * b[0] + n[1] * b[1] + n[2] * b[2] + c;
|
|
256
|
-
if (da < 0 && db < 0) return null;
|
|
257
|
-
if (da < 0 || db < 0) {
|
|
258
|
-
const t = da / (da - db);
|
|
259
|
-
if (da < 0) lo = Math.max(lo, t);
|
|
260
|
-
else hi = Math.min(hi, t);
|
|
261
|
-
if (lo > hi) return null;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
const mix = (t) => [
|
|
265
|
-
a[0] + (b[0] - a[0]) * t,
|
|
266
|
-
a[1] + (b[1] - a[1]) * t,
|
|
267
|
-
a[2] + (b[2] - a[2]) * t,
|
|
268
|
-
];
|
|
269
|
-
return [mix(lo), mix(hi)];
|
|
270
|
-
}
|
|
271
|
-
|
|
272
249
|
/**
|
|
273
250
|
* THE clamped projection of a point onto a segment — the single implementation, for every caller.
|
|
274
251
|
*
|
|
@@ -864,16 +841,11 @@ export function vecToPlane(vec, u, v, n) {
|
|
|
864
841
|
// a tilted frame (from a 3-point pick) can point its normal anywhere (see frameFrom3Points).
|
|
865
842
|
/** world point → local: components of (p − origin) along each frame axis = Rᵀ·(p − origin). */
|
|
866
843
|
export function worldToLocal(p, frame) {
|
|
867
|
-
|
|
868
|
-
const d = [p[0] - o[0], p[1] - o[1], p[2] - o[2]];
|
|
869
|
-
return [nz(_dot(d, X)), nz(_dot(d, Y)), nz(_dot(d, Z))];
|
|
844
|
+
return sharedFrameCoordinates({ ...frame, zAxis: frame.normal }, p).map(nz);
|
|
870
845
|
}
|
|
871
846
|
/** local point → world: origin + lx·X + ly·Y + lz·Z. Inverse of worldToLocal. */
|
|
872
847
|
export function localToWorld(l, frame) {
|
|
873
|
-
|
|
874
|
-
return [nz(o[0] + l[0] * X[0] + l[1] * Y[0] + l[2] * Z[0]),
|
|
875
|
-
nz(o[1] + l[0] * X[1] + l[1] * Y[1] + l[2] * Z[1]),
|
|
876
|
-
nz(o[2] + l[0] * X[2] + l[1] * Y[2] + l[2] * Z[2])];
|
|
848
|
+
return sharedFramePoint({ ...frame, zAxis: frame.normal }, l).map(nz);
|
|
877
849
|
}
|
|
878
850
|
/** local VECTOR → world (rotation only, NO origin translation — for relative typed entry / offsets). */
|
|
879
851
|
export function localVectorToWorld(v, frame) {
|
|
@@ -889,11 +861,10 @@ export function localVectorToWorld(v, frame) {
|
|
|
889
861
|
* on the X line). Reuses planeFrom3Points (origin/xAxis/normal) and derives yAxis = normal × xAxis.
|
|
890
862
|
*/
|
|
891
863
|
export function frameFrom3Points(a, b, c) {
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
return { origin: p.origin, xAxis: p.xAxis, yAxis, normal: p.normal };
|
|
864
|
+
try {
|
|
865
|
+
const frame = sharedFrameFromThreePoints({ origin: a, xPoint: b, ySide: c });
|
|
866
|
+
return { origin: [...frame.origin], xAxis: [...frame.xAxis], yAxis: [...frame.yAxis], normal: [...frame.zAxis] };
|
|
867
|
+
} catch (_) { return null; }
|
|
897
868
|
}
|
|
898
869
|
/** The global identity frame (a no-op UCS). */
|
|
899
870
|
export function identityFrame(origin = [0, 0, 0]) {
|
|
@@ -916,8 +887,9 @@ export function frameFromAngle(origin, angleRad) {
|
|
|
916
887
|
* a real vertex/intersection always wins — the grid only catches a free click, never drowns geometry snap.
|
|
917
888
|
*/
|
|
918
889
|
export function snapGridPoint(p, frame, incMm) {
|
|
919
|
-
if (!frame || !Array.isArray(p) || !Number.isFinite(incMm) || !(incMm > 0)) return null;
|
|
920
|
-
|
|
890
|
+
if (!frame || !Array.isArray(p) || p.length !== 3 || !p.every(Number.isFinite) || !Number.isFinite(incMm) || !(incMm > 0)) return null;
|
|
891
|
+
let l;
|
|
892
|
+
try { l = worldToLocal(p, frame); } catch (_) { return null; }
|
|
921
893
|
const q = [Math.round(l[0] / incMm) * incMm, Math.round(l[1] / incMm) * incMm, Math.round(l[2] / incMm) * incMm];
|
|
922
894
|
const w = localToWorld(q, frame);
|
|
923
895
|
return (Number.isFinite(w[0]) && Number.isFinite(w[1]) && Number.isFinite(w[2])) ? w : null;
|