Files
Pier_v1/tests/rebar-shear-loops.test.ts
T
ypshimandClaude Haiku 5.5 03bb1f9929 fix(rebar): stack the three C9·C10·C11 폐합 to the right so they do not overlap
The three 폐합 of one position were drawn at the same x, so their U bars overlapped. Loop i now sits at x + i·2d and its
삿갓 one bar (d) beside its U, so no U meets another loop's U or 삿갓. The 철근표 counts and lengths are unchanged.
The rule is geometry only; the spec (§4.3) needs the stacking note.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-23 10:04:36 +09:00

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);
});
});