feat(bearing): plan of a pair with block outline and overlaid drawing values (승인 2026-10-26)
- C4·C5 measured across the coping width (교각축 직각): the two coping edges at ±B/2 to the bearing centre. The former along-the-axis definition is replaced. - view/bearing-plan-svg.ts: the plan of one pair with the model's solplates and the block outline(s) (일체: one 2500 × 1200; 분리: two 1200 × 1200), and the drawing A/B overlaid as dashed outlines. - ② bearing card: 상세 보기 pair chips (①·⑥ …) and the overlay toggle. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
43a18182f3
commit
b3a62850ab
5 files changed
+168
-12
No files matched your search
+54
@@ -19,6 +19,7 @@ import { parseDrawingRows } from './core/drawing-import';
|
||||
import { groundElFor, parseGroundModel, strataRowsFor, type GroundModelFile } from './core/ground-model';
|
||||
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 { groundSectionSvg } from './view/ground-svg';
|
||||
import { parseBearingElevationTable, parseSolplateTable, readDxfTexts } from './core/dxf-table';
|
||||
import { columnDiameterIssues } from './core/column-check';
|
||||
@@ -1515,8 +1516,61 @@ function renderBearingBasis(wrap: HTMLDivElement, pier: Pier): void {
|
||||
* 받침 배치 (승인 2026-10-26, read-only): C4·C5 from the model (coping edge ↔ bearing centre, 교각축 방향) and the
|
||||
* eccentricity of each front–back pair (일체 allowed up to 100 mm, otherwise 분리 first).
|
||||
*/
|
||||
/** 상세 보기 pair shown in the plan, and whether the drawing values are overlaid (screen state only, 승인 2026-10-26). */
|
||||
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. */
|
||||
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;
|
||||
}
|
||||
|
||||
function renderBearingLayout(wrap: HTMLDivElement, pier: Pier): void {
|
||||
if (!pier.model) return;
|
||||
// 상세 보기 (승인 2026-10-26): pair chips (①·⑥ …) and the plan with the drawing values overlaid as dashed outlines.
|
||||
const pairList = pairEccentricities(pier.model.blocks);
|
||||
if (bearingPairIndex >= pairList.length) bearingPairIndex = 0;
|
||||
wrap.appendChild(el('p', '상세 보기 (전열 · 후열 쌍)', 'lbl'));
|
||||
const chips = el('div', undefined, 'opts');
|
||||
pairList.forEach((p, i) => {
|
||||
const chip = el('button', `${PAIR_CHIP_LABELS[p.frontNo - 1] ?? p.frontNo}·${PAIR_CHIP_LABELS[p.backNo - 1] ?? p.backNo}`, 'btn small');
|
||||
chip.type = 'button';
|
||||
chip.setAttribute('aria-pressed', String(i === bearingPairIndex));
|
||||
chip.addEventListener('click', () => {
|
||||
bearingPairIndex = i;
|
||||
renderAll();
|
||||
});
|
||||
chips.appendChild(chip);
|
||||
});
|
||||
wrap.appendChild(chips);
|
||||
const overlayCheck = el('input');
|
||||
overlayCheck.type = 'checkbox';
|
||||
overlayCheck.checked = bearingOverlayOn;
|
||||
overlayCheck.id = 'bearing-overlay';
|
||||
overlayCheck.addEventListener('change', () => {
|
||||
bearingOverlayOn = overlayCheck.checked;
|
||||
renderAll();
|
||||
});
|
||||
const overlayLabel = el('label', ' 도면값 겹쳐 보기 (점선)');
|
||||
overlayLabel.prepend(overlayCheck);
|
||||
wrap.appendChild(overlayLabel);
|
||||
const current = pairList[bearingPairIndex];
|
||||
if (current) {
|
||||
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'));
|
||||
wrap.appendChild(fig);
|
||||
}
|
||||
wrap.appendChild(el('p', `배치 규칙 (모델값 · 편심 한계 ${PAIR_ECCENTRICITY_LIMIT_MM} mm)`, 'lbl'));
|
||||
const edges = bearingEdgeDistances(pier.model);
|
||||
const table = el('table', undefined, 'grid-table rebar-table');
|
||||
|
||||
Reference in new issue
Block a user