From 51209cccf9d57650bffe32575f0154c5d3f950b0 Mon Sep 17 00:00:00 2001 From: ypshim Date: Tue, 10 Nov 2026 17:06:10 +0900 Subject: [PATCH] =?UTF-8?q?fix(rebar):=20=EA=BA=BE=EC=9D=B8=20=EB=8B=A4?= =?UTF-8?q?=EC=A3=BC=ED=98=95=20=EC=BD=94=ED=95=91=EC=9D=98=20=EC=B2=A0?= =?UTF-8?q?=EA=B7=BC=ED=91=9C=EB=A5=BC=20=EB=8B=A4=EC=A3=BC=ED=98=95=20?= =?UTF-8?q?=EA=B7=9C=EC=B9=99=EC=9C=BC=EB=A1=9C=20=EB=82=B8=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 꺾인 코핑이면 기둥 수와 관계없이 T형(기둥 1개) 코핑 행을 내어 산외교 P11(3주형)의 전단철근 등 수량이 틀렸다. 기둥이 1개일 때만 T형 행, 2개 이상이면 꺾여도 다주형 행(편 좌표 계산)을 쓴다. Co-Authored-By: Claude Haiku 5.5 --- src/core/rebar/summary.ts | 5 +++-- tests/kink-steps.test.ts | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/core/rebar/summary.ts b/src/core/rebar/summary.ts index 24a0524..dcdff98 100644 --- a/src/core/rebar/summary.ts +++ b/src/core/rebar/summary.ts @@ -237,7 +237,8 @@ export function rebarSummary( // Coping (코핑철근.md §5–§8) const colS = model.columns.map((c) => c.s * 1000); const nCol = Math.max(1, colS.length); - if (nCol <= 1 || model.kink !== null) { + // A bent multi-column coping keeps the multi-column rules (2026-11-10); only one column uses the T형 rows. + if (nCol <= 1) { const width = widthLayout(B, model.copingRebar); const perRow = width.count / 2; // cycle split, 12 per row // CP04 (승인 2026-10-26): the cycle split needs an even count (n + 3), so n must be odd. Warning only; the input is kept. @@ -400,7 +401,7 @@ export function rebarSummary( } else { warnings.push({ code: 'RB-F00', message: '현장타설말뚝은 확대기초가 없어 확대기초 철근을 만들지 않습니다.', target: 'footing' }); } - if (nCol > 1 && model.kink === null) { + if (nCol > 1) { const info = multicolCopingInfo(model, mCoping); const grouped = new Map(); for (const b of info.bars) { diff --git a/tests/kink-steps.test.ts b/tests/kink-steps.test.ts index 9e25fcd..f2e889a 100644 --- a/tests/kink-steps.test.ts +++ b/tests/kink-steps.test.ts @@ -5,6 +5,8 @@ import * as XLSX from 'xlsx'; import { parseWorkbook } from '../src/core/parseWorkbook'; import { buildPier, DIM, defaultLevelWidthMm } from '../src/core/geometry'; import type { PierInput } from '../src/core/types'; +import { rebarSummary } from '../src/core/rebar/summary'; +import { multicolCopingInfo } from '../src/core/rebar/multicol-coping'; // 산외교 P11 (샘플01) with the coping bent 8.767° at IP4 (2026-11-10 검토): back ⑥ g 11.64, ⑦ g 18.49, kink g 15.14. const SAMPLE = fileURLToPath(new URL('../project_data/01_엑셀/샘플01_산외교_교각입력데이터.xlsx', import.meta.url)); @@ -131,3 +133,15 @@ describe('받침 번호가 축 반대 방향인 교각 (2026-11-10)', () => { expect(b.segments.map((s) => s.s0)).toEqual(a.segments.map((s) => s.s0)); }); }); + +describe('꺾인 다주형 코핑의 철근표 (A, 2026-11-10)', () => { + it('uses the multi-column rows, not the one-column T형 rows', () => { + const m = buildPier(p11()); + const rows = rebarSummary(m).rows.filter((r) => r.member === 'coping'); + const info = multicolCopingInfo(m); + for (const name of ['C9', 'C10', 'C11', 'C1', 'C7']) { + expect(rows.find((r) => r.name === name)!.count, name).toBe(info.bars.filter((b) => b.name === name).length); + } + expect(rows.every((r) => r.note.includes('다주형'))).toBe(true); + }); +});