feat(abut-rebar): ③ 교대 화면 틀과 확대기초 배근 카드
- ③에서 교대를 고르면 부재 · 교대 목록(받침블럭 → 벽체 → 흉벽·브라켓 → 확대기초 → 날개벽 → 접속슬래브)과 카드를 보여 줌. 확대기초만 규칙이 있고 나머지는 '다음 단계'. 선택한 교대만 3D에 그림 - 확대기초 카드: 보기 탭 3개(교대축 직각 단면 · 교대축 단면 · 상면 평면)와 번호 풍선 강조, 범례, 기본간격 · 배근 방향 ① / ② · 피복 · 여유 · B9 배수 입력, 자동 값(cycle 간격 · B10 위 여유 · l_s · 옆붙임), 철근표(묶음별 실간격 수정 · 수정됨 · 되돌리기, 비고 펼치기), 근거 줄, RB-AF 알림 - 입력은 AbutRecord.rebar.footing에 바꾼 값만 저장 · 프로젝트 파일 검증. fck는 공통 설정의 기초부 값 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e00e43ca61
commit
b06bf368b6
9 files changed
+591
-10
No files matched your search
@@ -183,3 +183,35 @@ describe('옵션 ② 교대축 직각 · 직사각 · 합성 (§13)', () => {
|
||||
expect(abutFootingRebar(geom, {}).bars).toEqual(A1.bars);
|
||||
});
|
||||
});
|
||||
|
||||
import { applyFootingRebar } from '../src/core/abut/edit';
|
||||
import { checkStoredAbutments } from '../src/core/project';
|
||||
import { abutFootingRebarPlanSvg, abutFootingSectionLSvg, abutFootingSectionWSvg } from '../src/view/abut-footing-rebar-svg';
|
||||
|
||||
describe('③ 저판 배근 입력 저장 · 삽도', () => {
|
||||
it('stores only the changed values; undefined links a bar group back; refuses bad values', () => {
|
||||
const a = applyFootingRebar(rec, { sDist: 200, dir: 'perp' });
|
||||
expect(a.rebar?.footing).toEqual({ sDist: 200, dir: 'perp' });
|
||||
expect(applyFootingRebar(a, { sDist: undefined }).rebar?.footing).toEqual({ dir: 'perp' });
|
||||
expect(() => applyFootingRebar(rec, { k9L: 1.5 })).toThrow('B9 배수');
|
||||
expect(() => applyFootingRebar(rec, { sL: 0 })).toThrow();
|
||||
});
|
||||
|
||||
it('the project file keeps the 배근 input and refuses a wrong direction', () => {
|
||||
expect(() => checkStoredAbutments([applyFootingRebar(rec, { sW: 200, dir: 'perp' })])).not.toThrow();
|
||||
expect(() => checkStoredAbutments([{ ...rec, rebar: { footing: { dir: 'diag' } } as never }])).toThrow('저판 배근');
|
||||
});
|
||||
|
||||
it('삽도: the dimension strings and a balloon per bar; a pick dims the others', () => {
|
||||
const w = abutFootingSectionWSvg(geom, A1);
|
||||
for (const s of ['100 · 175 · 27@150=4.050 · 175 · 100', '100 · 175 · 5@150=750 · 2.400 · 6@150=900 · 175 · 100', '150 · 3@200=600']) expect(w).toContain(s);
|
||||
for (const m of ['B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8', 'B9', 'B10']) expect(w).toContain(`data-pick="${m}"`);
|
||||
expect(w).not.toContain('opacity="0.15"');
|
||||
expect(abutFootingSectionWSvg(geom, A1, 'B5')).toContain('opacity="0.15"');
|
||||
expect(abutFootingSectionLSvg(geom, A1)).toContain('100.4 · 185.8 · 93@125=11.625 · 185.8 · 100.4');
|
||||
expect(abutFootingSectionLSvg(geom, A1)).toContain('B5·B6 이음 l_s 955');
|
||||
const opt2 = abutFootingRebar(geom, { dir: 'perp' });
|
||||
expect(abutFootingRebarPlanSvg(geom, opt2, -0.088)).toContain('data-pick="B1-S"');
|
||||
expect(abutFootingRebarPlanSvg(geom, A1, -0.088)).not.toContain('data-pick="B1-S"');
|
||||
});
|
||||
});
|
||||
@@ -21,8 +21,12 @@ describe('형상계획 ②: 선택한 객체만 3D에 그림', () => {
|
||||
expect(abutShown('shape', null, 'A1')).toBe(true);
|
||||
});
|
||||
|
||||
it('③ and ④ are not affected by the abutment selection', () => {
|
||||
expect(piersShown('rebar', 'A1')).toBe(true);
|
||||
it('③ draws a selected abutment alone (2026-11-04); with no abutment selected ③ and ④ draw as before', () => {
|
||||
expect(piersShown('rebar', 'A1')).toBe(false);
|
||||
expect(abutShown('rebar', 'A1', 'A1')).toBe(true);
|
||||
expect(abutShown('rebar', 'A1', 'A2')).toBe(false);
|
||||
expect(piersShown('rebar', null)).toBe(true);
|
||||
expect(abutShown('rebar', null, 'A1')).toBe(true);
|
||||
expect(piersShown('quantity', 'A1')).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user