feat(rebar): 확대기초 철근표 간격·실간격을 격자 실간격 s와 s_v에 연동

- B1–B8: 간격 2s, 실간격 s (cycle 2·4·6·8), 실간격 2s (B1·B3·B5·B7)
- B9: 간격 4s, 실간격 2s (엇갈림) · B11·B12: 간격 4s
- B10-1·B10-2: 간격·실간격 = s_v
- 근거: s 또는 s_v가 기본값과 다르면 '입력', 같으면 '기본값'

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-10-26 17:01:14 +09:00
1 parent 5a20a18185
commit c40c58d27f
2 files changed
+27 -1

No files matched your search

+12 -1
View File
@@ -2,7 +2,7 @@ import type { PierModel } from '../geometry';
import { barLength, bearingBlockRebar, DEFAULT_BLOCK_REBAR, totals } from './bearing-block';
import { DEFAULT_COPING_REBAR } from './coping-settings';
import { DEFAULT_COLUMN_REBAR } from './column-settings';
import type { FootingRebarSettings } from './footing-settings';
import { DEFAULT_FOOTING_REBAR, type FootingRebarSettings } from './footing-settings';
import { bottomPiece, topBarLength, widthLayout, topSplicePieces } from './coping-main';
import { shearBars, shearBarsMulti, copingSideBars, SIDE_HOOK_LEG, c14Bars, c14Length, stairBars, stepDevLength, undersideAt, shearULength, capLength, PIECES_PER_POSITION } from './coping';
import { sideRowLevels } from '../coping-geom';
@@ -160,6 +160,17 @@ export function linkedSpacing(name: string, model: PierModel): Pick<RebarRow, 's
if (name === 'P5') return { spacing: String(k.ctcP5), actual: String(k.ctcP5), basis: basis(k.ctcP5 !== kd.ctcP5) };
if (name === 'P4') return { spacing: String(k.ctcP4), actual: String(k.ctcP4), basis: basis(k.ctcP4 !== kd.ctcP4) };
if (name === 'P6') return { spacing: String(k.ctcP6), actual: String(k.ctcP6), basis: basis(k.ctcP6 !== kd.ctcP6) };
// 확대기초 (승인 2026-10-26): B1–B8 간격 2s (k = 2), 실간격 s on the cycle bars (B2·B4·B6·B8); B9 4s (2s 엇갈림);
// B10 s_v; B11·B12 4s. The basis is 기본값 unless the grid spacing s or s_v differs from its default.
const fs = model.footingRebar;
const fd = DEFAULT_FOOTING_REBAR;
if (/^B[1-8]$/.test(name)) {
const cycle = name === 'B2' || name === 'B4' || name === 'B6' || name === 'B8';
return { spacing: String(2 * fs.s), actual: String(cycle ? fs.s : 2 * fs.s), basis: basis(fs.s !== fd.s) };
}
if (name === 'B9') return { spacing: `${4 * fs.s} (4s)`, actual: `${2 * fs.s} (2s 엇갈림)`, basis: basis(fs.s !== fd.s) };
if (name === 'B11' || name === 'B12') return { spacing: `${4 * fs.s} (4s)`, actual: String(4 * fs.s), basis: basis(fs.s !== fd.s) };
if (name === 'B10-1' || name === 'B10-2') return { spacing: String(fs.sV), actual: String(fs.sV), basis: basis(fs.sV !== fd.sV) };
if (name === 'S1') return { spacing: String(b.spacingS1), actual: String(b.spacingS1), basis: basis(b.spacingS1 !== bd.spacingS1) };
if (name === 'S2') return { spacing: String(b.spacingS2), actual: String(b.spacingS2), basis: basis(b.spacingS2 !== bd.spacingS2) };
return undefined;
+15
View File
@@ -29,6 +29,21 @@ describe('확대기초 배근 입력 (승인 2026-10-26, 시안 ③ 확대기초
expect(b4.count).not.toBe(b4Default.count);
});
it('철근표 간격: P1 기본값 B2 250 / 125 · B10-1 200 (기본값); s 150 → B2 300 / 150 · B1 300 (입력)', () => {
const base = rebarSummary(buildPier(loadP1())).rows;
const b2 = base.find((r) => r.name === 'B2')!;
expect([b2.spacing, b2.actual, b2.basis]).toEqual(['250', '125', 'default']);
const b10 = base.find((r) => r.name === 'B10-1')!;
expect([b10.spacing, b10.basis]).toEqual(['200', 'default']);
const rows = rebarSummary(buildPier({ ...loadP1(), footingRebar: { s: 150 } })).rows;
const b2s = rows.find((r) => r.name === 'B2')!;
expect([b2s.spacing, b2s.actual, b2s.basis]).toEqual(['300', '150', 'input']);
const b1s = rows.find((r) => r.name === 'B1')!;
expect([b1s.spacing, b1s.actual]).toEqual(['300', '300']);
expect(rows.find((r) => r.name === 'B10-1')!.basis).toBe('default');
});
it('the 조립 단 배수 n reaches the assembly levels', () => {
const H = 2000;
const base = assemblyJs(H, DEFAULT_FOOTING_REBAR);