fix(rebar): cut the C–C section through the selected pair only
- The section was drawing every bearing on the same 교축 line, so the blocks and dimension text stacked on top of each other. It now cuts through the selected pair (①·⑥ …), which the ③ card also shows as chips, shared with ②. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
38bb26eda5
commit
521979b437
2 files changed
+28
-9
No files matched your search
+16
-2
@@ -1017,6 +1017,20 @@ function renderBlockRebarSettings(box: HTMLDivElement, pier: Pier): void {
|
||||
const wrap = el('div', undefined, 'bearing-ref');
|
||||
const current: BlockRebarSettings = { ...DEFAULT_BLOCK_REBAR, ...pier.draft.blockRebar };
|
||||
wrap.appendChild(el('p', '받침블럭 배근 설정 (기본값 = P1 · 범위는 칸 옆에 표시)', 'lbl'));
|
||||
// 단면 쌍 (the same selection as ②): the C–C section cuts through one pair.
|
||||
const pairList = pairEccentricities(pier.model.blocks);
|
||||
const chipRow = 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();
|
||||
});
|
||||
chipRow.appendChild(chip);
|
||||
});
|
||||
wrap.appendChild(chipRow);
|
||||
const grid = el('div', undefined, 'edit-fields');
|
||||
for (const f of BLOCK_REBAR_FIELDS) {
|
||||
const row = el('div', undefined, 'edit-row');
|
||||
@@ -1034,8 +1048,8 @@ 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);
|
||||
fig.appendChild(el('figcaption', '단면 C–C · 교축 방향 · S2 점(상면), S1 선과 다리(⊓) · 치수 mm', 'muted small'));
|
||||
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'));
|
||||
wrap.appendChild(fig);
|
||||
box.appendChild(wrap);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user