- view/column-section-svg.ts: A 일반(P3, 커플러 없음), B 단부(P5, 커플러 1), C 확대기초 안(P4, 반원 2·커플러 2) - P1·P2는 같은 각도에 r 875·843.2로 배치, 띠철근 둘레·겹침·반원 길이 표시 - P6은 P6 단이 그 높이에 있을 때만 중심을 지나는 현 4본 (0 · 46.96 · 90 · 133.04°) - 기둥 패널에서 정면 ↔ 단면 A·B·C 전환 (단면 높이는 각 그룹의 첫 단, 새 계산 없음) Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
33 lines
1.2 KiB
TypeScript
33 lines
1.2 KiB
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import { buildPier } from '../src/core/geometry';
|
|
import { columnInputFor, columnRebar } from '../src/core/rebar/column';
|
|
import { columnSectionSvg } from '../src/view/column-section-svg';
|
|
import { loadP1 } from './helpers';
|
|
|
|
const count = (svg: string, cls: string) => svg.split(`class="${cls}"`).length - 1;
|
|
|
|
describe('기둥 단면 A·B·C (승인 2026-10-26, 추천)', () => {
|
|
const m = buildPier(loadP1());
|
|
const input = columnInputFor(m);
|
|
const col = columnRebar(input);
|
|
|
|
it('A 일반: no coupler, P1 and P2 at all 46 angles, no P6 chords', () => {
|
|
const svg = columnSectionSvg('A', input, col);
|
|
expect(count(svg, 'coupler')).toBe(0);
|
|
expect(count(svg, 'p1')).toBe(input.nDiv);
|
|
expect(count(svg, 'p2')).toBe(input.nDiv);
|
|
expect(count(svg, 'p6')).toBe(0);
|
|
});
|
|
|
|
it('B 단부: one coupler', () => {
|
|
expect(count(columnSectionSvg('B', input, col), 'coupler')).toBe(1);
|
|
});
|
|
|
|
it('C 확대기초 안: two semicircles, two couplers, and the four P6 chords at its P6 level', () => {
|
|
const svg = columnSectionSvg('C', input, col);
|
|
expect(count(svg, 'coupler')).toBe(2);
|
|
expect(count(svg, 'p4')).toBe(2);
|
|
expect(count(svg, 'p6')).toBe(4);
|
|
});
|
|
});
|