@floless/app 0.103.0 → 0.103.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 +2 -2
- package/dist/web/steel-editor.html +13 -10
- package/package.json +1 -1
package/dist/floless-server.cjs
CHANGED
|
@@ -53583,7 +53583,7 @@ function appVersion() {
|
|
|
53583
53583
|
return resolveVersion({
|
|
53584
53584
|
isSea: isSea2(),
|
|
53585
53585
|
sqVersionXml: readSqVersionXml(),
|
|
53586
|
-
define: true ? "0.103.
|
|
53586
|
+
define: true ? "0.103.1" : void 0,
|
|
53587
53587
|
pkgVersion: readPkgVersion()
|
|
53588
53588
|
});
|
|
53589
53589
|
}
|
|
@@ -53593,7 +53593,7 @@ function resolveChannel(s) {
|
|
|
53593
53593
|
return "dev";
|
|
53594
53594
|
}
|
|
53595
53595
|
function appChannel() {
|
|
53596
|
-
return resolveChannel({ isSea: isSea2(), define: true ? "0.103.
|
|
53596
|
+
return resolveChannel({ isSea: isSea2(), define: true ? "0.103.1" : void 0 });
|
|
53597
53597
|
}
|
|
53598
53598
|
|
|
53599
53599
|
// workflow-update.ts
|
|
@@ -6397,7 +6397,7 @@ function updConnBtn(){const b=document.getElementById('connBtn');if(b)b.textCont
|
|
|
6397
6397
|
// --- Auto-detail base plates: one click adds a base-plate joint (engine defaults) to every column
|
|
6398
6398
|
// that lacks one; once all columns are detailed, clicking again clears the AUTO ones (user-placed/
|
|
6399
6399
|
// AI-tuned base plates are kept). The engine renders the plate + anchor kit + weld in 3D. ---
|
|
6400
|
-
function colMemberIds(){const ids=[];for(const m of (
|
|
6400
|
+
function colMemberIds(){const ids=[];for(const m of allMembers())if(m&&m.role==='column'&&m.id)ids.push(m.id);return ids;} // EVERY sheet's columns — selection, joints (C.joints) and undo are all model-wide, so the selection-scoped auto-detail must see columns on any sheet (else selecting a column on a non-active sheet in 3D wrongly disables Base plates).
|
|
6401
6401
|
function bpTargetIds(){const all=colMemberIds();return selIds.size?all.filter(id=>selIds.has(id)):all;} // selected columns scope the auto-detail; empty selection = every column (issue: create for selection, still supports all)
|
|
6402
6402
|
function bpJointId(mid){const ids=new Set((C.joints||[]).map(j=>j&&j.id));let id='bp-'+mid,k=2;while(ids.has(id))id='bp-'+mid+'-'+(k++);return id;} // unique vs ANY existing joint id (no collision with a user-placed joint)
|
|
6403
6403
|
function updBpBtn(){const b=document.getElementById('bpBtn');if(!b)return;
|
|
@@ -6429,8 +6429,8 @@ function toggleBasePlates(){
|
|
|
6429
6429
|
// --- Auto-detail shear plates: one click adds a shear-plate joint to every ELIGIBLE beam end that lacks
|
|
6430
6430
|
// one; once all eligible ends are detailed, clicking again clears the AUTO ones (user/AI-tuned kept). An
|
|
6431
6431
|
// end is eligible when its connection note/row reads shear/simple, or it frames into a support and isn't
|
|
6432
|
-
// marked moment. main = the beam, at = end0|end1, secondaries = [support] (geometry inferred).
|
|
6433
|
-
// undoable (rides snapshot()/apply()
|
|
6432
|
+
// marked moment. main = the beam, at = end0|end1, secondaries = [support] (geometry inferred). Model-wide
|
|
6433
|
+
// (like base plates — targets scan allMembers()), undoable (rides snapshot()/apply()). The engine renders the fin plate + bolt
|
|
6434
6434
|
// group + weld (+ optional stiffener) in 3D. ---
|
|
6435
6435
|
function spConnText(end){const r=end&&end.conn?connRowById(end.conn):null;return ((r&&r.type)||'')+' '+((end&&end.note)||'');}
|
|
6436
6436
|
function spIsMoment(t){return /moment|fixed|\bmf\b|fully\s*weld/i.test(t||'');}
|
|
@@ -6438,17 +6438,18 @@ function spIsShear(t){return /shear|fin|tab|clip|simple|pin|web/i.test(t||'');}
|
|
|
6438
6438
|
function spDist(a,b){return Math.hypot(a[0]-b[0],a[1]-b[1]);}
|
|
6439
6439
|
function spDistToSeg(p,a,b){const vx=b[0]-a[0],vy=b[1]-a[1],L2=vx*vx+vy*vy;if(L2<1e-9)return spDist(p,a);
|
|
6440
6440
|
let t=((p[0]-a[0])*vx+(p[1]-a[1])*vy)/L2;t=Math.max(0,Math.min(1,t));return spDist(p,[a[0]+t*vx,a[1]+t*vy]);}
|
|
6441
|
-
function spSupportTol(){const k=(
|
|
6441
|
+
function spSupportTol(pl){const p=pl||P,k=(p.pt_per_ft&&p.pt_per_ft>0)?p.pt_per_ft:12;return Math.max(6,0.75*k);} // ~9in at the given plan's scale, min 6 display-pts: "the beam end meets this member". pt_per_ft is PER-SHEET, so the tolerance must use the beam's OWN plane (below), not the active one.
|
|
6442
6442
|
function spInferSupport(beam,endIdx){if(!beam||!Array.isArray(beam.wp)||beam.wp.length<2)return null;const pt=beam.wp[endIdx];if(!pt)return null;
|
|
6443
|
-
|
|
6443
|
+
const pl=planeOfMember(beam)||P; // measure distances AND scale the tolerance in the beam's OWN sheet (wp are per-sheet 2D coords at that sheet's pt_per_ft — cross-sheet proximity is meaningless)
|
|
6444
|
+
let best=null,bd=Infinity;for(const m of (pl.members||[])){if(!m||m.id===beam.id||isBrace(m)||!Array.isArray(m.wp)||!m.wp.length)continue; // a brace never SUPPORTS a shear plate (mirrors server inferSupport)
|
|
6444
6445
|
const d=(m.role==='column')?spDist(pt,m.wp[0]):(m.wp.length>=2?spDistToSeg(pt,m.wp[0],m.wp[1]):spDist(pt,m.wp[0]));if(d<bd){bd=d;best=m;}}
|
|
6445
|
-
return (best&&bd<=spSupportTol())?best:null;}
|
|
6446
|
+
return (best&&bd<=spSupportTol(pl))?best:null;}
|
|
6446
6447
|
function spEndEligible(beam,endIdx){if(!beam||beam.role==='column'||isBrace(beam)||!beam.ends)return false; // a brace never CARRIES a shear plate (mirrors server expandJoints)
|
|
6447
6448
|
if(beam.mf===true||/^MF/i.test(beam.profile||''))return false; // a moment-frame girder (resolved via Frames → m.mf, or an unresolved MF mark) takes a MOMENT connection, not a shear tab
|
|
6448
6449
|
const end=beam.ends[endIdx];if(!end)return false;
|
|
6449
6450
|
const t=spConnText(end);if(spIsMoment(t))return false;if(spIsShear(t))return true;return !!spInferSupport(beam,endIdx);} // explicit moment → no; explicit shear → yes; else propose only where the end frames into a support
|
|
6450
|
-
function spEligibleEnds(){const out=[];for(const m of (
|
|
6451
|
-
function spBeamIds(){const s=new Set();for(const m of (
|
|
6451
|
+
function spEligibleEnds(){const out=[];for(const m of allMembers()){if(!m||m.role==='column'||isBrace(m))continue;for(const e of [0,1])if(spEndEligible(m,e))out.push({beam:m,endIdx:e});}return out;} // EVERY sheet's beams — eligibility per end still resolves the support within the beam's own sheet (spInferSupport)
|
|
6452
|
+
function spBeamIds(){const s=new Set();for(const m of allMembers())if(m&&m.role!=='column'&&!isBrace(m)&&m.id)s.add(m.id);return s;} // EVERY sheet's beams (never braces) — selection/joints/undo are model-wide, so a model-wide selection scopes correctly
|
|
6452
6453
|
function spJointOf(beamId,endIdx){return (C.joints||[]).find(j=>j&&j.kind==='shear-plate'&&j.main===beamId&&j.at==='end'+endIdx);}
|
|
6453
6454
|
function spTargetEnds(){const e=spEligibleEnds();return selIds.size?e.filter(({beam})=>selIds.has(beam.id)):e;} // eligible ends of the SELECTED beams; empty selection = every eligible end (issue: create for selection, still supports all)
|
|
6454
6455
|
function spJointId(beamId,endIdx){const ids=new Set((C.joints||[]).map(j=>j&&j.id));let id='sp-'+beamId+'-e'+endIdx,k=2;while(ids.has(id))id='sp-'+beamId+'-e'+endIdx+'-'+(k++);return id;} // unique vs ANY existing joint id
|
|
@@ -6890,6 +6891,7 @@ const _restored=restoreSaved(); // bring back this brows
|
|
|
6890
6891
|
// non-brace, clamp bad values. Covers reader-emitted, partial and localStorage-restored payloads, so it runs
|
|
6891
6892
|
// AFTER restoreSaved() and BEFORE the first paint. (normBrace lives inside main(); boot() can't see it.)
|
|
6892
6893
|
for(const _p of (C.plans||[]))for(const _m of (_p.members||[]))normBrace(_m);
|
|
6894
|
+
for(const _p of (C.plans||[]))for(const _m of (_p.members||[]))ensureMeta(_m); // normalize role/ends/col on EVERY sheet, not just the active one setPlan() does — model-wide detailing (Base/Shear plates) reads off-sheet members, so a beam with no authored `ends` must be normalized here or it reads as ineligible until its sheet is opened. Same order as the active plan (normBrace → ensureMeta).
|
|
6893
6895
|
for(const _p of (C.plans||[]))sanitizeDims(_p); // F9: validate magnetic dim refs on EVERY sheet (not just the active one setPlan sanitizes) — an unvisited plan could otherwise keep a stale/cross-plan ref (Codex R1 #17). Runs after normBrace so isBrace is reliable.
|
|
6894
6896
|
// Migrate every plan before the first whole-contract validation/save/3D build. Visiting sheets one-by-one must
|
|
6895
6897
|
// not be required to turn legacy scalar/overlong labels_z into the canonical bounded array.
|
|
@@ -7362,7 +7364,8 @@ if(new URLSearchParams(location.search).get('selftest')==='1'){(function(){
|
|
|
7362
7364
|
C.joints=sj;}
|
|
7363
7365
|
|
|
7364
7366
|
// Detailing scoping + selected-connection delete (issue: create/remove for the selection, not the whole model)
|
|
7365
|
-
{const sj=C.joints,ss=selIds,sPb=partsById;
|
|
7367
|
+
{const sj=C.joints,ss=selIds,sPb=partsById,sPl=C.plans,sA=C.active;
|
|
7368
|
+
C.plans=[P];C.active=0; // isolate: the target helpers are model-wide (allMembers over C.plans), so pin the world to this one test plan or a real multi-sheet contract's off-sheet columns/beams would leak into the counts
|
|
7366
7369
|
// base plates: selection scopes the target columns; empty selection = every column
|
|
7367
7370
|
P.members=[{id:'C1',role:'column',wp:[[0,0]]},{id:'C2',role:'column',wp:[[100,0]]}];
|
|
7368
7371
|
selIds=new Set();ok(bpTargetIds().length===2,'bpTargetIds → every column when nothing is selected');
|
|
@@ -7378,7 +7381,7 @@ if(new URLSearchParams(location.search).get('selftest')==='1'){(function(){
|
|
|
7378
7381
|
selIds=new Set(['jA:plate','jA:bolt0']);
|
|
7379
7382
|
ok(selIsConnOnly()&&selJointIds().size===1&&selJointIds().has('jA'),'selJointIds/selIsConnOnly → the one joint of the selected parts');
|
|
7380
7383
|
selIds=new Set(['jA:plate','C1']);ok(!selIsConnOnly(),'selIsConnOnly false when a member is mixed in');
|
|
7381
|
-
C.joints=sj;selIds=ss;partsById=sPb;}
|
|
7384
|
+
C.joints=sj;selIds=ss;partsById=sPb;C.plans=sPl;C.active=sA;}
|
|
7382
7385
|
|
|
7383
7386
|
// the editor's confidence mirror: brace ends are not scored as beam connections
|
|
7384
7387
|
{const spl=C.plans,sa=C.active;
|