feat(bearing): section and solplate detail drawings with the drawing values overlaid (승인 2026-10-26)

- view/bearing-section-svg.ts: the pair's elevation — blocks (일체: one stepped
  outline), mortar, bearing body and solplate per bearing from the model; the
  drawing heights overlaid dashed. EL.X at the mortar top, E = h1 + h2 + h3 + h4.
- view/solplate-svg.ts: per bearing, the plan L × W and the taper T1 · T2
  (S %), with the drawing values dashed.
- ② bearing card: section figure and the two solplate figures under the plan.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-10-26 12:33:05 +09:00
1 parent 0708aa1354
commit 0b847e7547
4 files changed
+217 -12

No files matched your search

+44 -12
View File
@@ -20,6 +20,8 @@ import { groundElFor, parseGroundModel, strataRowsFor, type GroundModelFile } fr
import { CORROSION_ALLOWANCE_MM, parseNValue, SEA_DATUM, STRATA_NAMES } from './core/ground';
import { bearingEdgeDistances, integratedCheck, PAIR_ECCENTRICITY_LIMIT_MM, pairEccentricities } from './core/bearing-layout';
import { bearingPlanSvg, type BearingPlanOverlay, PAIR_CHIP_LABELS } from './view/bearing-plan-svg';
import { bearingSectionSvg, type BearingDrawingRef } from './view/bearing-section-svg';
import { solplateDetailSvg, type SolplateDrawingRef } from './view/solplate-svg';
import { groundSectionSvg } from './view/ground-svg';
import { parseBearingElevationTable, parseSolplateTable, readDxfTexts } from './core/dxf-table';
import { columnDiameterIssues } from './core/column-check';
@@ -1520,18 +1522,30 @@ function renderBearingBasis(wrap: HTMLDivElement, pier: Pier): void {
let bearingPairIndex = 0;
let bearingOverlayOn = true;
/** Drawing A, B of the front and back bearings of a pair: the imported drawing rows if any, else the reference table. */
/**
* Drawing values of one bearing for the overlays (승인 2026-10-26): the imported drawing row where it has the value
* (elx, h1, h2, A, B), otherwise the reference table (h3, h4, E).
*/
function drawingRefFor(pier: Pier, no: number): BearingDrawingRef | undefined {
const r = BEARING_ELEVATION_REF.find((x) => x.no === no);
if (!r) return undefined;
const d = (bearingDrawing[pier.input.name] ?? []).find((x) => x.no === no);
const A = d?.A ?? r.A;
const B = d?.B ?? r.B;
return { elx: d?.elx ?? r.elx, h1: d?.h1 ?? r.h1, h2: d?.h2 ?? r.h2, h3: r.h3, h4: r.h4, E: r.E, A, B };
}
/** Drawing A, B of the front and back bearings of a pair, for the plan overlay. */
function overlayFor(pier: Pier, frontNo: number, backNo: number): BearingPlanOverlay | undefined {
const rows = bearingDrawing[pier.input.name] ?? [];
const pick = (no: number) => {
const d = rows.find((r) => r.no === no);
if (d?.A !== undefined && d?.B !== undefined) return { A: d.A, B: d.B };
const r = BEARING_ELEVATION_REF.find((x) => x.no === no);
return r ? { A: r.A, B: r.B } : undefined;
};
const f = pick(frontNo);
const b = pick(backNo);
return f && b ? { front: f, back: b } : undefined;
const f = drawingRefFor(pier, frontNo);
const b = drawingRefFor(pier, backNo);
return f && b ? { front: { A: f.A, B: f.B }, back: { A: b.A, B: b.B } } : undefined;
}
/** Drawing solplate values of one bearing (reference table), for the solplate detail overlay. */
function solplateRefFor(no: number): SolplateDrawingRef | undefined {
const r = SOLPLATE_REF.find((x) => x.no === no);
return r ? { L: r.L, W: r.W, T1: r.T1, T2: r.T2, S: r.s } : undefined;
}
function renderBearingLayout(wrap: HTMLDivElement, pier: Pier): void {
@@ -1568,8 +1582,26 @@ function renderBearingLayout(wrap: HTMLDivElement, pier: Pier): void {
const fig = el('figure', undefined, 'ground-fig');
const overlay = bearingOverlayOn ? overlayFor(pier, current.frontNo, current.backNo) : undefined;
fig.innerHTML = bearingPlanSvg(pier.model, bearingPairIndex, overlay);
fig.appendChild(el('figcaption', '평면 · 실선 = 모델(솔플레이트, 블록 윤곽) · 점선 = 도면값 · C4·C5는 교각축 직각 방향 코핑 가장자리에서 받침까지', 'muted small'));
fig.appendChild(el('figcaption', '평면 · 실선 = 모델(솔플레이트, 블록 윤곽) · 점선 = 도면값 · C4·C5는 교축 방향, 받침 중심에서 블록 바깥 연단까지', 'muted small'));
wrap.appendChild(fig);
// 단면 (elevation): the blocks, mortar, bearing body and solplates; the drawing heights dashed.
const section = el('figure', undefined, 'ground-fig');
const refs = bearingOverlayOn ? { front: drawingRefFor(pier, current.frontNo), back: drawingRefFor(pier, current.backNo) } : undefined;
section.innerHTML = bearingSectionSvg(pier.model, bearingPairIndex, refs);
section.appendChild(el('figcaption', '단면 · EL.X는 모르타르 상단, E = h1 + h2 + h3 + h4 · 점선 = 도면 높이', 'muted small'));
wrap.appendChild(section);
// 솔플레이트 상세 for the two bearings of the pair (plan and taper, drawing dashed).
const solGrid = el('div', undefined, 'footing-grid');
for (const no of [current.frontNo, current.backNo]) {
const block = pier.model.blocks.find((b) => b.no === no)!;
const fig2 = el('figure', undefined, 'footing-fig');
fig2.innerHTML = solplateDetailSvg(block, bearingOverlayOn ? solplateRefFor(no) : undefined);
fig2.appendChild(el('figcaption', `솔플레이트 상세 · ${no}번 · 두께 과장 · 점선 = 도면값`, 'muted small'));
solGrid.appendChild(fig2);
}
wrap.appendChild(solGrid);
}
wrap.appendChild(el('p', `배치 규칙 (모델값 · 편심 한계 ${PAIR_ECCENTRICITY_LIMIT_MM} mm)`, 'lbl'));
const edges = bearingEdgeDistances(pier.model);