feat(rebar): plan view of the block rebar with the 단면/평면 switch (승인 2026-10-26)
- view/block-rebar-plan-svg.ts: the selected pair from above — S2 lines along the 교각축 (spaced at S2 across the 교축), S1 lines along the 교축 (spaced at S1), each end a dot (leg); the bar sets carry the row numbers only (S1, S2). - The ③ card switches between the C–C section and the plan. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
521979b437
commit
dd590b899c
3 files changed
+123
-2
No files matched your search
@@ -0,0 +1,28 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { buildPier } from '../src/core/geometry';
|
||||
import { blockRebarPlanSvg } from '../src/view/block-rebar-plan-svg';
|
||||
import { loadP1 } from './helpers';
|
||||
|
||||
const count = (svg: string, re: RegExp) => (svg.match(re) ?? []).length;
|
||||
|
||||
describe('받침블럭 배근 평면 (승인 2026-10-26)', () => {
|
||||
it('a separate pair: 8 S2 and 8 S1 lines per block, each with two leg dots', () => {
|
||||
const svg = blockRebarPlanSvg(buildPier(loadP1()), 0);
|
||||
expect(count(svg, /stroke="#0F5C66" stroke-width="8"/g)).toBe(16);
|
||||
expect(count(svg, /stroke="#B4531F" stroke-width="8"/g)).toBe(16);
|
||||
expect(count(svg, /<circle/g)).toBe(64);
|
||||
});
|
||||
|
||||
it('a 일체 pair: 19 S2 lines and 8 S1 lines, with their leg dots', () => {
|
||||
const svg = blockRebarPlanSvg(buildPier({ ...loadP1(), bearingLayout: '일체' }), 0);
|
||||
expect(count(svg, /stroke="#0F5C66" stroke-width="8"/g)).toBe(19);
|
||||
expect(count(svg, /stroke="#B4531F" stroke-width="8"/g)).toBe(8);
|
||||
expect(count(svg, /<circle/g)).toBe(54);
|
||||
});
|
||||
|
||||
it('labels only the row numbers S1 and S2', () => {
|
||||
const svg = blockRebarPlanSvg(buildPier(loadP1()), 0);
|
||||
expect(svg).toContain('>S2<');
|
||||
expect(svg).toContain('>S1<');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user