@floless/app 0.133.0 → 0.133.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 +21 -19
- package/dist/web/aware.js +1 -1
- package/dist/web/steel-3d-core.js +9 -11
- package/dist/web/steel-catalog-picker.js +96 -5
- package/dist/web/steel-editor.html +19 -10
- package/package.json +1 -1
package/dist/floless-server.cjs
CHANGED
|
@@ -54505,7 +54505,7 @@ var REMEDIATION = {
|
|
|
54505
54505
|
"no-node": "AWARE needs Node.js 20+. Install it from https://nodejs.org and relaunch floless.app.",
|
|
54506
54506
|
"no-npm": "npm was not found. Install Node.js 20+ (which includes npm) from https://nodejs.org, then relaunch.",
|
|
54507
54507
|
"absent-and-skipped": "AWARE_SKIP_BOOTSTRAP is set but AWARE is not installed. Run: npm i -g @aware-aeco/cli",
|
|
54508
|
-
"aware-version-required": "The installed AWARE is older than this FloLess release requires. Install AWARE 0.
|
|
54508
|
+
"aware-version-required": "The installed AWARE is older than this FloLess release requires. Install AWARE 0.126.0 or newer, then relaunch: npm i -g @aware-aeco/cli",
|
|
54509
54509
|
// Supplementary to the UI's own copy (which the overlay shows above it), so it says
|
|
54510
54510
|
// what was actually attempted rather than paraphrasing "we couldn't check".
|
|
54511
54511
|
"toolchain-unverified": "The PATH lookup for Node.js/npm did not complete \u2014 it timed out or could not be spawned, so nothing was proven missing. Usually a busy machine rather than a broken install: use Try again, and relaunch FloLess if it persists.",
|
|
@@ -55037,7 +55037,7 @@ function appVersion() {
|
|
|
55037
55037
|
return resolveVersion({
|
|
55038
55038
|
isSea: isSea2(),
|
|
55039
55039
|
sqVersionXml: readSqVersionXml(),
|
|
55040
|
-
define: true ? "0.133.
|
|
55040
|
+
define: true ? "0.133.1" : void 0,
|
|
55041
55041
|
pkgVersion: readPkgVersion()
|
|
55042
55042
|
});
|
|
55043
55043
|
}
|
|
@@ -55053,7 +55053,7 @@ function resolveChannel(s) {
|
|
|
55053
55053
|
function appChannel() {
|
|
55054
55054
|
return resolveChannel({
|
|
55055
55055
|
isSea: isSea2(),
|
|
55056
|
-
define: true ? "0.133.
|
|
55056
|
+
define: true ? "0.133.1" : void 0,
|
|
55057
55057
|
// argv[1] is the entry the runtime actually loaded (…/dist/floless-server.cjs), which is what
|
|
55058
55058
|
// carries the npx cache prefix. Absent under the SEA exe, which never reaches the npx branch.
|
|
55059
55059
|
modulePath: process.argv[1]
|
|
@@ -55771,22 +55771,18 @@ function sectionTopology(displaySection, w, d, fallbackKind = "BOX") {
|
|
|
55771
55771
|
return [component(polygon([[-hw, hd], [hw, hd], [hw, hd - tf], [tw / 2, hd - tf], [tw / 2, -hd], [-tw / 2, -hd], [-tw / 2, hd - tf], [-hw, hd - tf]]))];
|
|
55772
55772
|
}
|
|
55773
55773
|
if (xs?.shape === "double-angle") {
|
|
55774
|
-
const longBack = String(xs.orientation).toLowerCase() !== "slbb";
|
|
55775
55774
|
const legDepth = Number(xs.d);
|
|
55776
55775
|
const legWidth = Number(xs.b);
|
|
55777
55776
|
const t = Math.min(Number(xs.t), legDepth, legWidth);
|
|
55778
55777
|
const gap = Math.max(Number(xs.gap) || 0, 0);
|
|
55779
55778
|
if (!(legDepth > 0 && legWidth > 0 && t > 0)) return [];
|
|
55780
|
-
const
|
|
55781
|
-
|
|
55782
|
-
|
|
55783
|
-
|
|
55784
|
-
|
|
55785
|
-
|
|
55786
|
-
|
|
55787
|
-
const lower = [[-hw, -hd], [-hw + t, -hd], [-hw + t, -hg - t], [hw, -hg - t], [hw, -hg], [-hw, -hg]];
|
|
55788
|
-
const upper = [[hw, hd], [hw - t, hd], [hw - t, hg + t], [-hw, hg + t], [-hw, hg], [hw, hg]];
|
|
55789
|
-
return [component(polygon(lower)), component(polygon(upper))];
|
|
55779
|
+
const shortBack = String(xs.orientation).toLowerCase() === "slbb";
|
|
55780
|
+
const backDepth = shortBack ? legWidth : legDepth;
|
|
55781
|
+
const outstandingWidth = shortBack ? legDepth : legWidth;
|
|
55782
|
+
const hd = backDepth / 2, hg = gap / 2;
|
|
55783
|
+
const left = [[-hg - outstandingWidth, hd - t], [-hg - t, hd - t], [-hg - t, -hd], [-hg, -hd], [-hg, hd], [-hg - outstandingWidth, hd]];
|
|
55784
|
+
const right = [[hg, -hd], [hg + t, -hd], [hg + t, hd - t], [hg + outstandingWidth, hd - t], [hg + outstandingWidth, hd], [hg, hd]];
|
|
55785
|
+
return [component(polygon(left)), component(polygon(right))];
|
|
55790
55786
|
}
|
|
55791
55787
|
const shapeKind = xs?.shape === "i" ? "I" : xs?.shape === "channel" ? "C" : xs?.shape === "angle" ? "L" : xs?.shape === "rhs" ? "TUBE" : fallbackKind;
|
|
55792
55788
|
const outlined = sectionOutlinePts(shapeKind, w, d, {
|
|
@@ -60557,9 +60553,15 @@ function aiscShapesPayload() {
|
|
|
60557
60553
|
function parseDim(tok) {
|
|
60558
60554
|
const s = tok.trim();
|
|
60559
60555
|
let m = s.match(/^(\d+)(?:\s+|-)(\d+)\/(\d+)$/);
|
|
60560
|
-
if (m)
|
|
60556
|
+
if (m) {
|
|
60557
|
+
const denominator = Number(m[3]);
|
|
60558
|
+
return denominator > 0 ? Number(m[1]) + Number(m[2]) / denominator : null;
|
|
60559
|
+
}
|
|
60561
60560
|
m = s.match(/^(\d+)\/(\d+)$/);
|
|
60562
|
-
if (m)
|
|
60561
|
+
if (m) {
|
|
60562
|
+
const denominator = Number(m[2]);
|
|
60563
|
+
return denominator > 0 ? Number(m[1]) / denominator : null;
|
|
60564
|
+
}
|
|
60563
60565
|
const d = Number.parseFloat(s);
|
|
60564
60566
|
return Number.isFinite(d) ? d : null;
|
|
60565
60567
|
}
|
|
@@ -67177,7 +67179,7 @@ function profileDimsIn(profile) {
|
|
|
67177
67179
|
case "solid-circle":
|
|
67178
67180
|
return { d: display.diameter / IN_TO_MM2, w: display.diameter / IN_TO_MM2, approx: false, round: true };
|
|
67179
67181
|
case "double-angle": {
|
|
67180
|
-
return display.orientation === "slbb" ? { d: (2 * display.d + display.gap) / IN_TO_MM2,
|
|
67182
|
+
return display.orientation === "slbb" ? { d: display.b / IN_TO_MM2, w: (2 * display.d + display.gap) / IN_TO_MM2, approx: false, round: false } : { d: display.d / IN_TO_MM2, w: (2 * display.b + display.gap) / IN_TO_MM2, approx: false, round: false };
|
|
67181
67183
|
}
|
|
67182
67184
|
case "joist":
|
|
67183
67185
|
case "unsupported-custom":
|
|
@@ -67187,7 +67189,7 @@ function profileDimsIn(profile) {
|
|
|
67187
67189
|
}
|
|
67188
67190
|
const pair = parseDoubleAngle(p);
|
|
67189
67191
|
if (pair) {
|
|
67190
|
-
return pair.orientation === "SLBB" ? { d: 2 * pair.legA + pair.gap,
|
|
67192
|
+
return pair.orientation === "SLBB" ? { d: pair.legB, w: 2 * pair.legA + pair.gap, approx: false, round: false } : { d: pair.legA, w: 2 * pair.legB + pair.gap, approx: false, round: false };
|
|
67191
67193
|
}
|
|
67192
67194
|
const tabulated = sectionDimsIn(p);
|
|
67193
67195
|
if (/^RE#/.test(p) && tabulated) return { d: tabulated.d, w: tabulated.bf, approx: false, round: true };
|
|
@@ -83898,7 +83900,7 @@ function isExportCompanionId(id) {
|
|
|
83898
83900
|
}
|
|
83899
83901
|
|
|
83900
83902
|
// tekla-readiness.ts
|
|
83901
|
-
var TEKLA_AWARE_FLOOR = "0.
|
|
83903
|
+
var TEKLA_AWARE_FLOOR = "0.126.0";
|
|
83902
83904
|
var DEFAULT_DEPS = {
|
|
83903
83905
|
npmVersion: () => aware.npmVersion(),
|
|
83904
83906
|
bridgeStatus: () => aware.teklaBridgeStatus(),
|
package/dist/web/aware.js
CHANGED
|
@@ -6604,7 +6604,7 @@
|
|
|
6604
6604
|
// have is the exact bug this reason exists to prevent.
|
|
6605
6605
|
return "Couldn't check whether Node.js is installed — the check didn't finish, which usually means the machine was busy. Nothing is necessarily missing; try again.";
|
|
6606
6606
|
case 'aware-version-required':
|
|
6607
|
-
return 'This FloLess release needs AWARE 0.
|
|
6607
|
+
return 'This FloLess release needs AWARE 0.126.0 or newer. Update AWARE, then try again.';
|
|
6608
6608
|
case 'offline':
|
|
6609
6609
|
return 'No network connection was detected. Connect to the internet, then try again.';
|
|
6610
6610
|
case 'smoke-failed':
|
|
@@ -470,22 +470,20 @@ export function sectionTopology(displaySection, w, d, fallbackKind = 'BOX') {
|
|
|
470
470
|
return [component(polygon([[-hw, hd], [hw, hd], [hw, hd - tf], [tw / 2, hd - tf], [tw / 2, -hd], [-tw / 2, -hd], [-tw / 2, hd - tf], [-hw, hd - tf]]))];
|
|
471
471
|
}
|
|
472
472
|
if (xs?.shape === 'double-angle') {
|
|
473
|
-
const longBack = String(xs.orientation).toLowerCase() !== 'slbb';
|
|
474
473
|
const legDepth = Number(xs.d);
|
|
475
474
|
const legWidth = Number(xs.b);
|
|
476
475
|
const t = Math.min(Number(xs.t), legDepth, legWidth);
|
|
477
476
|
const gap = Math.max(Number(xs.gap) || 0, 0);
|
|
478
477
|
if (!(legDepth > 0 && legWidth > 0 && t > 0)) return [];
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
const
|
|
486
|
-
const
|
|
487
|
-
|
|
488
|
-
return [component(polygon(lower)), component(polygon(upper))];
|
|
478
|
+
// Both AISC orientations are a side-by-side mirrored pair. The suffix chooses WHICH designation
|
|
479
|
+
// leg forms the adjacent vertical backs; it does not rotate one pair into a vertical stack.
|
|
480
|
+
const shortBack = String(xs.orientation).toLowerCase() === 'slbb';
|
|
481
|
+
const backDepth = shortBack ? legWidth : legDepth;
|
|
482
|
+
const outstandingWidth = shortBack ? legDepth : legWidth;
|
|
483
|
+
const hd = backDepth / 2, hg = gap / 2;
|
|
484
|
+
const left = [[-hg - outstandingWidth, hd - t], [-hg - t, hd - t], [-hg - t, -hd], [-hg, -hd], [-hg, hd], [-hg - outstandingWidth, hd]];
|
|
485
|
+
const right = [[hg, -hd], [hg + t, -hd], [hg + t, hd - t], [hg + outstandingWidth, hd - t], [hg + outstandingWidth, hd], [hg, hd]];
|
|
486
|
+
return [component(polygon(left)), component(polygon(right))];
|
|
489
487
|
}
|
|
490
488
|
|
|
491
489
|
const shapeKind = xs?.shape === 'i' ? 'I'
|
|
@@ -176,27 +176,118 @@ function ensureStyles(doc) {
|
|
|
176
176
|
doc.head.appendChild(style);
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
function
|
|
180
|
-
const
|
|
179
|
+
function parseCatalogDimension(token) {
|
|
180
|
+
const value = String(token || '').trim();
|
|
181
|
+
let match = /^(\d+)(?:\s+|-)(\d+)\/(\d+)$/.exec(value);
|
|
182
|
+
if (match) {
|
|
183
|
+
const denominator = Number(match[3]);
|
|
184
|
+
return denominator > 0 ? Number(match[1]) + Number(match[2]) / denominator : null;
|
|
185
|
+
}
|
|
186
|
+
match = /^(\d+)\/(\d+)$/.exec(value);
|
|
187
|
+
if (match) {
|
|
188
|
+
const denominator = Number(match[2]);
|
|
189
|
+
return denominator > 0 ? Number(match[1]) / denominator : null;
|
|
190
|
+
}
|
|
191
|
+
return /^\d+(?:\.\d+)?$/.test(value) ? Number(value) : null;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export function parseDoubleAngleDesignation(designation) {
|
|
195
|
+
// Preserve mixed-fraction boundaries before the generic search normalizer removes whitespace.
|
|
196
|
+
// Without this, `2 1/2` becomes `21/2` and silently reads as 10.5 inches.
|
|
197
|
+
const fractionSafe = String(designation == null ? '' : designation)
|
|
198
|
+
.replace(/\u00a0/g, ' ')
|
|
199
|
+
.replace(/(\d)\s+(\d+\/\d+)/g, '$1-$2');
|
|
200
|
+
let key = normalizeCatalogText(fractionSafe);
|
|
201
|
+
if (!key.startsWith('2L')) return null;
|
|
202
|
+
key = key.slice(2);
|
|
203
|
+
const suffix = /(LLBB|SLBB)$/.exec(key);
|
|
204
|
+
const orientation = suffix ? suffix[1].toLowerCase() : null;
|
|
205
|
+
if (suffix) key = key.slice(0, -suffix[1].length);
|
|
206
|
+
const tokens = key.split('X');
|
|
207
|
+
if (tokens.length !== 3 && tokens.length !== 4) return null;
|
|
208
|
+
const values = tokens.map(parseCatalogDimension);
|
|
209
|
+
if (values.slice(0, 3).some((value) => value == null || value <= 0)) return null;
|
|
210
|
+
const gap = tokens.length === 4 ? values[3] : 0;
|
|
211
|
+
if (gap == null || (tokens.length === 4 && gap <= 0) || (!orientation && Math.abs(values[0] - values[1]) > 1e-9)) return null;
|
|
212
|
+
return { legA: values[0], legB: values[1], thickness: values[2], gap, orientation: orientation || 'llbb' };
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
function formatImperialInches(value) {
|
|
216
|
+
if (!Number.isFinite(value) || value < 0) return null;
|
|
217
|
+
const denominator = 64;
|
|
218
|
+
const scaled = value * denominator;
|
|
219
|
+
// Catalog fractions are rendered conventionally, but a valid decimal custom designation must
|
|
220
|
+
// remain exact rather than being silently rounded to the nearest 1/64 inch.
|
|
221
|
+
if (Math.abs(scaled - Math.round(scaled)) > 1e-9) return `${Number(value.toFixed(9))}\"`;
|
|
222
|
+
const rounded = Math.round(scaled);
|
|
223
|
+
const whole = Math.floor(rounded / denominator);
|
|
224
|
+
let numerator = rounded % denominator;
|
|
225
|
+
if (!numerator) return `${whole}\"`;
|
|
226
|
+
let divisor = numerator;
|
|
227
|
+
let other = denominator;
|
|
228
|
+
while (other) [divisor, other] = [other, divisor % other];
|
|
229
|
+
numerator /= divisor;
|
|
230
|
+
const reducedDenominator = denominator / divisor;
|
|
231
|
+
return `${whole ? `${whole} ` : ''}${numerator}/${reducedDenominator}\"`;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
function n(value) { return Number(value.toFixed(3)); }
|
|
235
|
+
|
|
236
|
+
function doubleAngleSchematic(spec) {
|
|
237
|
+
const shortBack = spec.orientation === 'slbb';
|
|
238
|
+
const back = shortBack ? spec.legB : spec.legA;
|
|
239
|
+
const outstanding = shortBack ? spec.legA : spec.legB;
|
|
240
|
+
const fullWidth = 2 * outstanding + spec.gap;
|
|
241
|
+
const scale = Math.min(68 / fullWidth, 68 / back);
|
|
242
|
+
const halfBack = back * scale / 2;
|
|
243
|
+
const halfGap = spec.gap * scale / 2;
|
|
244
|
+
const out = outstanding * scale;
|
|
245
|
+
const thickness = Math.max(2.5, Math.min(spec.thickness * scale, halfBack * 2, out));
|
|
246
|
+
const cx = 50, cy = 50;
|
|
247
|
+
const left = [
|
|
248
|
+
[cx-halfGap-out,cy-halfBack],[cx-halfGap,cy-halfBack],[cx-halfGap,cy+halfBack],
|
|
249
|
+
[cx-halfGap-thickness,cy+halfBack],[cx-halfGap-thickness,cy-halfBack+thickness],[cx-halfGap-out,cy-halfBack+thickness],
|
|
250
|
+
];
|
|
251
|
+
const right = [
|
|
252
|
+
[cx+halfGap,cy-halfBack],[cx+halfGap+out,cy-halfBack],[cx+halfGap+out,cy-halfBack+thickness],
|
|
253
|
+
[cx+halfGap+thickness,cy-halfBack+thickness],[cx+halfGap+thickness,cy+halfBack],[cx+halfGap,cy+halfBack],
|
|
254
|
+
];
|
|
255
|
+
const path = (points) => points.map(([x, y], index) => `${index ? 'L' : 'M'}${n(x)} ${n(y)}`).join('') + 'Z';
|
|
256
|
+
return `<svg viewBox="0 0 100 100" aria-hidden="true" data-back-leg="${back}" data-outstanding-leg="${outstanding}"><path d="${path(left)}" fill="currentColor"/><path d="${path(right)}" fill="currentColor"/></svg>`;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export function profileSchematic(row) { return schematic(row); }
|
|
260
|
+
|
|
261
|
+
function schematic(row) {
|
|
262
|
+
const f = String(row?.family || '').toUpperCase();
|
|
263
|
+
const doubleAngle = parseDoubleAngleDesignation(row?.designation);
|
|
264
|
+
if (doubleAngle) return doubleAngleSchematic(doubleAngle);
|
|
181
265
|
const common = 'fill="none" stroke="currentColor" stroke-width="7" stroke-linejoin="round" stroke-linecap="round"';
|
|
182
266
|
if (f === 'HSS') return `<svg viewBox="0 0 100 100" aria-hidden="true"><rect x="17" y="17" width="66" height="66" rx="4" ${common}/><rect x="31" y="31" width="38" height="38" rx="2" ${common}/></svg>`;
|
|
183
267
|
if (f === 'PIPE' || f === 'CHS') return `<svg viewBox="0 0 100 100" aria-hidden="true"><circle cx="50" cy="50" r="34" ${common}/><circle cx="50" cy="50" r="21" ${common}/></svg>`;
|
|
184
268
|
if (f === 'RE') return `<svg viewBox="0 0 100 100" aria-hidden="true"><circle cx="50" cy="50" r="31" fill="currentColor"/><path d="M28 40L72 60M28 60L72 40" fill="none" stroke="var(--panel)" stroke-width="4" stroke-linecap="round"/></svg>`;
|
|
185
269
|
if (f === 'L') return `<svg viewBox="0 0 100 100" aria-hidden="true"><path d="M25 18V78H82" ${common}/></svg>`;
|
|
186
|
-
if (f === '2L') return
|
|
270
|
+
if (f === '2L') return '';
|
|
187
271
|
if (f === 'C' || f === 'MC') return `<svg viewBox="0 0 100 100" aria-hidden="true"><path d="M76 20H30V80H76" ${common}/></svg>`;
|
|
188
272
|
if (f === 'WT' || f === 'MT' || f === 'ST') return `<svg viewBox="0 0 100 100" aria-hidden="true"><path d="M18 24H82M50 24V82" ${common}/></svg>`;
|
|
189
273
|
if (f === 'W' || f === 'M' || f === 'S' || f === 'HP') return `<svg viewBox="0 0 100 100" aria-hidden="true"><path d="M18 20H82M50 20V80M18 80H82" ${common}/></svg>`;
|
|
190
274
|
return '';
|
|
191
275
|
}
|
|
192
276
|
|
|
193
|
-
function
|
|
277
|
+
export function profileFacts(row) {
|
|
194
278
|
const facts = [];
|
|
195
279
|
if (row.depth != null) facts.push(['Depth', `${row.depth}"`]);
|
|
196
280
|
if (row.width != null) facts.push(['Width', `${row.width}"`]);
|
|
197
281
|
if (row.web != null) facts.push(['Web / wall', `${row.web}"`]);
|
|
198
282
|
if (row.flange != null) facts.push(['Flange', `${row.flange}"`]);
|
|
283
|
+
const pair = parseDoubleAngleDesignation(row.designation);
|
|
284
|
+
if (pair) facts.push(['Gap', formatImperialInches(pair.gap)]);
|
|
199
285
|
if (row.weight != null) facts.push(['Weight', `${row.weight} lb/ft`]);
|
|
286
|
+
return facts;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
function factsHtml(row) {
|
|
290
|
+
const facts = profileFacts(row);
|
|
200
291
|
return facts.length
|
|
201
292
|
? `<dl class=scp-facts>${facts.map(([k, v]) => `<dt>${esc(k)}</dt><dd>${esc(v)}</dd>`).join('')}</dl>`
|
|
202
293
|
: '<div class=scp-note>Section dimensions and weight are unavailable for this catalog entry.</div>';
|
|
@@ -411,7 +502,7 @@ export function createCatalogPicker({ kind, catalog, rows, onRetry, document: do
|
|
|
411
502
|
+ `<div class=scp-custom><label for=${modal.id}Custom>Custom material designation</label><div class=row><input data-command-id="steel.catalog-custom#material" id=${modal.id}Custom value="${selected.custom ? esc(selected.value) : ''}" placeholder="e.g. A913-GR.65" autocomplete=off><button data-command-id="steel.catalog-use-custom#material" class=scp-use-custom>Use</button></div></div>`;
|
|
412
503
|
} else {
|
|
413
504
|
const supported = selected.geometrySupported !== false;
|
|
414
|
-
const preview = supported ? schematic(selected
|
|
505
|
+
const preview = supported ? schematic(selected) : '';
|
|
415
506
|
details.innerHTML = `<div class=scp-preview>${preview || '<div class=scp-note>Section preview unavailable for this catalog entry.</div>'}</div><div class=scp-detail-name>${esc(selected.designation)}</div><div class=scp-detail-sub>${selected.current ? 'Current model value · not in this catalog' : esc((catalog?.families || []).find((g) => g.id === selected.family)?.label || selected.family)}</div>${factsHtml(selected)}`
|
|
416
507
|
+ ((selected.aliases || []).length ? `<div class=scp-note style="margin-top:10px">Related catalog names: ${esc(selected.aliases.join(', '))}</div>` : '')
|
|
417
508
|
+ (!supported ? '<div class=scp-warning>This catalog record includes envelope and weight, but not chord or web geometry, so FloLess cannot model this joist faithfully.</div>' : '')
|
|
@@ -4363,13 +4363,21 @@ function _canonDes(s){return String(s==null?'':s).trim().toUpperCase()
|
|
|
4363
4363
|
.replace(/[×✕✖]/g,'X').replace(/[‐-―−]/g,'-').replace(/[‘’ʹ′]/g,"'").replace(/[“”ʺ″]/g,'"')
|
|
4364
4364
|
.replace(/ /g,' ').replace(/(\d)\s+(\d+\/\d+)/g,'$1-$2').replace(/\s+/g,'');}
|
|
4365
4365
|
function _aiscSec(key){return (window.__AISC_SECTIONS||{})[key];}
|
|
4366
|
+
function _profileDimIn(token){
|
|
4367
|
+
const s=String(token).trim();
|
|
4368
|
+
let m=s.match(/^(\d+)(?:\s+|-)(\d+)\/(\d+)$/);
|
|
4369
|
+
if(m){const den=Number(m[3]);if(den===0)return null;const value=Number(m[1])+Number(m[2])/den;return Number.isFinite(value)?value:null;}
|
|
4370
|
+
m=s.match(/^(\d+)\/(\d+)$/);
|
|
4371
|
+
if(m){const den=Number(m[2]);if(den===0)return null;const value=Number(m[1])/den;return Number.isFinite(value)?value:null;}
|
|
4372
|
+
if(!/^\d+(?:\.\d+)?$/.test(s))return null;
|
|
4373
|
+
const value=Number(s);return Number.isFinite(value)?value:null;
|
|
4374
|
+
}
|
|
4366
4375
|
function _parseDoubleAngleIn(profile){
|
|
4367
4376
|
const p=_canonDes(profile);if(!p.startsWith('2L'))return null;
|
|
4368
4377
|
const orientation=p.endsWith('SLBB')?'slbb':p.endsWith('LLBB')?'llbb':null;
|
|
4369
4378
|
const body=p.slice(2).replace(/(LLBB|SLBB)$/,'');
|
|
4370
|
-
const pd=t=>{const s=String(t).trim();if(!/^(?:\d+(?:\.\d+)?|\d+(?:\s+|-)\d+\/\d+|\d+\/\d+)$/.test(s))return null;let mm=s.match(/^(\d+)(?:\s+|-)(\d+)\/(\d+)$/);if(mm)return +mm[1]+ +mm[2]/+mm[3];mm=s.match(/^(\d+)\/(\d+)$/);if(mm)return +mm[1]/+mm[2];const d=Number(s);return isFinite(d)?d:null;};
|
|
4371
4379
|
const toks=body.split('X');if(toks.length!==3&&toks.length!==4)return null;
|
|
4372
|
-
const v=toks.map(
|
|
4380
|
+
const v=toks.map(_profileDimIn);if(v.some(n=>n==null||n<=0)||(!orientation&&Math.abs(v[0]-v[1])>1e-9))return null;
|
|
4373
4381
|
return{d:v[0],b:v[1],t:v[2],gap:toks.length===4?v[3]:0,orientation:orientation||'llbb'};
|
|
4374
4382
|
}
|
|
4375
4383
|
function _profileCatalogRow(profile){return CatalogPicker.resolveProfileCatalogRow(profileCatalogRows,profile);}
|
|
@@ -4389,7 +4397,7 @@ function profileDimsIn(profile){
|
|
|
4389
4397
|
const display=_profileDisplaySectionIn(profile);
|
|
4390
4398
|
if(display&&display.shape==='double-angle'){
|
|
4391
4399
|
return display.orientation==='slbb'
|
|
4392
|
-
?{d:2*display.d+display.gap,
|
|
4400
|
+
?{d:display.b,w:2*display.d+display.gap,round:false}
|
|
4393
4401
|
:{d:display.d,w:2*display.b+display.gap,round:false};
|
|
4394
4402
|
}
|
|
4395
4403
|
if(display&&display.shape==='solid-circle')return{d:display.diameter,w:display.diameter,round:true};
|
|
@@ -4398,8 +4406,11 @@ function profileDimsIn(profile){
|
|
|
4398
4406
|
const m=p.match(/^([A-Z]+)\s*(.+)$/);if(!m)return null;
|
|
4399
4407
|
// parseDim (not parseFloat) so a mixed-fraction leg "3 1/2" or the Manual's "3-1/2" → 3.5, not 3 —
|
|
4400
4408
|
// mirrors server aisc-sections parseDim.
|
|
4401
|
-
const
|
|
4402
|
-
|
|
4409
|
+
const prefix=m[1],key=_canonDes(profile);
|
|
4410
|
+
// Scheduled PIPE names end in STD/XS/XXS rather than a numeric diameter token. Resolve their
|
|
4411
|
+
// table-backed outside diameter before the strict numeric-token guard below; NPS is not the OD.
|
|
4412
|
+
if(prefix==='PIPE'){const sec=_aiscSec(key);if(sec)return{d:sec[0],w:sec[1],round:true};}
|
|
4413
|
+
const nums=m[2].split('X').map(_profileDimIn).filter(n=>n!=null);
|
|
4403
4414
|
if(!nums.length)return null;
|
|
4404
4415
|
// The TABLE answers first — the name is only as good as the glyphs it was typed with. `p` folds the
|
|
4405
4416
|
// multiplication sign but not the dash class, so an en-dashed "L5X3–1/2X1/4" (what OCR and vision
|
|
@@ -4413,7 +4424,7 @@ function profileDimsIn(profile){
|
|
|
4413
4424
|
// w x d implies — 41% too big across the corners. This mirror omitted it, so the 2D plan drew every pipe
|
|
4414
4425
|
// square while the bake measured a circle. Same token-count rule as the server: THREE tokens is a
|
|
4415
4426
|
// rectangular HSS/TUBE (above), TWO is a round one.
|
|
4416
|
-
if(prefix==='PIPE')
|
|
4427
|
+
if(prefix==='PIPE')return{d:nums[0],w:nums[0],round:true};
|
|
4417
4428
|
if(prefix==='HSS'){const dia=nums[0];return{d:dia,w:dia,round:true};}
|
|
4418
4429
|
if(/^(W|S|M|HP|C|MC|WT|ST|MT)$/.test(prefix)){
|
|
4419
4430
|
// ACTUAL AISC depth+width when tabulated (the leading number is the NOMINAL series depth). Mirrors
|
|
@@ -4471,16 +4482,14 @@ function profileThkIn(profile){
|
|
|
4471
4482
|
// LLBB/SLBB suffix is orientation. This is the same designation source used by server parseDoubleAngle.
|
|
4472
4483
|
if(p.startsWith('2L')){
|
|
4473
4484
|
const body=p.slice(2).replace(/(LLBB|SLBB)$/,'');
|
|
4474
|
-
const
|
|
4475
|
-
const toks=body.split('X').map(_pd);
|
|
4485
|
+
const toks=body.split('X').map(_profileDimIn);
|
|
4476
4486
|
return toks.length>=3&&toks[2]>0?{t:toks[2]}:null;
|
|
4477
4487
|
}
|
|
4478
4488
|
const m=p.match(/^([A-Z]+)\s*(.+)$/);if(!m)return null;
|
|
4479
4489
|
const prefix=m[1],sec=_aiscSec(_canonDes(profile));
|
|
4480
4490
|
// parseDim, not parseFloat: a fractional thickness token is the WHOLE point here, and parseFloat('3/8')
|
|
4481
4491
|
// is 3 — a 3" leg on a 4" angle. Same fold and same parse as profileDimsIn above.
|
|
4482
|
-
const
|
|
4483
|
-
const toks=m[2].split('X').map(_pd);
|
|
4492
|
+
const toks=m[2].split('X').map(_profileDimIn);
|
|
4484
4493
|
if(prefix==='L'){
|
|
4485
4494
|
return toks.length>=3&&toks[2]>0?{t:toks[2]}:null; // A×B×t
|
|
4486
4495
|
}
|