Files
Pier_v1/tests/rebar-shear-loops.test.ts
T

23 lines
1.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { describe, expect, it } from 'vitest';
import { buildPier } from '../src/core/geometry';
import { NOMINAL_DIAMETER } from '../src/core/rebar/common';
import { PIECES_PER_POSITION, SHEAR_LOOP_STEP } from '../src/core/rebar/coping';
import { buildRebar3D } from '../src/view/rebar3d';
import { loadP1 } from './helpers';
const d = NOMINAL_DIAMETER.H25;
describe('C9·C10·C11 폐합 (코핑철근.md §4 · 수정 2026-10-23)', () => {
it('the loop step leaves room for a 삿갓 (one bar beside its U) before the next loop\'s U', () => {
// Loop i: U at x_i, 삿갓 at x_i + d. Loop i+1: U at x_i + step. Clear if step − d ≥ d.
expect(SHEAR_LOOP_STEP - d).toBeGreaterThanOrEqual(d - 1e-9);
});
it('three 폐합 per position and 6 pieces each: the count and the 철근표 are unchanged', () => {
expect(PIECES_PER_POSITION).toBe(6);
const rb = buildRebar3D(buildPier(loadP1()));
// C10 has 9 positions, each with 3 loops of 6 bars (2 U legs, U base, 삿갓 top + 2 legs) = 6 bars per loop.
expect(rb.byName.get('C10')!.length).toBe(9 * 3 * 6);
});
});