@floless/app 0.95.0 → 0.95.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/dist/floless-server.cjs
CHANGED
|
@@ -53106,7 +53106,7 @@ function appVersion() {
|
|
|
53106
53106
|
return resolveVersion({
|
|
53107
53107
|
isSea: isSea2(),
|
|
53108
53108
|
sqVersionXml: readSqVersionXml(),
|
|
53109
|
-
define: true ? "0.95.
|
|
53109
|
+
define: true ? "0.95.1" : void 0,
|
|
53110
53110
|
pkgVersion: readPkgVersion()
|
|
53111
53111
|
});
|
|
53112
53112
|
}
|
|
@@ -53116,7 +53116,7 @@ function resolveChannel(s) {
|
|
|
53116
53116
|
return "dev";
|
|
53117
53117
|
}
|
|
53118
53118
|
function appChannel() {
|
|
53119
|
-
return resolveChannel({ isSea: isSea2(), define: true ? "0.95.
|
|
53119
|
+
return resolveChannel({ isSea: isSea2(), define: true ? "0.95.1" : void 0 });
|
|
53120
53120
|
}
|
|
53121
53121
|
|
|
53122
53122
|
// workflow-update.ts
|
|
@@ -2324,6 +2324,7 @@ let wpMode = null; // 'face' | '3pt' — armed set-plane pick mode
|
|
|
2324
2324
|
let wpDraft = null; // 3pt picks collected so far
|
|
2325
2325
|
let wpVisible = true; // "Show plane" toggle (applies to an explicit plane)
|
|
2326
2326
|
let wpGroup = null;
|
|
2327
|
+
let wpExtent = null; // test-observability: the projected u/v footprint the last-rendered "Show plane" surface was sized to (null = fallback square)
|
|
2327
2328
|
// ---- 3D local drawing frame (UCS, stage 1): a SEPARATE rotate-about-Z frame for skewed framing.
|
|
2328
2329
|
// NOT the workPlane — an explicit ◇ Plane wins over it. null = global (world identity). Session-only,
|
|
2329
2330
|
// model-wide, never saved to the contract (the frame is a temporary aid; dims it authors persist, not it).
|
|
@@ -2604,10 +2605,10 @@ function orthoLockDelta(dx, dy) {
|
|
|
2604
2605
|
const du = dx * u[0] + dy * u[1], dv = dx * v[0] + dy * v[1];
|
|
2605
2606
|
return Math.abs(du) >= Math.abs(dv) ? [du * u[0], du * u[1]] : [dv * v[0], dv * v[1]];
|
|
2606
2607
|
}
|
|
2607
|
-
// The unified "Show plane" REFERENCE PLANE (Pawel 2026-07-13): a transparent
|
|
2608
|
-
// working plane the tools actually follow — a ◇ Plane if set, else the local frame (tilted), else horizontal
|
|
2609
|
-
// at the global origin. Sized to the Work area
|
|
2610
|
-
// top of it (renderFrameGizmo
|
|
2608
|
+
// The unified "Show plane" REFERENCE PLANE (Pawel 2026-07-13): a plain transparent surface (no grid) that MATCHES
|
|
2609
|
+
// the working plane the tools actually follow — a ◇ Plane if set, else the local frame (tilted), else horizontal
|
|
2610
|
+
// at the global origin. Sized to hug the current bounding box (Work area if set, else the model), projected onto
|
|
2611
|
+
// the plane's own u/v. The axes+origin gizmo always draws on top of it (renderFrameGizmo). Toggled by "Show plane".
|
|
2611
2612
|
function refPlaneBasis() {
|
|
2612
2613
|
if (workPlane) { const b = planeBasis(workPlane.normal, workPlane.xAxis); return { O: workPlane.origin, u: b.u, v: b.v, n: workPlane.normal }; }
|
|
2613
2614
|
if (frame3d) return { O: frame3d.origin, u: frame3d.xAxis, v: frame3d.yAxis, n: frame3d.normal };
|
|
@@ -2622,26 +2623,30 @@ function renderWorkPlane() {
|
|
|
2622
2623
|
// For a local frame / ◇ Plane these coincide; only at Global do they differ (plane at the active level's
|
|
2623
2624
|
// TOS, gizmo at world 0,0,0) — so the plane never lies about the work height (code-review High).
|
|
2624
2625
|
const wp = effectiveWP(), { u, v } = planeBasis(wp.normal, wp.xAxis), O = wp.origin, n = wp.normal;
|
|
2625
|
-
|
|
2626
|
+
// Project the bbox corners onto the plane's OWN u/v so a tilted/vertical (XZ/YZ) plane hugs its model in-plane,
|
|
2627
|
+
// not by world X/Y. The surface then spans exactly [uMin,uMax]×[vMin,vMax] (+ a small margin) — matching the box.
|
|
2626
2628
|
const box = (workArea && workArea.enabled && workArea.box && !workArea.box.isEmpty()) ? workArea.box : sceneBox;
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
+
let uMin = -1524, uMax = 1524, vMin = -1524, vMax = 1524; // fallback square when there's no model yet
|
|
2630
|
+
wpExtent = null;
|
|
2631
|
+
if (box && !box.isEmpty()) {
|
|
2632
|
+
let a = Infinity, A = -Infinity, b = Infinity, B = -Infinity;
|
|
2629
2633
|
for (const x of [box.min.x, box.max.x]) for (const y of [box.min.y, box.max.y]) for (const z of [box.min.z, box.max.z]) {
|
|
2630
2634
|
const dx = x - O[0], dy = y - O[1], dz = z - O[2];
|
|
2631
2635
|
const pu = dx * u[0] + dy * u[1] + dz * u[2], pv = dx * v[0] + dy * v[1] + dz * v[2];
|
|
2632
|
-
|
|
2636
|
+
a = Math.min(a, pu); A = Math.max(A, pu); b = Math.min(b, pv); B = Math.max(B, pv);
|
|
2637
|
+
}
|
|
2638
|
+
if ([a, A, b, B].every(Number.isFinite)) { // a NaN/∞ box (malformed scene) falls through to the fallback square instead of corrupt geometry
|
|
2639
|
+
const m = 305; uMin = a - m; uMax = A + m; vMin = b - m; vMax = B + m; // ~1 ft margin so edge members aren't flush with the border
|
|
2640
|
+
wpExtent = { uSpan: A - a, vSpan: B - b, margin: m, workArea: box !== sceneBox }; // pre-margin footprint in the SAME basis the surface used (so a probe holds for work-area/tilted planes too)
|
|
2633
2641
|
}
|
|
2634
|
-
span = Math.max(uMax - uMin, vMax - vMin, 3048) * 1.15;
|
|
2635
2642
|
}
|
|
2636
|
-
const
|
|
2643
|
+
const w = Math.max(uMax - uMin, 1), h = Math.max(vMax - vMin, 1), uc = (uMin + uMax) / 2, vc = (vMin + vMax) / 2;
|
|
2637
2644
|
const g = new THREE.Group();
|
|
2638
|
-
const
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
g.add(new THREE.
|
|
2643
|
-
const edge = [new THREE.Vector3(-half, -half, 0), new THREE.Vector3(half, -half, 0), new THREE.Vector3(half, half, 0), new THREE.Vector3(-half, half, 0)];
|
|
2644
|
-
g.add(new THREE.LineLoop(new THREE.BufferGeometry().setFromPoints(edge), new THREE.LineBasicMaterial({ color: 0x3b82f6, transparent: true, opacity: 0.42 }))); // brighter perimeter so the plane's extent reads now that it's sized to the work-area/model (ux review)
|
|
2645
|
+
const surf = new THREE.Mesh(new THREE.PlaneGeometry(w, h), new THREE.MeshBasicMaterial({ color: 0x93c5fd, transparent: true, opacity: 0.1, side: THREE.DoubleSide, depthWrite: false })); // plain transparent surface, light blue — no grid (the gizmo carries the axes)
|
|
2646
|
+
surf.position.set(uc, vc, 0); // centered on the box footprint, not the plane origin
|
|
2647
|
+
g.add(surf);
|
|
2648
|
+
const edge = [new THREE.Vector3(uMin, vMin, 0), new THREE.Vector3(uMax, vMin, 0), new THREE.Vector3(uMax, vMax, 0), new THREE.Vector3(uMin, vMax, 0)];
|
|
2649
|
+
g.add(new THREE.LineLoop(new THREE.BufferGeometry().setFromPoints(edge), new THREE.LineBasicMaterial({ color: 0x93c5fd, transparent: true, opacity: 0.4 }))); // faint perimeter so the plane's extent still reads without a grid (ux)
|
|
2645
2650
|
g.applyMatrix4(new THREE.Matrix4().makeBasis(new THREE.Vector3(...u), new THREE.Vector3(...v), new THREE.Vector3(...n)));
|
|
2646
2651
|
g.position.set(O[0], O[1], O[2]);
|
|
2647
2652
|
wpGroup = g; scene.add(g); // on `scene` (like epGroup) so rebuild() never wipes it; not in meshById → picking ignores it
|
|
@@ -3650,6 +3655,10 @@ window.Steel3DView = {
|
|
|
3650
3655
|
epScreen: (id) => { const m = memberById(id); if (!m || !canvasEl) return null; const g = memberGeometry(m, api.ptPerFt(), api.defaultTosMm()); const rect = canvasEl.getBoundingClientRect(); const proj = (p) => { const v = new THREE.Vector3(p[0], p[1], p[2]).project(camera); return { x: rect.left + (v.x * 0.5 + 0.5) * rect.width, y: rect.top + (-v.y * 0.5 + 0.5) * rect.height }; }; return { a: proj(g.line[0]), b: proj(g.line[1]) }; }, // project a member's endpoints to viewport px — test probe for endpoint-drag tests
|
|
3651
3656
|
refreshGrid: buildStructGrid, // grid edited in the panel → re-render without a full rebuild
|
|
3652
3657
|
gridInfo: () => ({ lines: structGridGroup ? 1 : 0, labels: gridLabelGroup ? gridLabelGroup.children.length : 0 }), // test helper
|
|
3658
|
+
wpProbe: () => { // test helper: the "Show plane" reference surface — asserts no grid, bbox-sized surface, light-blue colour. `extent` is the projected u/v footprint the surface was actually sized to (work-area/tilted-plane aware), null for the fallback square. Surface w == extent.uSpan + 2*extent.margin.
|
|
3659
|
+
if (!wpGroup) return { group: false, extent: wpExtent };
|
|
3660
|
+
return { group: true, extent: wpExtent, children: wpGroup.children.map((c) => ({ type: c.type, color: c.material && '#' + c.material.color.getHexString(), opacity: c.material && c.material.opacity, w: c.geometry && c.geometry.parameters ? c.geometry.parameters.width : null, h: c.geometry && c.geometry.parameters ? c.geometry.parameters.height : null })) };
|
|
3661
|
+
},
|
|
3653
3662
|
toggleGroup, setGroupsHidden, setIdsHidden, connHiddenIds: () => [...connHidden], soloToggle, setSoloGroups, showAllGroups, groupState, getGroups,
|
|
3654
3663
|
setClipMode, clipMode: clipModeOn, addClipBox, toggleClip, removeClip, clearClips, getClips, renameClip, selectClip, setSelectedClips, selectedClips, deleteSelectedClips, clipState, setClipState,
|
|
3655
3664
|
isolateSelected, clearIsolation, isIsolated,
|
|
@@ -880,7 +880,7 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
|
|
|
880
880
|
<input id=m3dWpOff inputmode=decimal placeholder="16'-6" autocomplete=off data-tip="Offset along the plane normal (ft-in)">
|
|
881
881
|
</div>
|
|
882
882
|
<hr>
|
|
883
|
-
<label data-tip="Show or hide the plane
|
|
883
|
+
<label data-tip="Show or hide the reference plane surface"><input type=checkbox id=m3dWpShow checked> Show plane</label>
|
|
884
884
|
<button data-wp=reset data-tip="Back to the active plan's level">Reset to level</button>
|
|
885
885
|
</div>
|
|
886
886
|
</div>
|