@floless/app 0.127.6 → 0.128.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 +9431 -11221
- package/dist/schemas/drawing.vector.v1.schema.json +1 -1
- package/dist/schemas/steel.model.v2.schema.json +50 -127
- package/dist/skills/floless-app-steel-model/SKILL.md +14 -6
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +198 -1704
- package/dist/skills/floless-app-tweak-contract/SKILL.md +64 -174
- package/dist/skills/reading-structural-drawings/SKILL.md +2 -2
- package/dist/skills/steel-drawing-abbreviations/SKILL.md +2 -2
- package/dist/templates/steel-model.flo +45 -24
- package/dist/web/app.css +18 -92
- package/dist/web/aware.js +7 -1
- package/dist/web/index.html +0 -27
- package/dist/web/renderers.js +3 -14
- package/dist/web/steel-3d-view.js +1 -1
- package/dist/web/steel-editor.html +15 -21
- package/dist/web/steel-filter-core.js +7 -26
- package/dist/web/steel-filter.html +7 -7
- package/dist/web/steel-model-adapter.js +19 -250
- package/dist/web/workspaces.js +46 -838
- package/package.json +1 -1
- package/dist/schemas/steel.takeoff.v1.schema.json +0 -562
- package/dist/schemas/steel.takeoff.v1.staging-snapshot.json +0 -263
|
@@ -1,251 +1,20 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
2
|
+
* Read-only Steel Model adapter.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* WHY IT EXISTS
|
|
8
|
-
* `web/steel-editor.html` reads model geometry inline, everywhere, in per-sheet DISPLAY PIXELS. That is
|
|
9
|
-
* what makes `steel.model/v2` (one model in world millimetres) expensive to switch on: activation would
|
|
10
|
-
* mean `if (v2)` branches threaded through a 6,400-line closure. This adapter is the seam. Every method
|
|
11
|
-
* answers in WORLD MILLIMETRES regardless of how the contract underneath stores things, so P5 can add a v2
|
|
12
|
-
* arm behind the same six methods and the editor never learns which one it is talking to.
|
|
13
|
-
*
|
|
14
|
-
* SCOPE — read only, and STILL NOT WIRED IN.
|
|
15
|
-
* P2 shipped this tested and unconsumed on purpose. Rewiring the editor's read sites would have invalidated
|
|
16
|
-
* the characterization baseline recorded in the same PR (that baseline is the only evidence a refactor
|
|
17
|
-
* changes nothing). P3 took the write half into `steel-model-commands.js` and left the read half here, so
|
|
18
|
-
* nothing loads this module yet: no `<script>` tag references it, and the sole non-test mention in `web/`
|
|
19
|
-
* is a signpost comment in `steel-editor.html`. P5 adds the v2 arm below on the same terms — the arm
|
|
20
|
-
* exists and is tested; nothing can reach it until P7 registers a v2 renderer.
|
|
21
|
-
*
|
|
22
|
-
* UNITS AND SIGNS BELOW DESCRIBE THE v1 ARM. The v2 arm needs none of them (world mm is already world mm);
|
|
23
|
-
* see `createModelAdapterV2`.
|
|
24
|
-
*
|
|
25
|
-
* UNITS AND SIGNS — the one thing to get right.
|
|
26
|
-
* Contract geometry is per-sheet display pixels scaled by `plan.pt_per_ft`, with Y growing DOWNWARD, and
|
|
27
|
-
* elevations in INCHES. World mm is X east, Y "up the plan", Z up. So the plan Y axis is NEGATED, exactly
|
|
28
|
-
* as `steel-3d-core.js:dispToMm` does it. That negation is a reflection: it reverses handedness,
|
|
29
|
-
* which is why `sheetFrame` documents what happens to a local frame's sense.
|
|
30
|
-
*
|
|
31
|
-
* IT IS NO LONGER A MIRROR. This module, the 3D view and `server/contract-to-scene.ts` all CALL the one
|
|
32
|
-
* `dispToMm` in `steel-3d-core.js` — a browser module the server already imports, so "that file is server
|
|
33
|
-
* TypeScript" never justified a second copy. Two independent world-mm conversions were a real hazard (a
|
|
34
|
-
* model that renders in one place and exports in another) and the parity test matrix
|
|
35
|
-
* (`server/steel-model-adapter.test.ts`, "parity with contract-to-scene") that held them in lock-step by
|
|
36
|
-
* hand is kept: it now guards the shared conversion instead of a copy of it.
|
|
37
|
-
*
|
|
38
|
-
* The two agree on every conversion of well-formed data: px scale, the Y negation, inches to mm (including
|
|
39
|
-
* numeric strings), and the plumb-column rule. They diverge, deliberately and by assertion, on MALFORMED or
|
|
40
|
-
* MALFORMED elevations, and on an ABSENT elevation WITH NO SHEET `default_tos` — an absent elevation on a
|
|
41
|
-
* sheet that declares one is in full parity (the matrix asserts both). The renderer coerces whatever it finds and is not always sane about it — `"" -> 0`,
|
|
42
|
-
* `true -> 1"`, `[144] -> 144"`, but `"abc"`, `NaN` and `{}` put a **NaN Z** into the scene — because it
|
|
43
|
-
* must draw something. This reports null instead, because a read boundary must not invent a position.
|
|
44
|
-
* The no-elevation-and-no-default case is in the parity matrix; the malformed shapes are enumerated in
|
|
45
|
-
* `endElevMm: present-but-unreadable is an RFI` (adapter side only — the renderer's NaN behaviour is
|
|
46
|
-
* recorded here rather than asserted, since pinning a NaN as expected output would entrench a bug).
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
import { MODEL_V2_TOL, memberGeometryV2, dispToMm } from './steel-3d-core.js';
|
|
50
|
-
|
|
51
|
-
const IN_MM = 25.4; // ← becomes 1 when the contract stores elevations in mm (metric canonicalization)
|
|
52
|
-
|
|
53
|
-
/** One plan's `pt_per_ft`, or undefined — `dispToMm` reads a missing/zero/negative scale as 1 pt/ft. */
|
|
54
|
-
const ptPerFtOf = (plan) => plan && plan.pt_per_ft;
|
|
55
|
-
|
|
56
|
-
const finitePt = (p) => Array.isArray(p) && p.length >= 2 && Number.isFinite(p[0]) && Number.isFinite(p[1]);
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* A finite number, or null. NUMERIC STRINGS are accepted: hand-edited and older contracts carry `tos: "144"`,
|
|
60
|
-
* and `contract-to-scene` reads them (its `!= null` test lets the string coerce through the arithmetic), so
|
|
61
|
-
* rejecting them here would drop a real elevation that the renderer honours. Blank/whitespace is not zero.
|
|
62
|
-
*/
|
|
63
|
-
const num = (v) => {
|
|
64
|
-
if (typeof v === 'number') return Number.isFinite(v) ? v : null;
|
|
65
|
-
if (typeof v === 'string' && v.trim() !== '') { const n = Number(v); return Number.isFinite(n) ? n : null; }
|
|
66
|
-
return null;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* A read-only, world-mm view over a steel contract — v1 or v2, and the caller cannot tell which.
|
|
71
|
-
*
|
|
72
|
-
* `activeSheet` selects which sheet `grid()` answers for; it defaults to the contract's own `active` index,
|
|
73
|
-
* so a caller that does not care gets the sheet the editor has open. It is MEANINGLESS to a v2 model and
|
|
74
|
-
* documented as such on `createModelAdapterV2` — v2 has one model grid, not one per sheet.
|
|
75
|
-
*
|
|
76
|
-
* The dispatch is the type DISCRIMINATOR and nothing else, mirroring `isModelV2` (`steel-model-read.ts`)
|
|
77
|
-
* for the same reason it gives: it answers "does this document claim to be v2", never "is it usable".
|
|
78
|
-
* Validity is the server's to judge, and a read boundary that quietly fell back to the v1 arm for a
|
|
79
|
-
* malformed v2 document would answer with confident nonsense — a v2 member has no `wp`, so every method
|
|
80
|
-
* would report an absence rather than a problem. Mirrored rather than imported because that module is
|
|
81
|
-
* server TypeScript and this is a browser module — a reason that holds for the DISCRIMINATOR only; the
|
|
82
|
-
* `dispToMm` mirror it used to cite alongside is gone, imported from `steel-3d-core.js` now.
|
|
4
|
+
* The editor and server use one canonical geometry contract: steel.model/v2 in world millimetres.
|
|
5
|
+
* Rejecting every other discriminator at this boundary prevents an untyped or legacy-shaped document
|
|
6
|
+
* from being read as an empty-but-valid model.
|
|
83
7
|
*/
|
|
84
|
-
export function createModelAdapter(contract, opts = {}) {
|
|
85
|
-
return (contract && typeof contract === 'object' && contract.type === 'steel.model/v2')
|
|
86
|
-
? createModelAdapterV2(contract)
|
|
87
|
-
: createModelAdapterV1(contract, opts);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/** The steel.takeoff/v1 arm — per-sheet display pixels and inch elevations, converted here to world mm. */
|
|
91
|
-
function createModelAdapterV1(contract, { activeSheet } = {}) {
|
|
92
|
-
const plans = (contract && Array.isArray(contract.plans)) ? contract.plans : [];
|
|
93
|
-
const planFor = (m) => plans.find(p => Array.isArray(p.members) && p.members.includes(m)) || null;
|
|
94
|
-
|
|
95
|
-
const activePlan = () => {
|
|
96
|
-
if (activeSheet != null) return plans.find(p => p.sheet === activeSheet) || null;
|
|
97
|
-
const i = Number.isInteger(contract && contract.active) ? contract.active : 0;
|
|
98
|
-
return plans[i] || plans[0] || null;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
/** Top-of-steel in mm for one member end, or null when neither the member nor its sheet declares one. */
|
|
102
|
-
const endElevMm = (m, plan, i) => {
|
|
103
|
-
const raw = m.role === 'column'
|
|
104
|
-
? (m.col && (i === 0 ? m.col.bos : m.col.tos))
|
|
105
|
-
: (m.ends && m.ends[i] && m.ends[i].tos);
|
|
106
|
-
const inches = num(raw);
|
|
107
|
-
if (inches != null) return inches * IN_MM;
|
|
108
|
-
// PRESENT BUT UNREADABLE is not the same as UNSET. A `tos` of "", " ", "abc", true, [] or NaN is an
|
|
109
|
-
// authored value this reader cannot interpret; falling through to the sheet default would answer with a
|
|
110
|
-
// confident elevation the contract never stated — the exact fabrication the Z=0 note below refuses.
|
|
111
|
-
// Report null (an RFI) instead. Round-2 review found ten such inputs where the adapter silently
|
|
112
|
-
// substituted default_tos while contract-to-scene coerced the value.
|
|
113
|
-
// `null`/absent IS the editor's own "unset" (ensureMeta writes `tos: null`), so those fall through to
|
|
114
|
-
// the sheet default. Anything else present is malformed, including `''`. An own property explicitly set
|
|
115
|
-
// to `undefined` counts as unset here rather than malformed — JSON.parse cannot produce one, so it
|
|
116
|
-
// cannot reach this from a stored contract, and treating it as unset matches `null`.
|
|
117
|
-
if (raw != null) return null;
|
|
118
|
-
// A column base with no BOS sits at 0 — contract-to-scene:397 does the same.
|
|
119
|
-
if (m.role === 'column' && i === 0) return 0;
|
|
120
|
-
const def = num(plan && plan.default_tos);
|
|
121
|
-
// DELIBERATE DIVERGENCE from contract-to-scene, asserted in the parity test rather than left to be
|
|
122
|
-
// discovered. `contract-to-scene.ts:366` uses `(plan.default_tos ?? 0)`, so a member with no elevation
|
|
123
|
-
// and no sheet default RENDERS at Z=0. That is a renderer's concession — it has to draw something. A
|
|
124
|
-
// read boundary must not repeat it: Z=0 is a fabricated position for what is really an RFI, and v2
|
|
125
|
-
// models elevation as `{known} | {unknown}` precisely so "unknown" survives (see steel-3d-core's
|
|
126
|
-
// knownZ, which likewise returns null and never 0). Callers that need something to draw supply their
|
|
127
|
-
// own fallback; this reports the truth.
|
|
128
|
-
return def == null ? null : def * IN_MM;
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
// Closure-local, so every method below is safe to destructure or pass as a callback. (Using `this`
|
|
132
|
-
// made `const {geometry} = adapter` throw — a boundary API must not carry that trap.)
|
|
133
|
-
const memberById = (id) => {
|
|
134
|
-
for (const p of plans) {
|
|
135
|
-
const hit = (Array.isArray(p.members) ? p.members : []).find(m => m && m.id === id);
|
|
136
|
-
if (hit) return hit;
|
|
137
|
-
}
|
|
138
|
-
return undefined;
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
return {
|
|
142
|
-
/**
|
|
143
|
-
* Every member in the model, across all sheets — selection and edits are model-wide, so reads are too.
|
|
144
|
-
*
|
|
145
|
-
* Returns LIVE contract objects, not copies. That is deliberate and load-bearing: P3's mutation commands
|
|
146
|
-
* operate on these same objects, and cloning here would hand callers a detached graph whose edits go
|
|
147
|
-
* nowhere. It does mean a caller CAN write through a "read" method; enforcing that is the write
|
|
148
|
-
* boundary's job (P3), not a defensive copy here that would cost the whole model on every call.
|
|
149
|
-
*/
|
|
150
|
-
members() {
|
|
151
|
-
return plans.flatMap(p => (Array.isArray(p.members) ? p.members : []));
|
|
152
|
-
},
|
|
153
8
|
|
|
154
|
-
|
|
155
|
-
memberById,
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* The member's WORK LINE in world mm — the editable centreline, with no section offset applied.
|
|
159
|
-
* (`contract-to-scene` additionally shifts the rendered box so the work line reads as top-of-steel;
|
|
160
|
-
* that is a rendering concern and deliberately not reflected here.)
|
|
161
|
-
*
|
|
162
|
-
* A column is plumb: both work points share the plan X/Y, and Z runs base → top-of-steel.
|
|
163
|
-
* Returns null for an unknown id, malformed work points, or an end whose elevation is unknown —
|
|
164
|
-
* an unknown elevation is an RFI, not a position, so it is never guessed.
|
|
165
|
-
*
|
|
166
|
-
* `frame` is a SPACE TAG naming the coordinate space, not a local UCS. Do not confuse it with the
|
|
167
|
-
* `frame` of steel-3d-core's worldToLocal/localToWorld, which is a basis object.
|
|
168
|
-
*/
|
|
169
|
-
geometry(id) {
|
|
170
|
-
const m = memberById(id);
|
|
171
|
-
if (!m || !Array.isArray(m.wp) || m.wp.length < 2 || !finitePt(m.wp[0]) || !finitePt(m.wp[1])) return null;
|
|
172
|
-
const plan = planFor(m);
|
|
173
|
-
const ptPerFt = ptPerFtOf(plan);
|
|
174
|
-
const z0 = endElevMm(m, plan, 0), z1 = endElevMm(m, plan, 1);
|
|
175
|
-
if (z0 == null || z1 == null) return null;
|
|
176
|
-
const a = dispToMm(m.wp[0], ptPerFt);
|
|
177
|
-
const b = m.role === 'column' ? a : dispToMm(m.wp[1], ptPerFt); // plumb: the top shares the base X/Y
|
|
178
|
-
return { from: [a[0], a[1], z0], to: [b[0], b[1], z1], frame: 'world-mm' };
|
|
179
|
-
},
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* The active sheet's structural grid, or null. Returned AS STORED (grid-core owns its vocabulary:
|
|
183
|
-
* relative spacing strings for X/Y, absolute levels for Z, all parsing to mm through grid-core). It is
|
|
184
|
-
* not converted here — re-deriving grid geometry in a second place is exactly the duplication this
|
|
185
|
-
* boundary exists to prevent.
|
|
186
|
-
*/
|
|
187
|
-
grid() {
|
|
188
|
-
const p = activePlan();
|
|
189
|
-
return (p && p.grid) || null;
|
|
190
|
-
},
|
|
9
|
+
import { MODEL_V2_TOL, memberGeometryV2 } from './steel-3d-core.js';
|
|
191
10
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
* counter-clockwise on the sheet reads clockwise in world mm; the axis direction is faithful, its
|
|
198
|
-
* rotational sense is mirrored. Callers comparing angles across the boundary must account for that.
|
|
199
|
-
*/
|
|
200
|
-
sheetFrame(sheet) {
|
|
201
|
-
const p = plans.find(x => x.sheet === sheet);
|
|
202
|
-
const f = p && p.frame;
|
|
203
|
-
if (!f || !finitePt(f.o) || !finitePt(f.u)) return null;
|
|
204
|
-
const len = Math.hypot(f.u[0], f.u[1]);
|
|
205
|
-
if (!(len > 0)) return null; // a zero-length axis carries no direction — matches the editor's sanitizeFrame
|
|
206
|
-
return { origin: dispToMm(f.o, ptPerFtOf(p)), xAxis: [f.u[0] / len, -f.u[1] / len] };
|
|
207
|
-
},
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* The member's single top-of-steel elevation in mm, or null when it does not have one.
|
|
211
|
-
*
|
|
212
|
-
* Null means "no one elevation", not "zero" — matching steel-3d-core's `knownZ`. A member whose two
|
|
213
|
-
* ends sit at different elevations (a sloping beam, or any column, which spans base to top by
|
|
214
|
-
* definition) genuinely has no single level, so this reports null rather than inventing a
|
|
215
|
-
* representative value; read `geometry(id)` for the two endpoint elevations. Equality is judged at the
|
|
216
|
-
* pinned authoring quantum `MODEL_V2_TOL.CUT_PLANE_MM` (1/16"), not with a fresh magic number.
|
|
217
|
-
*/
|
|
218
|
-
elevationOf(id) {
|
|
219
|
-
const m = memberById(id);
|
|
220
|
-
if (!m) return null;
|
|
221
|
-
if (m.role === 'column') return null; // a column spans levels; its top is geometry(id).to[2]
|
|
222
|
-
const plan = planFor(m);
|
|
223
|
-
const z0 = endElevMm(m, plan, 0), z1 = endElevMm(m, plan, 1);
|
|
224
|
-
if (z0 == null || z1 == null) return null;
|
|
225
|
-
return Math.abs(z0 - z1) <= MODEL_V2_TOL.CUT_PLANE_MM ? z0 : null;
|
|
226
|
-
},
|
|
227
|
-
};
|
|
11
|
+
export function createModelAdapter(contract, _opts = {}) {
|
|
12
|
+
if (!contract || typeof contract !== 'object' || contract.type !== 'steel.model/v2') {
|
|
13
|
+
throw new TypeError('Steel Model adapter requires contract type steel.model/v2');
|
|
14
|
+
}
|
|
15
|
+
return createModelAdapterV2(contract);
|
|
228
16
|
}
|
|
229
17
|
|
|
230
|
-
/**
|
|
231
|
-
* The steel.model/v2 arm (unit 5, P5) — INACTIVE. Same six methods, same world-mm contract, and no way
|
|
232
|
-
* for a caller to tell which arm it holds. That indistinguishability is the point: epic §15 answer 4
|
|
233
|
-
* chose "the inactive gate, at the ADAPTER BOUNDARY — not scattered `if (v2)` branches through the editor
|
|
234
|
-
* closure", so this file is where the version knowledge stops.
|
|
235
|
-
*
|
|
236
|
-
* NOTHING REACHES IT YET, and that is P5's premise rather than an oversight: no `<script>` loads this
|
|
237
|
-
* module, `renderers.js` has no `steel.model/v2` entry, and every steel route refuses a v2 document
|
|
238
|
-
* (`steel-model-gate.test.ts`). Opening a v2 contract is P7's registration act.
|
|
239
|
-
*
|
|
240
|
-
* `activeSheet` IS DELIBERATELY NOT ACCEPTED. In v1 it selects which sheet `grid()` answers for; v2 has
|
|
241
|
-
* ONE model grid in world mm ("v1 had one grid PER PLAN in that plan's display space, which is half of
|
|
242
|
-
* why sheets were never registered to a common frame" — `$defs.modelGrid`), so there is nothing for it to
|
|
243
|
-
* select. Taking the option and ignoring it would read as support.
|
|
244
|
-
*
|
|
245
|
-
* THE CONVERSIONS ALL DISAPPEAR HERE, which is the whole reason v2 exists: work points are stored in
|
|
246
|
-
* world mm, so there is no px scale, no Y negation, no inches, and no `default_tos`. What remains is the
|
|
247
|
-
* elevation union, and `memberGeometryV2` owns it — see that function for why a v2 column is not plumbed.
|
|
248
|
-
*/
|
|
249
18
|
function createModelAdapterV2(contract) {
|
|
250
19
|
const members = (contract && Array.isArray(contract.members)) ? contract.members : [];
|
|
251
20
|
const memberById = (id) => members.find((m) => m && m.id === id);
|
|
@@ -255,9 +24,9 @@ function createModelAdapterV2(contract) {
|
|
|
255
24
|
* or the record is malformed.
|
|
256
25
|
*
|
|
257
26
|
* `memberGeometryV2` already answers this; what this adds is shape. It returns `line[0]`/`line[1]` to
|
|
258
|
-
* match the
|
|
27
|
+
* match the legacy `memberGeometry` its consumers expect, and reading an ARRAY position back out under
|
|
259
28
|
* `noUncheckedIndexedAccess` makes the result optional — which widened `createModelAdapter`'s inferred
|
|
260
|
-
* `geometry()` union until `g.from` read as possibly-undefined at every existing
|
|
29
|
+
* `geometry()` union until `g.from` read as possibly-undefined at every existing legacy call site. Naming
|
|
261
30
|
* the endpoints once, here, keeps both arms inferring the same return type.
|
|
262
31
|
*
|
|
263
32
|
* THE DESTRUCTURING DEFAULTS ARE UNREACHABLE, and are here for the type checker alone: a non-null
|
|
@@ -279,7 +48,7 @@ function createModelAdapterV2(contract) {
|
|
|
279
48
|
* Every member in the model. v2 holds ONE root array — `members` is not a plan property at all — so
|
|
280
49
|
* this is the whole model by construction rather than by flattening.
|
|
281
50
|
*
|
|
282
|
-
* A FRESH array of LIVE member objects, exactly as the
|
|
51
|
+
* A FRESH array of LIVE member objects, exactly as the legacy arm returns: the elements are the contract's
|
|
283
52
|
* own records (P3's mutation commands operate on these), while the array is a copy so that a caller's
|
|
284
53
|
* `push`/`splice` cannot add or drop a member behind the write boundary's back.
|
|
285
54
|
*/
|
|
@@ -294,10 +63,10 @@ function createModelAdapterV2(contract) {
|
|
|
294
63
|
* The member's WORK LINE in world mm — the two stored work points, verbatim.
|
|
295
64
|
*
|
|
296
65
|
* Null for an unknown id, malformed work points, or an endpoint whose elevation is `{unknown}`. An
|
|
297
|
-
* unknown elevation is an RFI, not a position, so it is never guessed — the same refusal the
|
|
66
|
+
* unknown elevation is an RFI, not a position, so it is never guessed — the same refusal the legacy arm
|
|
298
67
|
* makes for an unreadable `tos`, and the one `sceneFromModel` makes by declining to build at all.
|
|
299
68
|
*
|
|
300
|
-
* `frame` is a SPACE TAG naming the coordinate space, not a local UCS — as in the
|
|
69
|
+
* `frame` is a SPACE TAG naming the coordinate space, not a local UCS — as in the legacy arm.
|
|
301
70
|
*/
|
|
302
71
|
geometry(id) {
|
|
303
72
|
const e = ends(memberById(id));
|
|
@@ -308,7 +77,7 @@ function createModelAdapterV2(contract) {
|
|
|
308
77
|
* THE model grid, or null. Returned AS STORED — grid-core owns the notation, which v2 keeps unchanged;
|
|
309
78
|
* only its coordinates became world mm. `inferGridMm` is the sibling that proposes one.
|
|
310
79
|
*
|
|
311
|
-
* Unlike
|
|
80
|
+
* Unlike legacy this does not depend on which sheet is active, because there is nothing per-sheet left to
|
|
312
81
|
* depend on. A v2 plan has no `grid` property at all.
|
|
313
82
|
*/
|
|
314
83
|
grid() {
|
|
@@ -324,7 +93,7 @@ function createModelAdapterV2(contract) {
|
|
|
324
93
|
* migration and never persisted: `steel-model-migrate.ts` feeds each `registerSheet` result straight
|
|
325
94
|
* into `materializeMembers`, and the stored `migration` block keeps only id maps.
|
|
326
95
|
*
|
|
327
|
-
* So the only conversion available here — scale by `pt_per_ft` and flip Y, as the
|
|
96
|
+
* So the only conversion available here — scale by `pt_per_ft` and flip Y, as the legacy arm does — would
|
|
328
97
|
* yield a SHEET-LOCAL mm frame published under a WORLD-mm contract. That is the same fabrication this
|
|
329
98
|
* boundary refuses when it reports null instead of substituting `default_tos` for an unreadable
|
|
330
99
|
* elevation, and it would be harder to notice: a plausible frame, silently in the wrong space.
|
|
@@ -335,14 +104,14 @@ function createModelAdapterV2(contract) {
|
|
|
335
104
|
* note rather than improvised here. Meanwhile null is this method's existing, tested vocabulary for
|
|
336
105
|
* "this sheet uses global axes", and every caller already handles it.
|
|
337
106
|
*/
|
|
338
|
-
sheetFrame() {
|
|
107
|
+
sheetFrame(_sheet) {
|
|
339
108
|
return null;
|
|
340
109
|
},
|
|
341
110
|
|
|
342
111
|
/**
|
|
343
112
|
* The member's single top-of-steel elevation in mm, or null when it does not have one.
|
|
344
113
|
*
|
|
345
|
-
* Identical rule to
|
|
114
|
+
* Identical rule to legacy, over a different storage: a column spans base→top by definition and so has no
|
|
346
115
|
* one level (read `geometry(id).to[2]` for its top), a member with an unknown endpoint has none to
|
|
347
116
|
* report, and two ends further apart than the pinned authoring quantum are a slope rather than a
|
|
348
117
|
* level. Null means "no one elevation", never zero.
|