@floless/app 0.132.1 → 0.133.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/dist/floless-server.cjs +6234 -3231
- package/dist/schemas/steel.model.v2.schema.json +216 -3
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +66 -5
- package/dist/templates/steel-model.flo +6 -2
- package/dist/web/app.css +41 -1
- package/dist/web/app.js +3 -2
- package/dist/web/aware.js +291 -12
- package/dist/web/commands-shell.js +40 -2
- package/dist/web/commands-steel.js +148 -3
- package/dist/web/index.html +16 -3
- package/dist/web/instructor.js +110 -27
- package/dist/web/steel-3d-core.js +199 -11
- package/dist/web/steel-3d-view.js +93 -37
- package/dist/web/steel-catalog-picker.js +624 -0
- package/dist/web/steel-editor.html +507 -192
- package/dist/web/steel-model-v2-client-validation.js +6 -0
- package/dist/web/steel-model-v2-commands.js +127 -50
- package/dist/web/steel-model-v2-projection.js +3 -2
- package/package.json +4 -1
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import { validateSchemaSubset } from './json-schema-subset.js';
|
|
9
9
|
import { axisLabelsFor, parseSpacings } from './grid-core.js';
|
|
10
|
+
import { positionBasisIssue,POSITION_BASIS_CAPABILITY_VERSION } from './steel-3d-core.js';
|
|
11
|
+
export const POSITION_BASIS_CLIENT_VALIDATION_VERSION=POSITION_BASIS_CAPABILITY_VERSION;
|
|
10
12
|
|
|
11
13
|
const rows = (v) => Array.isArray(v) ? v : [];
|
|
12
14
|
const object = (v) => v && typeof v === 'object' && !Array.isArray(v);
|
|
@@ -87,6 +89,10 @@ export function validateClientSteelModelV2(doc, schema) {
|
|
|
87
89
|
}
|
|
88
90
|
for (let i = 0; i < members.length; i += 1) {
|
|
89
91
|
const member = members[i];
|
|
92
|
+
if (object(member?.positionBasis)) {
|
|
93
|
+
const problem = positionBasisIssue(member.positionBasis.x, member.positionBasis.y);
|
|
94
|
+
if (problem) issues.push(`${problem} at $.members[${i}].positionBasis`);
|
|
95
|
+
}
|
|
90
96
|
if (member?.role === 'column' && Number.isFinite(member.from?.z?.known)
|
|
91
97
|
&& Number.isFinite(member.to?.z?.known) && member.from.z.known > member.to.z.known) {
|
|
92
98
|
issues.push(`column-endpoint-order at $.members[${i}]`);
|
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
import { sheetPxToWorld, worldToSheetPx } from './steel-plan-transform.js';
|
|
14
14
|
import { memberPresence, projectionLink } from './steel-model-v2-projection.js';
|
|
15
15
|
import { axisLabelsFor, gridLabelPatch, parseSpacings } from './grid-core.js';
|
|
16
|
+
import {
|
|
17
|
+
basisFromAxes, effectiveDepthPosition, effectiveWidthPosition, outlineFor, partFrame,
|
|
18
|
+
positionOffsetVector, reversePlacement, sectionExtents,
|
|
19
|
+
POSITION_BASIS_CAPABILITY_VERSION,
|
|
20
|
+
} from './steel-3d-core.js';
|
|
21
|
+
export const POSITION_BASIS_COMMAND_VERSION=POSITION_BASIS_CAPABILITY_VERSION;
|
|
16
22
|
|
|
17
23
|
const IN_MM = 25.4;
|
|
18
24
|
const clone = (v) => typeof structuredClone === 'function'
|
|
@@ -207,57 +213,127 @@ function rebindMergedObservations(doc, oldIds, replacement) {
|
|
|
207
213
|
}
|
|
208
214
|
}
|
|
209
215
|
|
|
210
|
-
|
|
216
|
+
const MERGE_MM = 0.001;
|
|
217
|
+
const MERGE_RAD = 1e-6;
|
|
218
|
+
const vec3 = (p, label) => [Number(p.x), Number(p.y), known(p.z, label)];
|
|
219
|
+
const vsub = (a, b) => a.map((v, i) => v - b[i]);
|
|
220
|
+
const vadd = (a, b) => a.map((v, i) => v + b[i]);
|
|
221
|
+
const vmul = (a, s) => a.map((v) => v * s);
|
|
222
|
+
const vdot = (a, b) => a.reduce((n, v, i) => n + v * b[i], 0);
|
|
223
|
+
const vlen = (a) => Math.hypot(...a);
|
|
224
|
+
const vunit = (a) => { const n = vlen(a); return n > 0 ? a.map((v) => v / n) : null; };
|
|
225
|
+
const vdist = (a, b) => vlen(vsub(a, b));
|
|
226
|
+
const lex3 = (a, b) => a[0] - b[0] || a[1] - b[1] || a[2] - b[2];
|
|
227
|
+
const canonProfile = (s) => String(s || '').trim().toUpperCase().replace(/×/g, 'X').replace(/\s*X\s*/g, 'X').replace(/^([A-Z]+)\s+/, '$1');
|
|
228
|
+
const inferredMaterial = (profile) => profile.startsWith('HSS') ? 'A500-GR.B' : /^W\d/.test(profile) ? 'A992' : 'A36';
|
|
229
|
+
const effectiveMemberType = (m) => typeof m.memberType === 'string' && m.memberType.trim()
|
|
230
|
+
? m.memberType.trim().toLowerCase() : (m.role === 'column' ? 'column' : 'beam');
|
|
231
|
+
|
|
232
|
+
function mergeSection(member, resolveSection) {
|
|
233
|
+
const standard = resolveSection ? resolveSection(member) : null;
|
|
234
|
+
const explicit = member.section && member.section.w > 0 && member.section.d > 0
|
|
235
|
+
? { w: member.section.w, d: member.section.d, round: false } : null;
|
|
236
|
+
const dims = standard || explicit;
|
|
237
|
+
if (!dims || !(dims.w > 0) || !(dims.d > 0)) return null;
|
|
238
|
+
const w = dims.w * (dims.units === 'in' ? IN_MM : 1), d = dims.d * (dims.units === 'in' ? IN_MM : 1);
|
|
239
|
+
const outline = outlineFor(member.profile, w, d, dims.xsection || null, dims.round === true);
|
|
240
|
+
return {
|
|
241
|
+
w, d, round: dims.round === true, outline, extents: sectionExtents(outline),
|
|
242
|
+
roundRadius: outline.round ? outline.r : null,
|
|
243
|
+
roundInnerRadius: outline.round && outline.hole ? Math.hypot(...outline.hole[0]) : null,
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
function mergePlacedSection(member, from, to, section) {
|
|
248
|
+
const basis = member.positionBasis
|
|
249
|
+
? basisFromAxes(member.positionBasis.x, member.positionBasis.y)
|
|
250
|
+
: { x: [1, 0, 0], y: [0, 1, 0], z: [0, 0, 1] };
|
|
251
|
+
if (!basis) return null;
|
|
252
|
+
const frame = partFrame(from, to, basis.z, basis.x);if (!frame) return null;
|
|
253
|
+
const dz = Math.abs(to[2] - from[2]), horiz = Math.hypot(to[0] - from[0], to[1] - from[1]);
|
|
254
|
+
const depth = effectiveDepthPosition(member.position, member.role === 'column' ? 'column' : 'beam', dz, horiz,
|
|
255
|
+
effectiveMemberType(member) === 'brace' && member.brace?.type === 'vertical');
|
|
256
|
+
const width = effectiveWidthPosition(member.positionH);
|
|
257
|
+
const offset = positionOffsetVector(frame, section.extents, depth, width, member.rot, member.positionHOffset, member.positionOffset);
|
|
258
|
+
const th = ((typeof member.rot === 'number' && isFinite(member.rot) ? member.rot : 0) * Math.PI) / 180,c=Math.cos(th),s=Math.sin(th);
|
|
259
|
+
return {
|
|
260
|
+
frame, center: offset,
|
|
261
|
+
width: vadd(vmul(frame.y,c),vmul(frame.z,s)),
|
|
262
|
+
depth: vadd(vmul(frame.y,-s),vmul(frame.z,c)),
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
function physicalMergePreflight(sources, resolveSection) {
|
|
267
|
+
const rows = sources.map((m) => ({ m, a: vec3(m.from, `${m.id}.from`), b: vec3(m.to, `${m.id}.to`) }));
|
|
268
|
+
const points = rows.flatMap((r, ri) => [{ p: r.a, ri, end: 0 }, { p: r.b, ri, end: 1 }]).sort((a,b)=>lex3(a.p,b.p));
|
|
269
|
+
const parent=points.map((_,i)=>i),find=i=>parent[i]===i?i:(parent[i]=find(parent[i])),join=(a,b)=>{a=find(a);b=find(b);if(a!==b)parent[b]=a;};
|
|
270
|
+
for(let i=0;i<points.length;i++)for(let j=i+1;j<points.length;j++)if(vdist(points[i].p,points[j].p)<=MERGE_MM)join(i,j);
|
|
271
|
+
const clusters=new Map();for(let i=0;i<points.length;i++){const k=find(i);if(!clusters.has(k))clusters.set(k,[]);clusters.get(k).push(i);}
|
|
272
|
+
for(const ids of clusters.values())for(let i=0;i<ids.length;i++)for(let j=i+1;j<ids.length;j++)if(vdist(points[ids[i]].p,points[ids[j]].p)>MERGE_MM)
|
|
273
|
+
throw new V2CommandError('merge-seam-ambiguous','a seam is transitively close but exceeds the 0.001 mm pairwise bound');
|
|
274
|
+
const orderedClusters=[...clusters.values()].map(ids=>({ids,rep:points[ids[0]].p})).sort((a,b)=>lex3(a.rep,b.rep));
|
|
275
|
+
const clusterOf=new Map();orderedClusters.forEach((c,ci)=>c.ids.forEach(i=>clusterOf.set(i,ci)));
|
|
276
|
+
const graph=orderedClusters.map(()=>[]),edgeRows=[];
|
|
277
|
+
rows.forEach((r,ri)=>{const indices=points.map((p,i)=>p.ri===ri?i:-1).filter(i=>i>=0),u=clusterOf.get(indices.find(i=>points[i].end===0)),v=clusterOf.get(indices.find(i=>points[i].end===1));
|
|
278
|
+
if(u===v)throw new V2CommandError('merge-chain-invalid','a merge source collapses inside one seam cluster');graph[u].push({v,ri});graph[v].push({v:u,ri});edgeRows.push({u,v,ri});});
|
|
279
|
+
const terminals=graph.map((e,i)=>({e,i})).filter(x=>x.e.length===1);if(terminals.length!==2||graph.some(e=>e.length<1||e.length>2))
|
|
280
|
+
throw new V2CommandError('merge-chain-invalid','merge sources must form one unbranched, non-cyclic chain');
|
|
281
|
+
const seen=new Set(),stack=[terminals[0].i];while(stack.length){const n=stack.pop();if(seen.has(n))continue;seen.add(n);for(const e of graph[n])stack.push(e.v);}
|
|
282
|
+
if(seen.size!==graph.length)throw new V2CommandError('merge-chain-invalid','merge sources must form one connected chain');
|
|
283
|
+
const start=terminals.map(x=>x.i).sort((a,b)=>lex3(orderedClusters[a].rep,orderedClusters[b].rep))[0],finish=terminals.find(x=>x.i!==start).i;
|
|
284
|
+
const chainDir=vunit(vsub(orderedClusters[finish].rep,orderedClusters[start].rep));if(!chainDir)throw new V2CommandError('merge-chain-invalid','merge chain has zero length');
|
|
285
|
+
for(const c of orderedClusters){const q=vsub(c.rep,orderedClusters[start].rep),perp=vsub(q,vmul(chainDir,vdot(q,chainDir)));if(vlen(perp)>MERGE_MM)throw new V2CommandError('merge-not-collinear','merge endpoints exceed the 0.001 mm line bound');}
|
|
286
|
+
const ordered=[];let prev=-1,cur=start;while(cur!==finish){const edge=graph[cur].find(e=>e.v!==prev);if(!edge)throw new V2CommandError('merge-chain-invalid','merge chain ordering failed');const row=rows[edge.ri],forward=edge.v===edgeRows[edge.ri].v;
|
|
287
|
+
const dir=vunit(vsub(forward?row.b:row.a,forward?row.a:row.b));const angle=Math.acos(Math.max(-1,Math.min(1,vdot(dir,chainDir))));if(angle>MERGE_RAD)throw new V2CommandError('merge-not-collinear','merge member direction exceeds the 0.000001 rad bound');
|
|
288
|
+
ordered.push({row,forward,seamFrom:orderedClusters[cur].rep,seamTo:orderedClusters[edge.v].rep});prev=cur;cur=edge.v;}
|
|
289
|
+
const profile=canonProfile(ordered[0].row.m.profile),role=ordered[0].row.m.role==='column'?'column':'beam',memberType=effectiveMemberType(ordered[0].row.m);
|
|
290
|
+
const material=(ordered[0].row.m.material&&ordered[0].row.m.material.trim())||inferredMaterial(profile);
|
|
291
|
+
let reference=null;
|
|
292
|
+
for(const item of ordered){const m=item.row.m,p=canonProfile(m.profile),r=m.role==='column'?'column':'beam',t=effectiveMemberType(m),mat=(m.material&&m.material.trim())||inferredMaterial(p);
|
|
293
|
+
if(p!==profile||r!==role||t!==memberType||mat!==material)throw new V2CommandError('merge-member-conflict','merge sources must agree on effective profile, material, role, and member type');
|
|
294
|
+
let physicalMember=m,physicalFrom=item.row.a,physicalTo=item.row.b;
|
|
295
|
+
if(!item.forward){const basis=m.positionBasis?basisFromAxes(m.positionBasis.x,m.positionBasis.y):{x:[1,0,0],y:[0,1,0],z:[0,0,1]};const sourceFrame=basis&&partFrame(item.row.a,item.row.b,basis.z,basis.x);
|
|
296
|
+
if(!sourceFrame)throw new V2CommandError('merge-section-unresolved',`cannot normalize the direction of "${m.id}"`);
|
|
297
|
+
physicalMember=Object.assign(clone(m),reversePlacement(m,sourceFrame.degenerate));physicalFrom=item.row.b;physicalTo=item.row.a;}
|
|
298
|
+
const sec=mergeSection(physicalMember,resolveSection);if(!sec)throw new V2CommandError('merge-section-unresolved',`cannot compute the section placement for "${m.id}"`);
|
|
299
|
+
const placed=mergePlacedSection(physicalMember,physicalFrom,physicalTo,sec);if(!placed)throw new V2CommandError('merge-section-unresolved',`cannot compute the section frame for "${m.id}"`);
|
|
300
|
+
const signature={m:physicalMember,sec,placed};
|
|
301
|
+
// Every source is compared with the survivor inherited from the FIRST source. Advancing this
|
|
302
|
+
// reference after each adjacent match lets a long chain walk away in sub-tolerance steps.
|
|
303
|
+
if(!reference){reference=signature;continue;}
|
|
304
|
+
{
|
|
305
|
+
if(sec.round!==reference.sec.round||sec.outline.outer.length!==reference.sec.outline.outer.length||!!sec.outline.hole!==!!reference.sec.outline.hole||(sec.outline.hole?.length||0)!==(reference.sec.outline.hole?.length||0))
|
|
306
|
+
throw new V2CommandError('merge-section-topology','merge sources have different section topology');
|
|
307
|
+
const centerDistance=vdist(placed.center,reference.placed.center);
|
|
308
|
+
if(sec.round){
|
|
309
|
+
const radiusDelta=Math.abs(sec.roundRadius-reference.sec.roundRadius);
|
|
310
|
+
const innerA=sec.roundInnerRadius,innerB=reference.sec.roundInnerRadius;
|
|
311
|
+
const innerDelta=innerA==null&&innerB==null?0:(innerA==null||innerB==null?Infinity:Math.abs(innerA-innerB));
|
|
312
|
+
if(centerDistance>MERGE_MM||radiusDelta>MERGE_MM||innerDelta>MERGE_MM)
|
|
313
|
+
throw new V2CommandError('merge-placement-conflict','round merge sources differ in physical centre or analytic radii by more than 0.001 mm');
|
|
314
|
+
continue;
|
|
315
|
+
}
|
|
316
|
+
const axisAngle=Math.acos(Math.max(-1,Math.min(1,vdot(placed.width,reference.placed.width))));if(axisAngle>MERGE_RAD)
|
|
317
|
+
throw new V2CommandError('merge-placement-conflict','merge sources have different physical section axes');
|
|
318
|
+
const loops=[sec.outline.outer,sec.outline.hole||[]],refLoops=[reference.sec.outline.outer,reference.sec.outline.hole||[]];let max=centerDistance;
|
|
319
|
+
for(let k=0;k<loops.length;k++)for(let i=0;i<loops[k].length;i++){const q=loops[k][i],rq=refLoops[k][i];const a=vadd(placed.center,vadd(vmul(placed.width,q[0]),vmul(placed.depth,q[1]))),b=vadd(reference.placed.center,vadd(vmul(reference.placed.width,rq[0]),vmul(reference.placed.depth,rq[1])));max=Math.max(max,vdist(a,b));}
|
|
320
|
+
if(max>MERGE_MM)throw new V2CommandError('merge-placement-conflict','merge sources differ physically at a shared seam by more than 0.001 mm');
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
let survivor=clone(ordered[0].row.m);if(!ordered[0].forward){const basis=survivor.positionBasis?basisFromAxes(survivor.positionBasis.x,survivor.positionBasis.y):{x:[1,0,0],y:[0,1,0],z:[0,0,1]};const f=basis&&partFrame(ordered[0].row.a,ordered[0].row.b,basis.z,basis.x);if(!f)throw new V2CommandError('merge-section-unresolved','cannot normalize the first member direction');Object.assign(survivor,reversePlacement(survivor,f.degenerate));}
|
|
324
|
+
return {survivor,from:orderedClusters[start].rep,to:orderedClusters[finish].rep};
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
function mergeMemberGroup(doc, sheet, memberIds, mergedPx, mintId, resolveSection) {
|
|
211
328
|
const oldIds = new Set(memberIds);
|
|
212
329
|
if (oldIds.size < 2) throw new V2CommandError('merge-needs-two', 'merge needs at least two members');
|
|
213
330
|
assertNoWholeMemberRefs(doc, oldIds);
|
|
214
331
|
const sources = [...oldIds].map((id) => memberById(doc, id));
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
// The placement is authored intent, not a derived value, so a disagreement is a question for the user
|
|
218
|
-
// rather than something to resolve by whichever id happened to sort first.
|
|
219
|
-
//
|
|
220
|
-
// Compared as the whole five-field placement, not field by field: `position` and `positionOffset` are one
|
|
221
|
-
// statement about the depth axis (and likewise the width pair), so two members can differ in a way no
|
|
222
|
-
// single field shows. Absent reads as its documented default so `{}` and `{ positionOffset: 0 }` are the
|
|
223
|
-
// same placement and do not refuse a merge that changes nothing.
|
|
224
|
-
//
|
|
225
|
-
// Each field is folded the way its own READER folds it, so the key cannot refuse a merge between two
|
|
226
|
-
// members whose steel is identical:
|
|
227
|
-
// - `positionH` — absent IS `middle` (`planePosition` folds absent and every unrecognised value to it),
|
|
228
|
-
// so `{}` and `{ positionH: 'middle' }` are one placement.
|
|
229
|
-
// - `rot` — compared as the (cos, sin) pair the SECTION IS ACTUALLY PLACED BY, not as the
|
|
230
|
-
// angle's notation. `270` and a typed `-90` are one roll (the panel's preset writes
|
|
231
|
-
// the first, the inspector displays both as 270°), and so are `0` and `360`; a plain
|
|
232
|
-
// `% 360` fold would agree there but ALSO fold `1e18` onto `280`, which
|
|
233
|
-
// `positionOffsetVector` places 16.5 mm apart because it consumes the raw angle.
|
|
234
|
-
// Reading the same numbers the placement reads cannot drift from it. (code review)
|
|
235
|
-
// - `position` — deliberately NOT folded. Absent means the `depthPosition` slope heuristic, not a
|
|
236
|
-
// literal `middle`, and resolving it needs the member's geometry rather than its
|
|
237
|
-
// fields. Two collinear members do share a slope, so this only ever over-refuses;
|
|
238
|
-
// that is the safe direction, and the refusal names the fields to make match.
|
|
239
|
-
// The roll as the placement sees it: quantised so 270 and -90 (which differ only by float dust in
|
|
240
|
-
// cos/sin) land together, while genuinely different angles stay apart. -0 is folded to 0 so the two
|
|
241
|
-
// spellings of zero cannot split a key.
|
|
242
|
-
const rollKey = (rot) => {
|
|
243
|
-
const th = ((typeof rot === 'number' && isFinite(rot) ? rot : 0) * Math.PI) / 180;
|
|
244
|
-
const q = (v) => { const n = +v.toFixed(9); return n === 0 ? 0 : n; };
|
|
245
|
-
return [q(Math.cos(th)), q(Math.sin(th))];
|
|
246
|
-
};
|
|
247
|
-
const placementKey = (m) => JSON.stringify([
|
|
248
|
-
m.position ?? null, m.positionOffset ?? 0,
|
|
249
|
-
m.positionH ?? 'middle', m.positionHOffset ?? 0,
|
|
250
|
-
...rollKey(m.rot),
|
|
251
|
-
]);
|
|
252
|
-
if (new Set(sources.map(placementKey)).size > 1) {
|
|
253
|
-
throw new V2CommandError('merge-placement-conflict',
|
|
254
|
-
'these members carry different Profile Positions — make them match before merging');
|
|
255
|
-
}
|
|
256
|
-
const merged = clone(sources[0]);
|
|
332
|
+
const physical=physicalMergePreflight(sources,resolveSection);
|
|
333
|
+
const merged = physical.survivor;
|
|
257
334
|
merged.id = mintId();
|
|
258
|
-
|
|
259
|
-
merged.
|
|
260
|
-
merged.to = sheetPxToWorld(mergedPx[1], plan, clone(sources.at(-1).to.z));
|
|
335
|
+
merged.from = {x:physical.from[0],y:physical.from[1],z:{known:physical.from[2]}};
|
|
336
|
+
merged.to = {x:physical.to[0],y:physical.to[1],z:{known:physical.to[2]}};
|
|
261
337
|
for (const joint of doc.joints || []) {
|
|
262
338
|
if (oldIds.has(joint.main)) joint.main = merged.id;
|
|
263
339
|
if (joint.secondaries) joint.secondaries = joint.secondaries.map((id) => oldIds.has(id) ? merged.id : id);
|
|
@@ -300,11 +376,12 @@ function deleteMembersFromDocument(doc, ids) {
|
|
|
300
376
|
for (const plan of doc.plans || []) plan.memberRefs = (plan.memberRefs || []).filter((id) => !selected.has(id));
|
|
301
377
|
}
|
|
302
378
|
|
|
303
|
-
/** @param {any} model @param {{validate?: (doc: any) => any, mintId?: () => string, afterCommit?: (effect: any) => void}} options */
|
|
379
|
+
/** @param {any} model @param {{validate?: (doc: any) => any, mintId?: () => string, afterCommit?: (effect: any) => void, resolveSection?: (member:any) => any}} options */
|
|
304
380
|
export function createV2CommandSession(model, options = {}) {
|
|
305
381
|
const {
|
|
306
382
|
validate,
|
|
307
383
|
afterCommit,
|
|
384
|
+
resolveSection,
|
|
308
385
|
mintId = (() => { let n = 0; return () => `m-v2-${Date.now()}-${n++}`; })(),
|
|
309
386
|
} = options;
|
|
310
387
|
const projections = new Set();
|
|
@@ -420,7 +497,7 @@ export function createV2CommandSession(model, options = {}) {
|
|
|
420
497
|
id, profile: projected.profile || '', from, to,
|
|
421
498
|
provenance: 'manual',
|
|
422
499
|
};
|
|
423
|
-
for (const key of ['material', 'role', 'memberType', 'position', 'positionH', 'positionOffset', 'positionHOffset', 'rot', 'section', 'bf', 'rfi', 'mf', 'verified', 'source', 'brace']) {
|
|
500
|
+
for (const key of ['material', 'role', 'memberType', 'position', 'positionH', 'positionOffset', 'positionHOffset', 'positionBasis', 'rot', 'section', 'bf', 'rfi', 'mf', 'verified', 'source', 'brace']) {
|
|
424
501
|
if (projected[key] !== undefined) member[key] = clone(projected[key]);
|
|
425
502
|
}
|
|
426
503
|
if (Array.isArray(projected.ends)) {
|
|
@@ -828,14 +905,14 @@ export function createV2CommandSession(model, options = {}) {
|
|
|
828
905
|
|
|
829
906
|
mergeMembers(sheet, memberIds, mergedPx) {
|
|
830
907
|
return session.transact('merge members', (doc) => {
|
|
831
|
-
const id = mergeMemberGroup(doc, sheet, memberIds, mergedPx, mintId);
|
|
908
|
+
const id = mergeMemberGroup(doc, sheet, memberIds, mergedPx, mintId, resolveSection);
|
|
832
909
|
return { changedIds: [id], structural: true, value: id };
|
|
833
910
|
});
|
|
834
911
|
},
|
|
835
912
|
|
|
836
913
|
mergeMemberGroups(sheet, groups) {
|
|
837
914
|
return session.transact('merge member groups', (doc) => {
|
|
838
|
-
const made = groups.map((group) => mergeMemberGroup(doc, sheet, group.memberIds, group.wp, mintId));
|
|
915
|
+
const made = groups.map((group) => mergeMemberGroup(doc, sheet, group.memberIds, group.wp, mintId, resolveSection));
|
|
839
916
|
return { changedIds: made, structural: true, value: made };
|
|
840
917
|
});
|
|
841
918
|
},
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* It never mutates the model; importing this module is therefore inert.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { sheetIncludesElevation } from './steel-3d-core.js';
|
|
9
|
+
import { sheetIncludesElevation,POSITION_BASIS_CAPABILITY_VERSION } from './steel-3d-core.js';
|
|
10
|
+
export const POSITION_BASIS_PROJECTION_VERSION=POSITION_BASIS_CAPABILITY_VERSION;
|
|
10
11
|
import { worldToSheetPx } from './steel-plan-transform.js';
|
|
11
12
|
|
|
12
13
|
const IN_MM = 25.4;
|
|
@@ -76,7 +77,7 @@ export function projectMember(member, plan, session = null) {
|
|
|
76
77
|
role: member.role || 'beam',
|
|
77
78
|
provenance: member.provenance,
|
|
78
79
|
};
|
|
79
|
-
for (const key of ['material', 'memberType', 'position', 'positionH', 'positionOffset', 'positionHOffset', 'rot', 'section', 'bf', 'rfi', 'mf', 'verified', 'source', 'brace']) {
|
|
80
|
+
for (const key of ['material', 'memberType', 'position', 'positionH', 'positionOffset', 'positionHOffset', 'positionBasis', 'rot', 'section', 'bf', 'rfi', 'mf', 'verified', 'source', 'brace']) {
|
|
80
81
|
if (member[key] !== undefined) meta[key] = clone(member[key]);
|
|
81
82
|
}
|
|
82
83
|
const endMeta = Array.isArray(member.ends) ? member.ends : [{}, {}];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@floless/app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.133.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Thin localhost host for floless.app — serves web/ and shells the aware CLI. No engine, no LLM.",
|
|
6
6
|
"bin": {
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"build:exe": "node build/bundle.mjs && node build/make-sea.mjs",
|
|
28
28
|
"verify:skills": "node build/verify-shipped-skills.mjs",
|
|
29
29
|
"verify:skill-versions": "node build/verify-skill-versions.mjs",
|
|
30
|
+
"verify:package-version": "node build/verify-package-version.mjs",
|
|
30
31
|
"verify:skill-parity": "node build/verify-skill-parity.mjs",
|
|
31
32
|
"verify:flo": "node build/verify-flo-descriptions.mjs",
|
|
32
33
|
"verify:aisc": "node build/verify-aisc-table.mjs",
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
"verify:flo-versions": "node build/verify-flo-versions.mjs",
|
|
45
46
|
"verify:boundary": "node build/verify-model-boundary.mjs",
|
|
46
47
|
"verify:change-reasons": "node build/verify-change-reasons.mjs",
|
|
48
|
+
"verify:contract-publication": "node build/verify-contract-publication.mjs",
|
|
47
49
|
"verify:no-agent-trailer": "node build/verify-no-agent-trailer.mjs",
|
|
48
50
|
"verify:app-publication": "node build/verify-app-publication-writers.mjs",
|
|
49
51
|
"verify:guards-wired": "node build/verify-guards-wired.mjs",
|
|
@@ -67,6 +69,7 @@
|
|
|
67
69
|
"esbuild": "^0.28.0",
|
|
68
70
|
"fastify": "^5.0.0",
|
|
69
71
|
"fflate": "^0.8.3",
|
|
72
|
+
"linkedom": "^0.18.12",
|
|
70
73
|
"pino-pretty": "^13.0.0",
|
|
71
74
|
"postject": "^1.0.0-alpha.6",
|
|
72
75
|
"rcedit": "^5.0.2",
|