feat(rebar): plan view of the block rebar with the 단면/평면 switch (승인 2026-10-26)
- view/block-rebar-plan-svg.ts: the selected pair from above — S2 lines along the 교각축 (spaced at S2 across the 교축), S1 lines along the 교축 (spaced at S1), each end a dot (leg); the bar sets carry the row numbers only (S1, S2). - The ③ card switches between the C–C section and the plan. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
521979b437
commit
dd590b899c
3 files changed
+123
-2
No files matched your search
+19
-2
@@ -23,6 +23,7 @@ import { bearingPlanSvg, type BearingPlanOverlay, PAIR_CHIP_LABELS } from './vie
|
||||
import { bearingSectionSvg, type BearingDrawingRef } from './view/bearing-section-svg';
|
||||
import { solplateDetailSvg, type SolplateDrawingRef } from './view/solplate-svg';
|
||||
import { blockRebarSectionSvg } from './view/block-rebar-svg';
|
||||
import { blockRebarPlanSvg } from './view/block-rebar-plan-svg';
|
||||
import { BLOCK_REBAR_RANGES } from './core/rebar/block-check';
|
||||
import { DEFAULT_BLOCK_REBAR, type BlockRebarSettings } from './core/rebar/bearing-block';
|
||||
import { groundSectionSvg } from './view/ground-svg';
|
||||
@@ -1048,8 +1049,22 @@ function renderBlockRebarSettings(box: HTMLDivElement, pier: Pier): void {
|
||||
const n = pier.model.integratedBlocks.length;
|
||||
wrap.appendChild(el('p', `적용 블럭: ${n > 0 ? `일체 ${n}쌍` : `분리 ${pier.model.blocks.length}개`} (전체)`, 'muted small'));
|
||||
const fig = el('figure', undefined, 'ground-fig');
|
||||
fig.innerHTML = blockRebarSectionSvg(pier.model, Math.min(bearingPairIndex, Math.max(0, pairEccentricities(pier.model.blocks).length - 1)));
|
||||
fig.appendChild(el('figcaption', '단면 C–C · 교축 방향 · 선택한 쌍 · S2 점(상면), S1 선과 다리(⊓) · 치수 mm', 'muted small'));
|
||||
const pairIdx = Math.min(bearingPairIndex, Math.max(0, pairEccentricities(pier.model.blocks).length - 1));
|
||||
// 단면 C–C / 평면 (승인 2026-10-26): the two views of the same settings; the 평면 shows the legs as dots and the row numbers.
|
||||
const viewRow = el('div', undefined, 'opts');
|
||||
for (const [v, label] of [['section', '단면 C–C'], ['plan', '평면']] as const) {
|
||||
const b = el('button', label, 'btn small');
|
||||
b.type = 'button';
|
||||
b.setAttribute('aria-pressed', String(bearingRebarView === v));
|
||||
b.addEventListener('click', () => {
|
||||
bearingRebarView = v;
|
||||
renderAll();
|
||||
});
|
||||
viewRow.appendChild(b);
|
||||
}
|
||||
wrap.appendChild(viewRow);
|
||||
fig.innerHTML = bearingRebarView === 'plan' ? blockRebarPlanSvg(pier.model, pairIdx) : blockRebarSectionSvg(pier.model, pairIdx);
|
||||
fig.appendChild(el('figcaption', bearingRebarView === 'plan' ? '평면 · 선택한 쌍 · S2 선(교각축 방향), S1 선(교축 방향) · 다리는 점 · 번호는 표의 행 번호' : '단면 C–C · 교축 방향 · 선택한 쌍 · S2 점(상면), S1 선과 다리(⊓) · 치수 mm', 'muted small'));
|
||||
wrap.appendChild(fig);
|
||||
box.appendChild(wrap);
|
||||
}
|
||||
@@ -1589,6 +1604,8 @@ function renderBearingBasis(wrap: HTMLDivElement, pier: Pier): void {
|
||||
/** 상세 보기 pair shown in the plan, and whether the drawing values are overlaid (screen state only, 승인 2026-10-26). */
|
||||
let bearingPairIndex = 0;
|
||||
let bearingOverlayOn = true;
|
||||
/** ③ 받침블럭 view: the C–C section or the plan (승인 2026-10-26). */
|
||||
let bearingRebarView: 'section' | 'plan' = 'section';
|
||||
|
||||
/**
|
||||
* Drawing values of one bearing for the overlays (승인 2026-10-26): the imported drawing row where it has the value
|
||||
|
||||
Reference in new issue
Block a user