feat(abut): 교대 벽체·흉벽 삽도와 수축줄눈·흉벽 Level 입력 추가
- 벽체·흉벽 개략 단면 SVG(src/view/abut-section-svg.ts)를 형상 카드 맨 위에 추가. 치수 글자는 카드 입력값을 mm로 표시하고, 값을 바꾸면 다시 그림 - 형상 입력에 수축줄눈 개수(정수 0 이상)와 흉벽 상단 Level 좌·우(450·995, 계산 미사용·QA-4)를 추가. 기하 계산에는 쓰지 않음 - 테스트 619건 통과, 타입 검사·빌드 통과 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1d31d2f3a9
commit
5af88a511e
7 files changed
+110
-2
No files matched your search
@@ -0,0 +1,29 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { ABUT_SHAPE_DEFAULT, resolveShape } from '../src/core/abut/shape';
|
||||
import { abutSectionSvg } from '../src/view/abut-section-svg';
|
||||
|
||||
describe('교대 삽도 (벽체·흉벽 개략 단면, 시안 ②)', () => {
|
||||
it('names the card values in mm, including the new ones', () => {
|
||||
const svg = abutSectionSvg(resolveShape(), ABUT_SHAPE_DEFAULT);
|
||||
expect(svg).toContain('흉벽 높이 2500');
|
||||
expect(svg).toContain('벽체 두께 2400');
|
||||
expect(svg).toContain('저판 뒷굽 -1800');
|
||||
expect(svg).toContain('수축줄눈 1개');
|
||||
expect(svg).toContain('Level 좌 450 · 우 995');
|
||||
});
|
||||
|
||||
it('follows a changed value, and says it is not to scale', () => {
|
||||
const v = { ...ABUT_SHAPE_DEFAULT, shrinkJointCount: 3, parapetHeightMm: 2200 };
|
||||
const svg = abutSectionSvg(resolveShape(v), v);
|
||||
expect(svg).toContain('수축줄눈 3개');
|
||||
expect(svg).toContain('흉벽 높이 2200');
|
||||
expect(svg).toContain('축척 아님');
|
||||
});
|
||||
|
||||
it('draws the footing, wall and parapet as separate shapes', () => {
|
||||
const svg = abutSectionSvg(resolveShape(), ABUT_SHAPE_DEFAULT);
|
||||
expect(svg.match(/<rect /g)).toHaveLength(3);
|
||||
expect(svg.startsWith('<svg')).toBe(true);
|
||||
expect(svg.endsWith('</svg>')).toBe(true);
|
||||
});
|
||||
});
|
||||
@@ -40,7 +40,17 @@ const rec = parseAbutments(XLSX.read(readFileSync(RAG), { type: 'buffer' })).abu
|
||||
describe('형상 입력이 계산에 반영됨 (시안 ② 카드)', () => {
|
||||
it('the card has one field per shape value, in the mockup order', () => {
|
||||
expect(SHAPE_EDIT_FIELDS.map((f) => f.key)[0]).toBe('wallFrontMm');
|
||||
expect(SHAPE_EDIT_FIELDS).toHaveLength(10);
|
||||
expect(SHAPE_EDIT_FIELDS).toHaveLength(13);
|
||||
});
|
||||
|
||||
it('the new drawing values do not change the geometry (the model ignores them)', () => {
|
||||
expect(resolveShape({ shrinkJointCount: 3, parapetLevelLeftMm: 800 })).toEqual(resolveShape());
|
||||
});
|
||||
|
||||
it('the shrink-joint count must be a whole number, not negative', () => {
|
||||
expect(shapeIssues({ shrinkJointCount: 1.5 }).join(' ')).toContain('수축줄눈');
|
||||
expect(shapeIssues({ shrinkJointCount: -1 }).join(' ')).toContain('수축줄눈');
|
||||
expect(shapeIssues({ shrinkJointCount: 0 })).toEqual([]);
|
||||
});
|
||||
|
||||
it('a footing that does not cover the wall is refused by the edit rule', () => {
|
||||
|
||||
Reference in new issue
Block a user