feat(rebar): 길이 단면의 주철근 B5–B8을 굵게 표시하고 양끝 다리를 그림

- B5–B8 선 굵기 2, B5 양끝 아래, B6·B7 양끝 위, B8 직선 (확대기초철근 (1).md §6)
- 테스트: 다리 6개 확인

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-10-27 13:58:27 +09:00
1 parent 0e9d89951a
commit cf8410e450
2 files changed
+19 -6

No files matched your search

+15 -6
View File
@@ -1,6 +1,6 @@
import type { PierModel } from '../core/geometry';
import { NOMINAL_DIAMETER } from '../core/rebar/common';
import { assemblyGridIndices, assemblyJs, b10Levels, b9Bars, grid, gridPositions, layers, sideDepth } from '../core/rebar/footing';
import { assemblyGridIndices, assemblyJs, b10Levels, b9Bars, grid, gridPositions, layers, legLength, sideDepth } from '../core/rebar/footing';
import { DEFAULT_FOOTING_REBAR } from '../core/rebar/footing-settings';
/**
@@ -57,11 +57,20 @@ export function footingSectionLSvg(model: PierModel): string {
const xa = x(-L / 2 + fs.cSide);
const xb = x(L / 2 - fs.cSide);
// B5–B8 (along L): one line per family from cover to cover.
parts.push(line('b5', 'B5', xa, xb, y(z.B5), COLOR.b5, 1.6));
parts.push(line('b6', 'B6', xa, xb, y(z.B68), COLOR.b5, 1.2));
parts.push(line('b7', 'B7', xa, xb, y(z.B7), COLOR.b5, 1.2));
parts.push(line('b8', 'B8', xa, xb, y(z.B68), COLOR.b5, 1.2));
// B5–B8 (along L, 주철근): one line per family from cover to cover, with the legs at both ends
// (B5 ⊓ down, B6 and B7 ⊔ up to the B5 height / up, B8 straight; 확대기초철근 (1).md §6).
const legW = 1.6;
parts.push(line('b5', 'B5', xa, xb, y(z.B5), COLOR.b5, 2));
parts.push(line('b6', 'B6', xa, xb, y(z.B68), COLOR.b5, 2));
parts.push(line('b7', 'B7', xa, xb, y(z.B7), COLOR.b5, 2));
parts.push(line('b8', 'B8', xa, xb, y(z.B68), COLOR.b5, 2));
const leg = (name: string, xx: number, y1: number, y2: number) =>
`<line class="mainleg" data-bar="${name}" x1="${xx.toFixed(1)}" x2="${xx.toFixed(1)}" y1="${y1.toFixed(1)}" y2="${y2.toFixed(1)}" stroke="${COLOR.b5}" stroke-width="${legW}"/>`;
for (const xx of [xa, xb]) {
parts.push(leg('B5', xx, y(z.B5), y(z.B5 - legLength('S29'))));
parts.push(leg('B6', xx, y(z.B68), y(z.B5)));
parts.push(leg('B7', xx, y(z.B7), y(z.B7 + legLength('S19'))));
}
// B1–B4 (along W, spaced along L): points on the L grid. Odd positions carry B1, B2, B3; even carry B4 (as bottomBars).
const xsL = gridPositions(L, fs, 'sL');
+4
View File
@@ -29,6 +29,10 @@ describe('확대기초 교각축 단면 (길이 L) (승인 2026-10-27)', () => {
expect(crossBars(L, W, H, fs).length).toBe(4);
});
it('주철근 B5–B8: 선 4개와 다리 6개 (B5 양끝 아래, B6·B7 양끝 위, B8 직선)', () => {
expect(svg.split('class="mainleg"').length - 1).toBe(6);
});
it('shows the length, the grid string, and the B10 levels as dimensions', () => {
expect(svg).toContain('길이 10400');
expect(svg).toContain('8@200=1600');