diff --git a/src/core/rebar/summary.ts b/src/core/rebar/summary.ts index a0f52ee..89f802a 100644 --- a/src/core/rebar/summary.ts +++ b/src/core/rebar/summary.ts @@ -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 { + 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);