@floless/app 0.113.0 → 0.113.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 +1559 -975
- package/dist/web/steel-editor.html +132 -19
- package/dist/web/workspaces.js +1 -0
- package/package.json +1 -1
|
@@ -1156,6 +1156,7 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
|
|
|
1156
1156
|
<div id=selFly role=menu aria-label="Selectable types"></div>
|
|
1157
1157
|
</div>
|
|
1158
1158
|
<div id=panelResizer role=separator aria-orientation=vertical aria-label="Resize properties panel" tabindex=0 data-tip="Drag to resize · double-click to reset"></div>
|
|
1159
|
+
<span id=connectionTruthStatus class=sr-only role=status aria-live=polite aria-atomic=true></span>
|
|
1159
1160
|
<aside id=panel></aside>
|
|
1160
1161
|
</main>
|
|
1161
1162
|
<datalist id=conntypes><option>moment</option><option>drag</option><option>shear</option><option>braced</option><option>pinned</option><option>fixed</option></datalist>
|
|
@@ -2333,7 +2334,7 @@ function apply(json){
|
|
|
2333
2334
|
if(window.Steel3DView&&window.Steel3DView.setClipState&&'clips' in d)window.Steel3DView.setClipState(d.clips); // restore clips + work area alongside the contract
|
|
2334
2335
|
if('member_types' in d)C.member_types=sanitizeMemberTypes(d.member_types);
|
|
2335
2336
|
if('member_styles' in d)C.member_styles=(d.member_styles&&typeof d.member_styles==='object'&&!Array.isArray(d.member_styles))?d.member_styles:{}; // F5: model-global per-type line styles ride the undo stack (like dim_style) so a setMemberLineStyle() edit() is undoable
|
|
2336
|
-
|
|
2337
|
+
scheduleSave();render();sync3D();}
|
|
2337
2338
|
function doUndo(){if(!undo.length)return;redo.push(snapshotLike());apply(undo.pop());}
|
|
2338
2339
|
function doRedo(){if(!redo.length)return;undo.push(snapshotLike());apply(redo.pop());}
|
|
2339
2340
|
/**
|
|
@@ -4620,11 +4621,28 @@ function panel(){
|
|
|
4620
4621
|
// about, so an un-annotated end gains no clutter. A refusal is never a dead end: it says what is missing
|
|
4621
4622
|
// and offers the action that fixes it, because "Apply is greyed out and I don't know why" is the failure
|
|
4622
4623
|
// this whole surface exists to avoid.
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4624
|
+
const dStat=(id,o,which)=>{
|
|
4625
|
+
const r=resolveDetail(m,which), cap=captureEligible(m,which);
|
|
4626
|
+
const capBtn=cap?`<button id=${id}_cap class=ghost data-tip="Remember what this connection means, so every end with the same callout can be built from it">Remember as ${esc(o.detail)}</button>`:'';
|
|
4627
|
+
const joint=jointAtEnd(m.id,which), truthId=(joint&&joint.id)||connectionPreviewJointByEnd.get(o), diag=truthId&&connectionDiagnostics.find(d=>d&&d.jointId===truthId);
|
|
4628
|
+
if(truthId&&connectionDiagnosticsStatus!=='ready'){
|
|
4629
|
+
const unavailable=connectionDiagnosticsStatus==='unavailable';
|
|
4630
|
+
return `<div class=drow aria-busy="${unavailable?'false':'true'}"><div style="flex:1 1 100%;min-width:0"><div class="dmsg warn">${unavailable?'Build status unavailable':'Checking connection build status…'}</div><div class=hint role=note style="margin-top:3px">${unavailable?'The connection engine could not verify this detail. No build action is offered until verification succeeds.':'The connection engine is checking the current model before offering a build action.'}</div></div>${unavailable?`<button id=${id}_retry class=ghostw data-tip="Check this connection against the current model again">Check again</button>`:''}</div>`;
|
|
4631
|
+
}
|
|
4632
|
+
if(diag&&diag.severity==='error'){
|
|
4633
|
+
const truth=connectionRefusalCopy(diag,m);
|
|
4634
|
+
return `<div class=drow><div style="flex:1 1 100%;min-width:0"><div class="dmsg warn">${esc(truth.head)}</div><div class=hint role=note style="margin-top:3px">${esc(truth.detail)}</div></div></div>`;
|
|
4635
|
+
}
|
|
4636
|
+
if(diag&&diag.code==='bolt-gauge-adjusted'){
|
|
4637
|
+
const authored=fmtFtIn(Number(diag.authored)/25.4),built=fmtFtIn(Number(diag.built)/25.4);
|
|
4638
|
+
const preview=!joint;
|
|
4639
|
+
return `<div class=drow><div style="flex:1 1 100%;min-width:0"><div class="dmsg warn">${preview?'Would build':'Built'} with adjusted bolt gauge</div>`
|
|
4640
|
+
+`<div class=hint role=note style="margin-top:3px"><div>Authored bolt gauge <b>${esc(authored)}</b></div><div>Bolt gauge (${preview?'after build / in exports':'built / exported'}) <b>${esc(built)}</b></div>`
|
|
4641
|
+
+`<div style="margin-top:3px">The bolted region cannot fit the authored gauge. ${preview?'Building this detail would make':'The 3D model, IFC, and Tekla export use'} ${esc(built)}${preview?' the gauge used by the 3D model, IFC, and Tekla export.':'.'}</div></div></div>`
|
|
4642
|
+
+(r.ok?`<button id=${id}_ap class=ghostw data-tip="${preview?'Build this connection from the detail':'Build it again from the detail, replacing what is here'}">${preview?'Build it':'Rebuild it'}</button>`:'')+`${capBtn}</div>`;
|
|
4643
|
+
}
|
|
4644
|
+
if(!o.detail&&!o.conn)return '';
|
|
4645
|
+
if(r.ok){
|
|
4628
4646
|
// `built` also requires the joint to CITE this row: an identical-looking connection that came from a
|
|
4629
4647
|
// different detail is not this detail's work, and saying "Built" for it would misreport provenance.
|
|
4630
4648
|
const j=jointAtEnd(m.id,which), built=!!j&&j.kind===r.kind&&j.conn===r.rowId&&!recipeParamsDiffer(j.params,r.params);
|
|
@@ -4664,17 +4682,19 @@ function panel(){
|
|
|
4664
4682
|
const spAllAuto=spjs.length>0&&spjs.every(x=>x.j.source==='auto');
|
|
4665
4683
|
// DOM ids key on the END INDEX (0/1), NEVER the joint id (a free-string schema field) — so a crafted
|
|
4666
4684
|
// joints[].id can't inject into an attribute position; the handlers below close over the real joint.
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4685
|
+
const spF=(e,j,key,label,ph,unit)=>{const raw=j&&j.params&&j.params[key]!=null?j.params[key]:null;const val=raw==null?'':(unit==='mm'?esc(fmtFtIn(Number(raw)/25.4)):esc(String(raw)));
|
|
4686
|
+
return `<div class=elab>${label}</div><input id="spf_e${e}_${key}" inputmode=decimal placeholder="${esc(ph)}" value="${val}" autocomplete=off>${unit&&unit!=='mm'?`<span class=edec>${unit}</span>`:''}`;}; // mm params shown/entered in ft-in
|
|
4687
|
+
const spBlock=({e,j})=>{const dot=e===1?dotE:dotS,lbl=e===1?'End':'Start',st=!!(j.params&&j.params.stiffener);const gus=j.kind==='brace-gusset';
|
|
4688
|
+
const gaugeDiag=connectionDiagnostics.find(d=>d&&d.jointId===j.id&&d.code==='bolt-gauge-adjusted');
|
|
4689
|
+
const builtGauge=gaugeDiag?`<div style="display:flex;justify-content:space-between;gap:8px;font-size:12px;margin:3px 0" role=note><span style="color:var(--mut)">Bolt gauge (built / exported)</span><span style="font-variant-numeric:tabular-nums">${esc(fmtFtIn(Number(gaugeDiag.built)/25.4))}</span></div>`:'';
|
|
4690
|
+
return `<div class=divrow><hr><span class=sect style="margin:0">${dot}${lbl} · ${gus?'Gusset plate':'Shear plate'}</span><hr></div>
|
|
4671
4691
|
${spF(e,j,'plateWidth','Plate width','auto','mm')}${spF(e,j,'plateHeight','Plate height','auto','mm')}${spF(e,j,'plateThickness','Thickness','3/8"','mm')}${spF(e,j,'weldLeg','Weld leg','1/4"','mm')}${gus?spF(e,j,'plateCount','Plates (1 or 2)','2',''):spF(e,j,'clearance','Clearance (beam gap)','1/2"','mm')}
|
|
4672
4692
|
<div class=elabrow><span class=elab>${gus?'Lapped side':'Web side'}</span></div>
|
|
4673
4693
|
<div class=seg2 style="margin-top:0"><button id="spside_e${e}_n" class="${(j.params&&j.params.webSide<0)?'':'on'}">Near</button><button id="spside_e${e}_f" class="${(j.params&&j.params.webSide<0)?'on':''}">Far</button></div>
|
|
4674
4694
|
${gus?'':`<div class=elabrow><span class=elab>Weld sides</span></div>
|
|
4675
4695
|
<div class=seg2 style="margin-top:0"><button id="spw_e${e}_n" class="${(j.params&&j.params.weldSide==='near')?'on':''}">Near</button><button id="spw_e${e}_f" class="${(j.params&&j.params.weldSide==='far')?'on':''}">Far</button><button id="spw_e${e}_b" class="${(!j.params||!j.params.weldSide||j.params.weldSide==='both')?'on':''}">Both</button></div>`}
|
|
4676
4696
|
<div class=elab style="margin-top:7px;opacity:.7">Bolts</div>
|
|
4677
|
-
|
|
4697
|
+
${spF(e,j,'boltCols','Bolt columns','1','')}${spF(e,j,'boltRows','Bolt rows','3','')}${spF(e,j,'boltDia','Bolt ⌀','3/4"','mm')}${spF(e,j,'boltPitch','Row spacing','2 3/4"','mm')}${(Number(j.params&&j.params.boltCols)>1)?spF(e,j,'boltColPitch','Authored bolt gauge',(j.params&&j.params.boltPitch!=null?fmtFtIn(Number(j.params.boltPitch)/25.4):'2 3/4"'),'mm'):''}${builtGauge}
|
|
4678
4698
|
<div class=elabrow><span class=elab>Bolt grade</span></div>
|
|
4679
4699
|
<div class=seg2 style="margin-top:0"><button id="spg_e${e}_325" class="${(j.params&&j.params.boltGrade==='A490')?'':'on'}">A325</button><button id="spg_e${e}_490" class="${(j.params&&j.params.boltGrade==='A490')?'on':''}">A490</button></div>
|
|
4680
4700
|
<div class=hint style="margin:4px 0 0">Bolt length auto-sizes from the grip (AISC) → shown on the bolt callout.</div>
|
|
@@ -4841,6 +4861,8 @@ function panel(){
|
|
|
4841
4861
|
if(cap)cap.onclick=()=>openCaptureModal(m,which);
|
|
4842
4862
|
const fx=document.getElementById(id+'_fx');
|
|
4843
4863
|
if(fx)fx.onclick=()=>openDetailPick(m,which);
|
|
4864
|
+
const retry=document.getElementById(id+'_retry');
|
|
4865
|
+
if(retry)retry.onclick=()=>{invalidateConnectionDiagnostics(true);panel();};
|
|
4844
4866
|
};
|
|
4845
4867
|
const wireConn=(id,o)=>{const i=document.getElementById(id);if(!i)return;i.onchange=e=>edit(()=>{const v=(e.target.value||'').trim();o.conn=(!v||v==='— none —')?'':v.split(' · ')[0];});};
|
|
4846
4868
|
if(col){
|
|
@@ -5995,6 +6017,7 @@ function updCS(){const s=document.getElementById('csStat');const r=document.getE
|
|
|
5995
6017
|
// (the Tekla send takes seconds); the next plain toast() replaces the text and re-arms the timer.
|
|
5996
6018
|
function toast(msg,sticky){let t=document.getElementById('toast');
|
|
5997
6019
|
if(!t){t=document.createElement('div');t.id='toast';t.style.cssText='position:fixed;left:50%;bottom:18px;transform:translateX(-50%);background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:8px 14px;box-shadow:0 6px 20px rgba(0,0,0,.5);z-index:60;font:13px system-ui;opacity:0;transition:opacity .2s;pointer-events:none';document.body.appendChild(t);}
|
|
6020
|
+
t.setAttribute('role','status');t.setAttribute('aria-live','polite');t.setAttribute('aria-atomic','true');
|
|
5998
6021
|
t.textContent=msg;t.style.opacity='1';clearTimeout(t._h);if(!sticky)t._h=setTimeout(()=>{t.style.opacity='0';},2600);}
|
|
5999
6022
|
// --- pointer: select(+ctrl toggle / box) + group-move + endpoint (Shift = ortho) ---
|
|
6000
6023
|
svg.addEventListener('pointerdown',e=>{if(e.button!==0)return;const t=e.target;
|
|
@@ -6718,7 +6741,100 @@ document.getElementById('cpLevelB').onclick=()=>openLevelModal('copy');
|
|
|
6718
6741
|
// fetches the SAME scene the bake uses (/api/contract/:id/scene) so 2D and 3D show one contract. ---
|
|
6719
6742
|
// Coped beams (auto, clash-driven) — cache the cut labels per member as the scene is fetched so the
|
|
6720
6743
|
// member Inspector can show a read-only "Cope (auto)" note (a coped beam otherwise looks like an error).
|
|
6721
|
-
let copesByMember={}, partsById={};
|
|
6744
|
+
let copesByMember={}, partsById={}, connectionDiagnostics=[], connectionDiagnosticsStatus='pending', connectionDiagnosticsSeq=0, connectionDiagnosticsTimer=null, connectionPreviewJointByEnd=new WeakMap(), shownConnectionDiagnosticSignatures=new Set();
|
|
6745
|
+
const connectionDiagnosticSignature=d=>[d.jointId,d.code,d.severity,d.field||'',d.authored==null?'':d.authored,d.built==null?'':d.built,d.supportId||''].join('|');
|
|
6746
|
+
function announceConnectionTruth(message,busy){
|
|
6747
|
+
const p=document.getElementById('panel'),s=document.getElementById('connectionTruthStatus');
|
|
6748
|
+
if(p){if(busy)p.setAttribute('aria-busy','true');else p.removeAttribute('aria-busy');}
|
|
6749
|
+
if(s){s.setAttribute('role','status');s.setAttribute('aria-live','polite');s.setAttribute('aria-atomic','true');s.textContent=message||'';}
|
|
6750
|
+
}
|
|
6751
|
+
function connectionRefusalCopy(d,m){
|
|
6752
|
+
const support=d.supportId||'the named support',main=d.mainId||m.id,profile=d.profile||m.profile||'This profile';
|
|
6753
|
+
if(d.code==='closed-section-unsupported'){
|
|
6754
|
+
return d.kind==='brace-gusset'
|
|
6755
|
+
? {head:'Not built · This gusset does not support closed sections',detail:profile+' needs a slotted-tube or other welded detail; this through-bolted detail created no geometry.'}
|
|
6756
|
+
: {head:'Not built · This shear plate does not support closed sections',detail:profile+' needs a compatible welded detail; this through-bolted detail created no geometry.'};
|
|
6757
|
+
}
|
|
6758
|
+
const byCode={
|
|
6759
|
+
'named-support-out-of-reach':{head:'Not built · Named support is out of reach',detail:main+' does not meet '+support+'. No gusset or brace trim was created.'},
|
|
6760
|
+
'main-axis-unusable':{head:'Not built · Member direction cannot be resolved',detail:main+' has no usable plan run for this connection. No geometry was created.'},
|
|
6761
|
+
'main-not-brace':{head:'Not built · This detail requires a brace',detail:main+' is not classified as a brace. No gusset or member trim was created.'},
|
|
6762
|
+
'main-geometry-unusable':{head:'Not built · Brace geometry is incomplete',detail:main+' has no usable body for this connection. No gusset or member trim was created.'},
|
|
6763
|
+
'named-support-missing':{head:'Not built · Named support is missing',detail:main+' names '+support+', but that member is not in the model. No gusset or brace trim was created.'},
|
|
6764
|
+
'named-support-is-brace':{head:'Not built · Named support is another brace',detail:support+' cannot support this gusset. No gusset or brace trim was created.'},
|
|
6765
|
+
'named-support-unusable':{head:'Not built · Named support has no usable body',detail:support+' cannot support this gusset. No gusset or brace trim was created.'},
|
|
6766
|
+
'brace-axis-unusable':{head:'Not built · Brace direction cannot be resolved',detail:main+' has no usable plan run for a vertical gusset. No geometry or trim was created.'},
|
|
6767
|
+
'brace-slope-unsupported':{head:'Not built · This gusset requires a level brace',detail:main+' needs a connection aligned to its slope; this vertical detail created no geometry or trim.'},
|
|
6768
|
+
'support-not-found':{head:'Not built · No support meets this brace end',detail:'No support face could be proved for '+main+'. No gusset or brace trim was created.'},
|
|
6769
|
+
'setback-unprovable':{head:'Not built · Brace setback cannot be proved',detail:'The support face and '+main+' do not define a safe setback. No gusset or brace trim was created.'},
|
|
6770
|
+
'trim-exceeds-member':{head:'Not built · The required trim is too long',detail:main+' cannot safely give up enough length for this gusset. No geometry or trim was created.'},
|
|
6771
|
+
'bearing-face-unresolved':{head:'Not built · Bearing face cannot be resolved',detail:profile+' has no provable face for this through-bolted detail. No geometry or trim was created.'},
|
|
6772
|
+
'bolt-region-too-small':{head:'Not built · The bolt group does not fit',detail:'The authored plate cannot hold the required bolt group and edge distances. No geometry or trim was created.'}
|
|
6773
|
+
};
|
|
6774
|
+
return byCode[d.code]||{head:'Not built · Connection was refused',detail:'The connection engine refused '+(d.jointId||'this joint')+' ('+(d.code||'unknown reason')+'). No geometry or member trim was created.'};
|
|
6775
|
+
}
|
|
6776
|
+
function updateConnectionDiagnostics(raw,announce=true){
|
|
6777
|
+
const unique=[],seen=new Set();
|
|
6778
|
+
for(const d of (Array.isArray(raw)?raw:[])){if(!d||typeof d!=='object'||!d.jointId||!d.code)continue;const sig=connectionDiagnosticSignature(d);if(seen.has(sig))continue;seen.add(sig);unique.push(d);}
|
|
6779
|
+
for(const sig of [...shownConnectionDiagnosticSignatures])if(!seen.has(sig))shownConnectionDiagnosticSignatures.delete(sig);
|
|
6780
|
+
const fresh=unique.filter(d=>!shownConnectionDiagnosticSignatures.has(connectionDiagnosticSignature(d)));
|
|
6781
|
+
connectionDiagnostics=unique;connectionDiagnosticsStatus='ready';announceConnectionTruth('Connection build status checked.',false);
|
|
6782
|
+
for(const d of fresh)shownConnectionDiagnosticSignatures.add(connectionDiagnosticSignature(d));
|
|
6783
|
+
if(announce&&fresh.length){
|
|
6784
|
+
const refused=fresh.filter(d=>d.severity==='error').length,adjusted=fresh.filter(d=>d.code==='bolt-gauge-adjusted').length;
|
|
6785
|
+
const bits=[];if(refused)bits.push(refused+' connection'+(refused>1?'s':'')+' not built');if(adjusted)bits.push(adjusted+' built with an adjusted bolt gauge');
|
|
6786
|
+
toast(bits.join(' · ')+' — see the member inspector.');
|
|
6787
|
+
}
|
|
6788
|
+
return {count:fresh.length,refused:fresh.filter(d=>d.severity==='error').length,adjusted:fresh.filter(d=>d.code==='bolt-gauge-adjusted').length};
|
|
6789
|
+
}
|
|
6790
|
+
function applyConnectionBakeTruth(j,announce=true){
|
|
6791
|
+
const fresh=updateConnectionDiagnostics(j&&j.diagnostics,false),sk=Array.isArray(j&&j.skipped)?j.skipped:[];
|
|
6792
|
+
const diagnosed=new Set(connectionDiagnostics.map(d=>d.jointId));
|
|
6793
|
+
const legacy=sk.filter(s=>String(s).startsWith('joint:')&&!diagnosed.has(String(s).slice(6))).length;
|
|
6794
|
+
if(sk.length)console.warn('3D bake skipped '+sk.length+' item(s):',sk);
|
|
6795
|
+
if(announce&&(fresh.count||legacy)){
|
|
6796
|
+
const bits=[];
|
|
6797
|
+
if(fresh.refused)bits.push(fresh.refused+' connection'+(fresh.refused>1?'s':'')+' not built');
|
|
6798
|
+
if(fresh.adjusted)bits.push(fresh.adjusted+' built with an adjusted bolt gauge');
|
|
6799
|
+
if(legacy)bits.push(legacy+' connection'+(legacy>1?'s':'')+' not shown in 3D');
|
|
6800
|
+
toast(bits.join(' · ')+' — '+(legacy?'see the member inspector and console.':'see the member inspector.'));
|
|
6801
|
+
}
|
|
6802
|
+
}
|
|
6803
|
+
async function fetchScenePayload(contract=C){
|
|
6804
|
+
const r=await fetch('/api/contract/'+encodeURIComponent(APP_ID)+'/scene'+PROJECT_QS,{method:'POST',headers:{'content-type':'application/json'},body:JSON.stringify({contract})});
|
|
6805
|
+
const j=await r.json();if(!j.ok)throw new Error(j.error||'scene render failed');return j;
|
|
6806
|
+
}
|
|
6807
|
+
function connectionTruthRequest(){
|
|
6808
|
+
const contract=JSON.parse(JSON.stringify(C)),previewByEnd=new WeakMap();
|
|
6809
|
+
if(!Array.isArray(contract.joints))contract.joints=[];
|
|
6810
|
+
const ids=new Set(contract.joints.map(j=>j&&j.id).filter(Boolean));let n=0;
|
|
6811
|
+
for(const m of allMembers()){
|
|
6812
|
+
if(!m)continue;
|
|
6813
|
+
const ends=m&&m.role==='column'?[{o:m.col,which:'col'}]:[{o:m&&m.ends&&m.ends[0],which:0},{o:m&&m.ends&&m.ends[1],which:1}];
|
|
6814
|
+
for(const t of ends){
|
|
6815
|
+
if(!t.o||(!t.o.detail&&!t.o.conn)||jointAtEnd(m.id,t.which))continue;
|
|
6816
|
+
const r=resolveDetail(m,t.which);if(!r.ok)continue;
|
|
6817
|
+
let id;do{id='preview-connection-'+(++n);}while(ids.has(id));ids.add(id);
|
|
6818
|
+
const joint={id,kind:r.kind,main:m.id,at:jointAtFor(t.which),params:Object.assign({},r.params),source:'preview',conn:r.rowId};
|
|
6819
|
+
if(r.kind==='shear-plate'&&t.which!=='col'){const sup=spInferSupport(m,t.which);joint.secondaries=sup?[sup.id]:[];}
|
|
6820
|
+
contract.joints.push(joint);previewByEnd.set(t.o,id);
|
|
6821
|
+
}
|
|
6822
|
+
}
|
|
6823
|
+
return {contract,previewByEnd,count:n};
|
|
6824
|
+
}
|
|
6825
|
+
function invalidateConnectionDiagnostics(immediate=false){
|
|
6826
|
+
const seq=++connectionDiagnosticsSeq,truth=connectionTruthRequest();
|
|
6827
|
+
if(connectionDiagnosticsTimer){clearTimeout(connectionDiagnosticsTimer);connectionDiagnosticsTimer=null;}
|
|
6828
|
+
connectionPreviewJointByEnd=truth.previewByEnd;
|
|
6829
|
+
if((!Array.isArray(C&&C.joints)||!C.joints.length)&&!truth.count){connectionDiagnostics=[];connectionDiagnosticsStatus='ready';announceConnectionTruth('',false);return;}
|
|
6830
|
+
connectionDiagnostics=[];connectionDiagnosticsStatus='pending';
|
|
6831
|
+
announceConnectionTruth('Checking connection build status.',true);
|
|
6832
|
+
connectionDiagnosticsTimer=setTimeout(async()=>{
|
|
6833
|
+
connectionDiagnosticsTimer=null;
|
|
6834
|
+
try{const j=await fetchScenePayload(truth.contract);if(seq!==connectionDiagnosticsSeq)return;applyConnectionBakeTruth(j,true);panel();}
|
|
6835
|
+
catch(e){if(seq!==connectionDiagnosticsSeq)return;connectionDiagnostics=[];connectionDiagnosticsStatus='unavailable';announceConnectionTruth('Connection build status unavailable. Use Check again to retry.',false);panel();console.warn('Connection build status unavailable:',(e&&e.message)||e);}
|
|
6836
|
+
},immediate?0:150);
|
|
6837
|
+
}
|
|
6722
6838
|
|
|
6723
6839
|
// --- Send the selection to Tekla (Ctrl+Shift-drag it out of the 3D view, or ⋯ → Session). The
|
|
6724
6840
|
// server bakes just these members as native parts in the OPEN model, at their real model
|
|
@@ -6940,7 +7056,7 @@ const view3dApi={
|
|
|
6940
7056
|
// PROJECT_QS is threaded so the server can resolve this project's activation grant — without it a
|
|
6941
7057
|
// steel.model/v2 draft posts app-scoped, no grant resolves, and the render is refused as "not
|
|
6942
7058
|
// activated" for a project that IS activated (P7d). Harmless for v1, which needs no grant.
|
|
6943
|
-
fetchScene:async()=>{const
|
|
7059
|
+
fetchScene:async()=>{const j=await fetchScenePayload();
|
|
6944
7060
|
// The bake reports everything it could NOT emit in `skipped[]`, and we used to discard it entirely — so a
|
|
6945
7061
|
// connection the engine refused (e.g. a shear plate whose main became a brace) vanished from 3D silently.
|
|
6946
7062
|
// Always log the full list. TOAST only for `joint:<id>` entries: a refused connection is unambiguous and
|
|
@@ -6954,11 +7070,7 @@ const view3dApi={
|
|
|
6954
7070
|
// v2 drops no foundation columns at all. What remains on v2 is (a) no resolvable section and (b) a
|
|
6955
7071
|
// genuinely zero-LENGTH member — and (b) is never expected, so the "would nag" argument no longer
|
|
6956
7072
|
// covers it. Widening `skipped` to carry reasons is the fix; it is not this change.
|
|
6957
|
-
{const
|
|
6958
|
-
if(sk.length){
|
|
6959
|
-
const jn=sk.filter(s=>String(s).startsWith('joint:')).length;
|
|
6960
|
-
console.warn('3D bake skipped '+sk.length+' item(s):',sk);
|
|
6961
|
-
if(jn)toast(jn+' connection'+(jn>1?'s':'')+' not shown in 3D — see the console');}}const cm={},pb={};const sc=j.scene||{};sc.elements=Array.isArray(sc.elements)?sc.elements:[];for(const el of sc.elements){if(!el)continue;if(el.id)pb[el.id]=el;if(el.kind==='cut'&&el.member){(cm[el.member]||(cm[el.member]=[])).push((el.meta&&el.meta.label)||'Cope');}}
|
|
7073
|
+
const cm={},pb={};const sc=j.scene||{};sc.elements=Array.isArray(sc.elements)?sc.elements:[];for(const el of sc.elements){if(!el)continue;if(el.id)pb[el.id]=el;if(el.kind==='cut'&&el.member){(cm[el.member]||(cm[el.member]=[])).push((el.meta&&el.meta.label)||'Cope');}}
|
|
6962
7074
|
// Slice 4: append placed detail images as CLIENT-SIDE scene elements (kind:'image'), resolving each
|
|
6963
7075
|
// placement's detailName → custom_details base64 in the browser. The server's contract-to-scene never
|
|
6964
7076
|
// emits these, so they stay out of the reconstructed scene / IFC / Tekla export and the baked lock.
|
|
@@ -7221,7 +7333,7 @@ const view3dApi={
|
|
|
7221
7333
|
// Re-extrude the 3D model after a structural edit (keeps the camera where it is). Selection-only
|
|
7222
7334
|
// changes go through render()'s setSelection — only geometry mutations need a rebuild.
|
|
7223
7335
|
let pendingConnSel=null; // a just-baked connection whose parts exist only AFTER the next rebuild → select the whole thing there (a recognized base-plate import, whose part ids aren't known ahead of expansion)
|
|
7224
|
-
function sync3D(){if(view3d&&view3dReady&&window.Steel3DView){window.Steel3DView.rebuild(false).then(()=>{
|
|
7336
|
+
function sync3D(){invalidateConnectionDiagnostics();panel();if(view3d&&view3dReady&&window.Steel3DView){window.Steel3DView.rebuild(false).then(()=>{
|
|
7225
7337
|
if(pendingConnSel&&window.Steel3DView.selectWholeConn){const c=pendingConnSel;pendingConnSel=null;window.Steel3DView.selectWholeConn(c);} // whole-connection select (envelope + "Parametric — editable" inspector), same as a 3D click
|
|
7226
7338
|
else window.Steel3DView.setSelection(selIds);
|
|
7227
7339
|
build3DLegend();panel();}).catch(()=>{pendingConnSel=null;});}} // rebuild also refreshes the legend (an edit may add/remove a profile) + re-renders the inspector so a selection of just-created parts (e.g. a placed custom connection) resolves against the freshly-fetched partsById, not the pre-rebuild stale copy
|
|
@@ -9907,6 +10019,7 @@ if(canWriteModel()){
|
|
|
9907
10019
|
for(const _p of (C.plans||[]))sanitizePlanGrid(_p);
|
|
9908
10020
|
}
|
|
9909
10021
|
setPlan(C.active==null?0:C.active);
|
|
10022
|
+
invalidateConnectionDiagnostics(); // 2D asks the same server bake as 3D before it promises a connection will build
|
|
9910
10023
|
applyReadOnlyChrome(); // …after setPlan, so the controls it touches are the ones the render just wired
|
|
9911
10024
|
// ONE WORD FOR BOTH MODES. This said "Grid restored ✓" on a read-only document, on the premise that the
|
|
9912
10025
|
// grid is the only thing such a draft can hold — which review disproved (see RO_DRAFT_KEYS: the overlay
|
package/dist/web/workspaces.js
CHANGED
|
@@ -4059,6 +4059,7 @@
|
|
|
4059
4059
|
'grid-field-conflict': 'Grid and registration',
|
|
4060
4060
|
'grid-hidden-level-unioned': 'Grid and registration',
|
|
4061
4061
|
'grid-label-duplicate': 'Grid and registration',
|
|
4062
|
+
'grid-ends-propagated': 'Grid and registration',
|
|
4062
4063
|
'datum-ref-ambiguous': 'Grid and registration',
|
|
4063
4064
|
'datum-ref-unresolved': 'Grid and registration',
|
|
4064
4065
|
'datum-ref-malformed': 'Grid and registration',
|