feat(rebar): coping front view and 단면·폐합 section from the 3D bar records (승인 2026-10-26)
- rebar3d records every bar (name, stretch, local points, diameter) next to its mesh, so the 2D drawings use the same data as the 3D view. - view/coping-rebar-svg.ts: the 정면 (along the coping length, EL vertical) and the 단면·폐합 at a chosen station (the bars crossing it, C9–C11 loops included). - ③ coping tab: 정면 / 단면·폐합 toggle and the station input. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
32e8dad7dc
commit
57f7c148ec
4 files changed
+157
-1
No files matched your search
+46
@@ -24,6 +24,7 @@ import { bearingSectionSvg, type BearingDrawingRef } from './view/bearing-sectio
|
||||
import { solplateDetailSvg, type SolplateDrawingRef } from './view/solplate-svg';
|
||||
import { blockRebarSectionSvg } from './view/block-rebar-svg';
|
||||
import { blockRebarPlanSvg } from './view/block-rebar-plan-svg';
|
||||
import { copingFrontSvg, copingSectionSvg } from './view/coping-rebar-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';
|
||||
@@ -1069,6 +1070,50 @@ function renderBlockRebarSettings(box: HTMLDivElement, pier: Pier): void {
|
||||
box.appendChild(wrap);
|
||||
}
|
||||
|
||||
/** 코핑 배근 (승인 2026-10-26, 추천): 정면, and the 단면·폐합 at a station the user chooses (default mid-length). */
|
||||
let copingView: 'front' | 'section' = 'front';
|
||||
let copingStation: number | null = null;
|
||||
|
||||
function renderCopingDrawings(box: HTMLDivElement, pier: Pier): void {
|
||||
if (!pier.model || !rebar3d) return;
|
||||
const L = pier.model.copingL;
|
||||
const wrap = el('div', undefined, 'bearing-ref');
|
||||
const row = el('div', undefined, 'opts');
|
||||
for (const [v, label] of [['front', '정면'], ['section', '단면 · 폐합 구성']] as const) {
|
||||
const b = el('button', label, 'btn small');
|
||||
b.type = 'button';
|
||||
b.setAttribute('aria-pressed', String(copingView === v));
|
||||
b.addEventListener('click', () => {
|
||||
copingView = v;
|
||||
renderAll();
|
||||
});
|
||||
row.appendChild(b);
|
||||
}
|
||||
wrap.appendChild(row);
|
||||
const fig = el('figure', undefined, 'ground-fig');
|
||||
if (copingView === 'front') {
|
||||
fig.innerHTML = copingFrontSvg(rebar3d.records, L * 1000);
|
||||
fig.appendChild(el('figcaption', '정면 · 교축 방향에서 본 코핑 배근 (3D 철근과 같은 데이터)', 'muted small'));
|
||||
} else {
|
||||
const at = copingStation ?? L / 2;
|
||||
const station = el('input');
|
||||
station.type = 'number';
|
||||
station.step = '0.1';
|
||||
station.value = String(at);
|
||||
station.addEventListener('change', () => {
|
||||
copingStation = Number(station.value);
|
||||
renderAll();
|
||||
});
|
||||
const label = el('label', '단면 위치 s (m, 코핑 시작에서) ');
|
||||
label.appendChild(station);
|
||||
wrap.appendChild(label);
|
||||
fig.innerHTML = copingSectionSvg(rebar3d.records, at);
|
||||
fig.appendChild(el('figcaption', `단면 · 폐합 구성 · s = ${at} m에서 자른 철근 (C9–C11 폐합 포함)`, 'muted small'));
|
||||
}
|
||||
wrap.appendChild(fig);
|
||||
box.appendChild(wrap);
|
||||
}
|
||||
|
||||
function renderRebar(): void {
|
||||
const pier = activePier();
|
||||
// 교각 목록 with the 배근 status (시안 ③). The checks are the same as in ① and ②.
|
||||
@@ -1103,6 +1148,7 @@ function renderRebar(): void {
|
||||
const { rows, warnings } = rebarSummary(pier.model, state.material, state.fckByMember);
|
||||
$('rebar-note').textContent = `${pier.input.name} · 형상 기준 계산 · 값은 기본값 기준 문서 규칙`;
|
||||
if (state.rebarMember === 'bearing') renderBlockRebarSettings(box, pier);
|
||||
if (state.rebarMember === 'coping' && rebar3d) renderCopingDrawings(box, pier);
|
||||
const shown = rows.filter((r) => r.member === state.rebarMember);
|
||||
box.appendChild(rebarSelectBar(shown.map((r) => r.name)));
|
||||
const table = el('table', undefined, 'grid-table rebar-table');
|
||||
|
||||
Reference in new issue
Block a user